extruding a 2d curve


by marellasunny
Tags: interpolation
marellasunny
marellasunny is offline
#1
Nov20-12, 03:00 AM
P: 206
Hi all!
I would like to extrude a 2d curve in the X-Y plane along the Z direction,thereby wanting to obtain a plane of Z units long.How should I proceed?
Is there a tool especially for this in MATLAB?
Phys.Org News Partner Science news on Phys.org
Cougars' diverse diet helped them survive the Pleistocene mass extinction
Cyber risks can cause disruption on scale of 2008 crisis, study says
Mantis shrimp stronger than airplanes
gsal
gsal is offline
#2
Nov20-12, 08:32 AM
P: 838
matlab or not, if all you want to do is extrude such line in a straight line, all you need to do is add the third dimension (z), add a bunch of consecutive numbers to it z=1,2,3,4... and then simply broadcast the same x,y values along the third dimension.
marellasunny
marellasunny is offline
#3
Nov21-12, 12:32 AM
P: 206
Ok,I created it for a polynomial function(MATLAB CODE)
x=0:.1:10;
y=0:.1:10;
f=@(x)0.6.*x.^3+1.9.*x.^2+3.*x+25;
y=f(x);
z=zeros(size(x));
for i=0:.1:10
z1=z+i;
plot3(x,y,z1)
drawnow;
pause(eps);
hold on
end

Question:How do I 'fit' a surface through all these curves(assuming the curves are slightly different but parallel)?,how do I use these level curves to make a surface?"
I get an error saying"??? Error using ==> surf at 78
Z must be a matrix, not a scalar or vector." when I insert the command
surf(x,y,z1)
is creating a surface the same as creating a mesh?

gsal
gsal is offline
#4
Nov21-12, 07:56 AM
P: 838

extruding a 2d curve


first of all, I do not know matlab

second, your z1 variable is a one-dimensional vector only to which you are assigning, one at a time the values 0, 1, 2, 3, etc. Your z variable remains zero since initialized, you never assigned anything to it.

I think you first need to learn how to plot 3D, do an exercise from the user's manual and figure out what x, y, and z need to be.
marellasunny
marellasunny is offline
#5
Nov21-12, 10:46 AM
P: 206
I am using z1 as the z coordinate,not z.
z1=z+i;
plot3(x,y,z1)
It would helpful if someone can answer the queries above.
Thank you.


Register to reply

Related Discussions
Need help with this Elliptic curve theory (Edwards curve) Calculus & Beyond Homework 0
Area Under a Curve, 3D, with known end points and curve radius Calculus 0
Banked Frictionless Curve, and Flat Curve with Friction Introductory Physics Homework 1
How to convert force displacement curve to stress strain curve Engineering, Comp Sci, & Technology Homework 1
Differential Geometry: Showing a curve is a sphere curve Calculus & Beyond Homework 0