Re: Plotting a curve in space
- To: mathgroup at christensen.cybernetics.net
- Subject: [mg1931] Re: Plotting a curve in space
- From: el at qua.crl.melco.co.jp (E. Lange)
- Date: Wed, 23 Aug 1995 22:31:42 -0400
> 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