MathGroup Archive 1998

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

Search the Archive

Re: Drawing multiple curves with ParametricPlot3D



Volker Doerr wrote:

> 
> I want to display two curves from six InterpolatingFunctions
> 
>   {r1x[t], r1y[t], r1z[t], r2x[t], r2y[t], r2z[t]}
> 
> produced with NDSolve. The documentation describes the  usage of
> ParametricPlot3D for displaying one curve:
> 
>   ParametricPlot3D[{fx,fy,fz},{t,tmin,tmax}]
> 
> and this works fine for me:
> 
>   ParametricPlot3D[Evaluate[{r1x[t],r1y[t],r1z[t]}/.%],{t,0,dt}]
> 
> For plotting several objects together,  the documentation says:
> 
>   ParametricPlot3D[{{fx,fy,fz},{gx,gy,gz},...},...]
> 
> but
> 
>   ParametricPlot3D[
>     {Evaluate[{r1x[t],r1y[t],r1z[t]}/.%],
>      Evaluate[{r2x[t],r2y[t],r2z[t]}/.%],{t,0,dt}},{t,0,dt}]
> 
> doesn't work at all. I tried to vary this expression in many (also
> stupid) ways, without any result. What's wrong with it?
> 

Volker: just move the Evaluate outside the list - to be effective in
cancelling the HoldAll attribute, Evaluate must be round the argument
that is being held:

sol =NDSolve[{x'[t] == Cos[t],x[0]==0}, x[t],{t,0,7}];

ParametricPlot3D[Evaluate[{{x[t],x[t]^2,x[t]^3},
		{x[t]^3,x[t]^2,x[t]}}/.sol[[1]]], {t,0,7}];

-- 
Allan Hayes
Training and Consulting
Leicester, UK
hay@haystack.demon.co.uk
http://www.haystack.demon.co.uk
voice: +44 (0)116 271 4198
fax: +44 (0)116 271 8642




  • Prev by Date: Re: iterative function query
  • Next by Date: Re: Year 2000 and Mathematica
  • Prev by thread: Re: Drawing multiple curves with ParametricPlot3D
  • Next by thread: ParametricPlot3D Question