Re: Drawing multiple curves with ParametricPlot3D
- To: mathgroup@smc.vnet.net
- Subject: [mg10622] Re: Drawing multiple curves with ParametricPlot3D
- From: Allan Hayes <hay@haystack.demon.co.uk>
- Date: Tue, 27 Jan 1998 03:09:49 -0500
- References: <6a1nmo$ptq@smc.vnet.net>
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