MathGroup Archive 1997

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: ParametricPlot Remark

  • To: mathgroup at smc.vnet.net
  • Subject: [mg7199] Re: [mg7177] ParametricPlot Remark
  • From: Richard Gass <gass at physics.uc.edu>
  • Date: Fri, 16 May 1997 02:30:28 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

 Andrei wrote
> Hellow !
>
> ... so I just remarked a pretty unusual thing with ParametricPlot / 3D ,
> and theirs Automatic PlotPoints number !
>
> So lets resume:
>
>  ParametricPlot  - works fine giving nice smooth courbes ,
>
> wether
>
> ParametricPlot3D - samples largely giving a pretty zigzag form !
>
> SURE , I can be fitted by hand, ... and I did it ! But does someone
> understand why this happens ?
>
> You have bellow a sample program of the Lorenz Equations in order to
> test it !
>
>  Have fun !
>
>   a + andrei
>
> s = 10;
> b = 8/3;
> r = 167;
>
> tmax = 10;
>
> eq = {
>	x'[t] == s ( y[t] - x[t] ),
>        y'[t] == r x[t] - y[t] - x[t] z[t],
>	z'[t] == - b z[t] + x[t] y[t],
>	x[0] == 0,
>	y[0] == 1,
>	z[0] == 0
> 	}
>
> sol = NDSolve[ eq, {x,y,z} , {t, 0, tmax},
>	MaxSteps -> 5000, StartingStepSize -> 0.001]
>
> ParametricPlot3D[ Evaluate[{x[t], y[t], z[t]} /. sol[[1]] ], {t,0,tmax},
>	PlotRange -> All  ]
> ParametricPlot[ Evaluate[{z[t], x[t]} /. sol[[1]] ], {t,0,tmax} ,
>	PlotRange -> All ]
> ParametricPlot[ Evaluate[{z[t], y[t]} /. sol[[1]] ], {t,0,tmax} ,
>	PlotRange -> All ]
> ParametricPlot[ Evaluate[{x[t], y[t]} /. sol[[1]] ], {t,0,tmax} ,
>	PlotRange -> All ]
>


 Andrei,
 ParametricPlot use an adaptive sampling algorithm and thus manages to
produce a  smooth plot most of the time (although you can see a few sharp
bends in the result of  ParametricPlot[ Evaluate[{z[t], y[t]} /. sol[[1]]
], {t,0,tmax} ,
	PlotRange -> All ]. Although PlotPoints has been set to 25
ParametricPlot sub-divides the intervals between these sampled points if
necessary.

 ParametricPlot3D simply plot an n x n grid where n is the number that
PlotPoints is set to.


Richard Gass
Department of Physics
University of Cincinnati
Cincinnati, OH 45221
phone- 513-556-0519
E-Mail gass at physunc.uc.edu




  • Prev by Date: Re: Smoothing vs. Fitting Splines
  • Next by Date: Re: Re: GUI for Mma
  • Previous by thread: Re: ParametricPlot Remark
  • Next by thread: Pentium bugs vs. Mathematica