Re: Volume visualization starting from 2d image [message #60525] |
Mon, 26 May 2008 12:10 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
elias writes:
> I have the following problem I try to solve: I have a 2d image in IDL
> (eg. data=DBLARR(100,60)), along with the position coordinates (eg.
> x=DBLARR(100), y=DBLARR(60)). I create a color coded plot in a 2D
> projection. This 2D image is cylindrically symmetric around the
> vertical axis (y axis) and what I want to try is to "rotate" this
> dataset around the y-axis and create a 3D representation of this
> dataset (not much more information added - just for outreach
> purposes). It should result in a torus formation.
>
> Any idea on how to do this, starting from my current dataset, using
> the volume visualization capabilities of IDL?
In outline form, I would say:
1. Use MESH_OBJ to create a cylinder.
2. Pass the vertices obtained in (1) to IDLgrPolygon
to create a cylindrical polygon structure.
3. Texture map your image onto the polygon. This article
might help: http://www.dfanning.com/ographics_tips/imgtex.html.
4. Display your polygon with XOBJVIEW.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|