Re: Plotting a curve in space
- To: mathgroup at christensen.cybernetics.net
 - Subject: [mg1944] Re: Plotting a curve in space
 - From: pehowland at taz.dra.hmg.gb ()
 - Date: Sat, 26 Aug 1995 00:08:32 -0400
 - Organization: Defence Research Agency
 
In article <DDDr8w.B4r at wri.com>, luke at boombox.arc.nasa.gov (Luke Dones) writes:
|>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. So far I've just been plotting xy and
|>xz projections of the data with a canned package for 2-D graphics.
|>
|>It seemed that Mathematica (which I'm not very familiar with)
|>should be able to plot the orbit in 3 dimensions. But none of
|>the routines mentioned in Wolfram's book seem to do exactly what 
|>I want. The output I want would look something like the curve in
|>3-dimensions produced by ParametricPlot3D, except that I don't have
|>an explicit form for x, y, and z as a function of time.
Luke - it seems you want to plot 4D data, ie. coordinates of the
form {time,x,y,z}, which obviously isn't easy!  However, if you
can live with just plotting the satellite's Cartesian coordinates,
then what you want is easily achievable.
First of all generate a list of your Cartesian coordinates of the
form:
	data = {{x1,y1,z1}, {x2,y2,z2}, ..., {xn,yn,zn}}
and then load in the standard package Graphics`Graphics3D` as
follows:
	<<Graphics`Graphics3D`
then simply use
	
	ScatterPlot3D[data]
or	ScatterPlot3D[data, PlotJoined->True]
to display your satellite's track.
If you are very keen you could then use the graphics primitive 
Text[expr, {x,y,z}] in order to label each point with the time 
coordinate - see P.470 of "the book" for examples of using this.
Hope this helps,
Paul Howland
Defence Research Agency
UK.