From: striker on 11 May 2010 18:41 I am new to matlab an I am facing a problem.I want to design a curved cylinder.The cylinder is made such that we have small circles of changeable radius around a curve.It will be very nice of you.Thanks.
From: Walter Roberson on 11 May 2010 19:00 striker wrote: > I am new to matlab an I am facing a problem.I want to design a curved > cylinder.The cylinder is made such that we have small circles of > changeable radius around a curve. What kind of representation of the cylinder are you looking for? Take a circle of unit radius and pre-compute the positions of N vertices of the circle. Then, at each step along the curve, multiply those positions by the current radius and set the Z coordinate to be the current displacement along the curve. Once you have all of the coordinates computed, you can add whatever section-to-section cross-connections that you need, by assuming continuity between the corresponding points in adjacent layers.
From: striker on 11 May 2010 19:11 Walter Roberson <roberson(a)hushmail.com> wrote in message <hscnj8$oie$1(a)canopus.cc.umanitoba.ca>... > striker wrote: > > I am new to matlab an I am facing a problem.I want to design a curved > > cylinder.The cylinder is made such that we have small circles of > > changeable radius around a curve. > > What kind of representation of the cylinder are you looking for? > > Take a circle of unit radius and pre-compute the positions of N vertices of > the circle. Then, at each step along the curve, multiply those positions by > the current radius and set the Z coordinate to be the current displacement > along the curve. Once you have all of the coordinates computed, you can add > whatever section-to-section cross-connections that you need, by assuming > continuity between the corresponding points in adjacent layers. I have plotted a straigh cylinder in matrix form using repmat and surf commands.now i want to use the same procedure for curved cylinder.
From: Walter Roberson on 11 May 2010 19:46 striker wrote: > I have plotted a straigh cylinder in matrix form using repmat and surf > commands.now i want to use the same procedure for curved cylinder. repmat is fine when you need to duplicate data, but since you want the data to be different for every slice, you probably do not have much need for repmat(). Can the cylinder be solid? That is easier to program as a matrix than if you just want the outer surface. Is there a formula for the radius given Z? If so, then it is probably a matter of starting with a 3D matrix of nan, and then using ndgrid() and logical indexing to set the values of the matrix.
From: striker on 12 May 2010 07:55
Walter Roberson <roberson(a)hushmail.com> wrote in message <hscq8g$scb$1(a)canopus.cc.umanitoba.ca>... > striker wrote: > > > I have plotted a straigh cylinder in matrix form using repmat and surf > > commands.now i want to use the same procedure for curved cylinder. > > repmat is fine when you need to duplicate data, but since you want the data to > be different for every slice, you probably do not have much need for repmat(). > > Can the cylinder be solid? That is easier to program as a matrix than if you > just want the outer surface. > > Is there a formula for the radius given Z? If so, then it is probably a matter > of starting with a 3D matrix of nan, and then using ndgrid() and logical > indexing to set the values of the matrix. no I want the surface only. I dont have any formula for radius. the idea is that the radius should be greater on top and bottom and smaller at the middle. |