MathGroup Archive 1994

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

Search the Archive

Re: Question in ParametricPlot

  • To: MathGroup at
  • Subject: [mg249] Re: [mg227] Question in ParametricPlot
  • From: Lou Talman <me at>
  • Date: Tue, 29 Nov 94 09:44:36 -0700

The algorithm that Mathematica uses to generate plots is described in a  
number of places; I know of no way short of duplicating that algorithm  
explicitly to get one's hands on the list {t1, t2, ...} of values of the  
independent variable that Mathematica actually generates in a  
"ParametricPlot".  However, one can easily do something that's very close.
Instead of 

  MyPlot = ParametricPlot[{x[t], y[t]}, {t, tmin, tmax}, opts]

use "ParametricPlot3D".

  MyNonPlot = ParametricPlot3D[{t, x[t], y[t]}, {t, tmin, tmax}, 

                     opts, DisplayFunction -> Identity]

Then use Mathematica's list-handling facilities to strip off all
the stuff except for the values of t that this instruction generates:

  tValues = Nest[Map[First, #]&, First[MyNonPlot], 3]

The nested "First"'s unfortunately strip off the last of the t-values--but  
we know what the last one has to be and we can use "AppendTo" to put it 

where it belongs:  

  AppendTo[tValues, N[tmax]]

One should not expect this to generate *exactly* the list of t-values that  

"ParametricPlot" actually uses, but it should be a good substitute.

Begin forwarded message:

Date: Wed, 23 Nov 1994 03:12:33 -0800 (PST)
From: Xah Y Lee  <xyl10060 at>
Subject: [mg227] Question in ParametricPlot
To: mathgroup at
Content-Length: 0

Here is a problem I have that calls for knowing the internal algorithm 

used for ParametricPlot. When we do a ParametricPlot, mma automatically 

figures out which t to use to produce a smooth curve. I need the list of 

t(s) used. Is there a way to get them?

I know I can get a list of points {{x[t1],y[t1]}, {x[t2], y[t2]},...} by 

 someplot = ParametricPlot[....];

 Cases[ someplot, _Line,Infinity ] [[1]]

and solve for t, but this would be very inpractical. I am writing a 

series of animation generating functions on special plane curves. With 

the list of t, I can be much flexible and powerful in writing my 

programs. What I want is to have mma figure out the t(s) needed to make a 

smooth curve then pass them to my ploting program.

Thanks for any help.

 Xah Lee
 Permament email: 74631.731 at
 good till December 10: xyl10060 at
 Phone: 415-965-1454
 Mountain View, CA 

  • Prev by Date: Problems with MeshRange in ListContourPlot3D: THE FIX
  • Next by Date: Re: ListContourPlot for irregular sampling
  • Previous by thread: Question in ParametricPlot
  • Next by thread: Re: Question in ParametricPlot