Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

Re: Drawing multiple curves with ParametricPlot3D



Hi Volker,


> 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. 

No surprise, suppose You had dsol=NDSolve[some equations ...]

the command

ParametricPlot3D[
     Evaluate[{{r1x[t],r1y[t],r1z[t]},
               {r2x[t],r2y[t],r2z[t]}}/.Flatten[dsol]],{t,0,dt}]

works.

NDSolve ives You a List[] of solutions so that in the case of more than
one solution x /. {{x->xs1},{x->xs2}} gives You a list of {xs1,xs2}. So
You must flatten out the output of NDSolve. Second Evaluate[] is needed
for the whole first argument -- so that the pattern matching for 
ParametricPlot3D[] can go to the case for more than one curve.

Hope that helps.

Jens



  • Prev by Date: Assignment to a block inside a matrix
  • Next by Date: Re: ParametricPlot3D Question
  • Prev by thread: Drawing multiple curves with ParametricPlot3D
  • Next by thread: Re: Drawing multiple curves with ParametricPlot3D