Prev: syntax extension
Next: Differential Eq.
From: LordBeotian on 13 Jan 2010 05:58 I want to plot a curve on a flat torus (i.e. the square with identified opposite edges) so i would like mathematica to join the points of the curve in a way that respect the torus topology. Is there a not too difficult way to do this with Mathematica? Or at least is there an easy way to have the points joined only when their distance on the square is small enought?
From: dh on 14 Jan 2010 05:45 Hi, you want to draw a curve on a rectangle, identifying opposite sides? Well you can do this e.g. using Mod and ParametricPlot. Here is an example where we use the unit square {{0,0},{0,1},{1,1},{1,0}} and the square function: ParametricPlot[{Mod[t, 1], Mod[t^2, 1]}, {t, 0, 4}] Daniel LordBeotian wrote: > I want to plot a curve on a flat torus (i.e. the square with > identified opposite edges) so i would like mathematica to join the > points of the curve in a way that respect the torus topology. Is there > a not too difficult way to do this with Mathematica? Or at least is > there an easy way to have the points joined only when their distance > on the square is small enought? >
From: LordBeotian on 15 Jan 2010 03:15 On 14 Gen, 11:45, dh <d...(a)metrohm.com> wrote: > Hi, > > you want to draw a curve on a rectangle, identifying opposite sides? Yes, exactly. > Well you can do this e.g. using Mod and ParametricPlot. Here is an > > example where we use the unit square {{0,0},{0,1},{1,1},{1,0}} and the > > square function: > > ParametricPlot[{Mod[t, 1], Mod[t^2, 1]}, {t, 0, 4}] Well my problem here is to avoid that the points are joined by segments which do not belong to the curve. Your parametric plot still have this problem unsolved.
From: dh on 15 Jan 2010 07:00 Hi, to get rid of the spurious lines, you may use the option: Exclusions. here is an example: xmax = 2; excl = Sqrt /@ Range[0, xmax^2]; ParametricPlot[{Mod[t, 1], Mod[t^2, 1]}, {t, 0, xmax}, Exclusions -> excl] Daniel LordBeotian wrote: > On 14 Gen, 11:45, dh <d...(a)metrohm.com> wrote: >> Hi, >> >> you want to draw a curve on a rectangle, identifying opposite sides? > > Yes, exactly. > >> Well you can do this e.g. using Mod and ParametricPlot. Here is an >> >> example where we use the unit square {{0,0},{0,1},{1,1},{1,0}} and the >> >> square function: >> >> ParametricPlot[{Mod[t, 1], Mod[t^2, 1]}, {t, 0, 4}] > > Well my problem here is to avoid that the points are joined by > segments which do not belong to the curve. Your parametric plot still > have this problem unsolved. >
|
Pages: 1 Prev: syntax extension Next: Differential Eq. |