MathGroup Archive 1995

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

Search the Archive

Re: Plotting a curve in space


> Hi -- I'd like to plot the orbit of a satellite which has
> been calculated by numerical integration. The data is basically
> an array of time (equally spaced) and Cartesian position
> coordinates x, y, and z.
...

Lets assume that you have some data points:

points = Table[{Sin[x], Cos[x], x/20}, {x, 0., 20, .2}];

Then you can try

Show[Graphics3D[Line[points]]]

For obtaining a smoother (or coarser) curve, you could use
interpolation:

{x, y, z} = Map[ Interpolation, Transpose[points] ]
ParametricPlot3D[{x[t], y[t], z[t]}, {t, 1, Length[points]}]

or (a bit shorter):

f = Interpolation /@ Transpose[points]
ParametricPlot3D[Through[f[t]], {t, 1, Length[points]}]

The option PlotPoints of ParametricPlot3D lets you adjust the
smoothness of the curve (default: PlotPoints->75).

Good luck        ---        Eberhard Lange


  • Prev by Date: Fourier Coefficients
  • Next by Date: Re: Producing eps files
  • Previous by thread: Re: Plotting a curve in space
  • Next by thread: Re: Plotting a curve in space