parametric functions, plotting contour map

hello everyone,
i have the parametric function for the mobius strip, and i would like to plot the level curves of it.
u=linspace(-1,1);
v=linspace(0,2*pi);
[u,v]=meshgrid(u,v);
x=(3+u.*cos(v/2)).*cos(v);
y=(3+u.*cos(v/2)).*sin(v);
z=u.*sin(v/2);
what i am trying to do now is to find the corresponding x and y values for every z value, and in order to do that i need to find the corresponding u and v pairs that would make that z-value. for example, if i want to plot the level curve z=0, the corresponding uv pairs would be (0, 0), (0, 2pi), (0, pi)...and so on. afterwards, i would use that uv values to compute the xy values, and plot those manually since i can't use the contour function.
right now i'm having trouble finding those uv values. i tried using a for loop:
for z = -1:0.1:1 ...
but it didn't work. does anyone have any ideas as to how to do this? it would be very much appreciated. thanks in advance.

Answers (0)

Categories

Asked:

on 27 May 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!