Home »
Public Forums »
archive »
Re: Help Plotting Cylinders in 3D
Re: Help Plotting Cylinders in 3D [message #41642] |
Wed, 03 November 2004 16:31 |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
bstone wrote:
> Hello, I am new to IDL and looking for a way to plot data in the form of
> cylinders with coordinates X,Y,Z and radius R. There is also a flag field
> which tells whether the next X,Y,Z coordinate should be connected to the
> previous coordinate (i.e. the previous cylinder connects to the next
> cylinder). The idea is to form a neural or tree like structure out of
> these cylinders with different sizes. How can I get started?
Start with MESH_OBJ. It can create the cylindrical meshes that you are
looking for in a number of ways although it probably will be a bit
restrictive.
You can also Google this group for a thread "a polygon version of
polyline". Check the discussion. Here is a link to the code I posted
in that thread. It's ugly but probably will be easier to use.
http://www.acoustics.washington.edu/~towler/programs/rhtgrtu be__define.pro
And here is a link to a 2nd version that is cleaner but I still have a
minor bug (twisting) I can't squash. If anyone wants to take a look at
it... :)
http://www.acoustics.washington.edu/~towler/programs/rhtgrpo lytube__define.pro
As for connecting cylinders... If individual cylinders are used the
joints will be disconnected. You could throw in a ORB object at the
joints to mask this. You could easily modify my code to accept an array
of radius values which would allow for connected joints but if the
radius values change quickly it will still look goofy.
> I am having some difficulty understanding graphics objects.
> If anyone could provide me with some sample code that would be great!
You may want to invest in Ronn Kling's "Power Graphics with IDL"
available from his website (www.kilvarock.com).
Also, XOBJVIEW is your friend. Using it to view your objects will
eliminate the need to understand views which always seems to trip people
up. Once you get the hang of using grAtoms and models and transforms,
then think about building your own viewing system.
The example code in my objects linked above demonstrates using xobjview.
Have fun.
-Rick
|
|
|
Current Time: Sun Oct 12 00:02:30 PDT 2025
Total time taken to generate the page: 0.02027 seconds