comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Object Graphics: Combine 2d with 3d
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Object Graphics: Combine 2d with 3d [message #40252] Sun, 01 August 2004 17:50 Go to next message
andrew.cool is currently offline  andrew.cool
Messages: 47
Registered: July 2003
Member
Ralf Schaa <schaa@geo.uni-koeln.de> wrote in message news:<cej6fe$70g$1@newsreader2.netcologne.de>...
> Dear all,
>
> actually the mail-subject is not quite correct: I like to plot a
> spacecraft trajectory in 3d, and because it looks so nice :-) I like a
> sphere (a planet ...) in the the middle of the plot.
>
> I already have a set of programs that does it with direct graphics, but
> the programs are very quick and dirty and large and not written by
> myself, so I thougt I do it myself with object graphics ...
>
> On David's website I found the SIMPLE_SURFACE program, from wich I
> started, which means I copied the things I needed into my test program.
>
> Now I have a 3d-Plot with a sphere (Orb-Object) in the middle and it
> looks nice. Before adding a trajectory , I'd like to add some simple
> plottings like a straight line in the xy-plane, or some other plane just
> to see how things work, but that isn't an easy thing to do, is it?
>
> This is what i have done after setting up the sphere in 3d:
>
> ; A plot object
> thisPlot = Obj_New("IDLgrPLOT")
> thisPlotModel = Obj_New('IDLgrModel')
>
> thisPlot->SetProperty,DataX=[0,1],DataY=[0,0]
> thisPlotModel->Add,thisPlot
> objView->Add,thisPlotModel
>
> I wasn't expecting things would look okay right now, but i could not
> find how to manipulate the graph so that it would match in the scene: it
> is always like a 2d curve glued in front of the 3d plot ...
>
> So, how are these kind of things treated ?
>
> Regards,
> Ralf

Hi Ralf,

Have a look at Rick Towler's site, in particular camdemo_lookat.pro,
which has orbs wandering/driven around in 3D :-

http://www.acoustics.washington.edu/~towler/RHTgrCamera.html

I'm an OW, aka Object Wally, but have managed to clothe orbs of
various sizes in actual planet jpeg images, and have the Solar System
dance merrily on my screen.

Hosannas to Rick Towler!

Andrew Cool
DSTO Adelaide South Australia
Re: Object Graphics: Combine 2d with 3d [message #40254 is a reply to message #40252] Sun, 01 August 2004 10:17 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ralf Schaa writes:

> actually the mail-subject is not quite correct: I like to plot a
> spacecraft trajectory in 3d, and because it looks so nice :-) I like a
> sphere (a planet ...) in the the middle of the plot.
>
> I already have a set of programs that does it with direct graphics, but
> the programs are very quick and dirty and large and not written by
> myself, so I thougt I do it myself with object graphics ...
>
> On David's website I found the SIMPLE_SURFACE program, from wich I
> started, which means I copied the things I needed into my test program.
>
> Now I have a 3d-Plot with a sphere (Orb-Object) in the middle and it
> looks nice. Before adding a trajectory , I'd like to add some simple
> plottings like a straight line in the xy-plane, or some other plane just
> to see how things work, but that isn't an easy thing to do, is it?
>
> This is what i have done after setting up the sphere in 3d:
>
> ; A plot object
> thisPlot = Obj_New("IDLgrPLOT")
> thisPlotModel = Obj_New('IDLgrModel')
>
> thisPlot->SetProperty,DataX=[0,1],DataY=[0,0]
> thisPlotModel->Add,thisPlot
> objView->Add,thisPlotModel
>
> I wasn't expecting things would look okay right now, but i could not
> find how to manipulate the graph so that it would match in the scene: it
> is always like a 2d curve glued in front of the 3d plot ...
>
> So, how are these kind of things treated ?

I'm not sure I would have put a *plot* into that graphics
scene. It seems to me your trajectory would be a POLYLINE
(IDLgrPolyline), in which each 3D point of the trajectory
was connected by a line. (Sort of a PLOTS vs. PLOT issue,
but in object graphics.) Just create your polyline object
normally, then scale it into the coordinate system set
up by the Viewplane rectangle and the near and far clipping
planes. You will scale the polyline just like the axes were
scaled in Simple_Surface. (And you probably want to remove
the axes if you haven't already.) That is to say, you
get their current X, Y, and Z range and scale them into
your arbitrary coordinate system. (I use NORMALIZE
to do this.)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Object Graphics: Combine 2d with 3d [message #40309 is a reply to message #40252] Tue, 03 August 2004 08:51 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Andrew Cool writes:

> I'm an OW, aka Object Wally, but have managed to clothe orbs of
> various sizes in actual planet jpeg images, and have the Solar System
> dance merrily on my screen.

What!? And you haven't offered to write an article
for my web page? Shame on you! :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: ...and planet textures ...
Next Topic: Re: ...and planet textures ...

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 14:56:39 PDT 2025

Total time taken to generate the page: 0.00514 seconds