Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Wraparound in Mod plotting' topicStudent Support Forum > General > "Wraparound in Mod plotting"

Next Comment >Help | Reply To Topic
Author Comment/Response
John Barber
12/04/01 10:36am

Hi Folks:

I am attempting to perform a 2D parametric plot of some angles that vary Mod 2Pi, i.e. something like the following:

theta1[t_]:=Mod[2.3 t + .22, 2 Pi];
theta2[t_]:=Mod[1.1 t + 4.89, 2Pi];

ParametricPlot[{theta1[t],theta2[t]},{t,0,20}, AspectRatio->1]

This should produce a plot of the (theta1, theta2) trajectory in the square of side 2 Pi. And it does. The problem is that when one of the thetas goes from 2 Pi to zero (due to the Mod operation), ParametricPlot produces some spurious horizontal and vertical lines that aren't part of the dynamics (See the attached notebook). That's my problem: I want theta1 and theta2 to be able to wrap around to the other side of the graph without Mathematica drawing a line to connect at the discontinuity.
I suppose I could try it by generating a lot of points {theta1[t], theta2[t]} along the trajectory and using ListPlot with PlotJoined->False, but then I'd get dots instead of lines, which is not what I want.
Any help would be appreciated!
Thanks,
John

Attachment: BadWrapAround.nb, URL: ,

Subject (listing for 'Wraparound in Mod plotting')
Author Date Posted
Wraparound in Mod plotting John Barber 12/04/01 10:36am
Re: Wraparound in Mod plotting Forum Modera... 12/10/01 2:39pm
Next Comment >Help | Reply To Topic