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

Home » Public Forums » archive » Need help in Volume manipulation
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
Need help in Volume manipulation [message #48422] Sat, 15 April 2006 06:41 Go to next message
Alvin Das is currently offline  Alvin Das
Messages: 6
Registered: November 2005
Junior Member
Hi group,
I have a 3D-array filled with an 3D object. I want to rotate the object
within the array about an arbitrary line say, y=2x=3. Currently I am
rotating the object by rotating each plane of the array, for example I did:

for i=0, xside-1 do cube[i,*,*]=ROT(cube[i,*,*],45)

to rotate the object by 45 degrees. At this stage I want to rotate the
object about the line y=-x, but don't know how to do that. Any ideas?

Alvin
Re: Need help in Volume manipulation [message #48491 is a reply to message #48422] Thu, 20 April 2006 08:36 Go to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
Alvin Das wrote:

> I have a 3D-array filled with an 3D object. I want to rotate the object
> within the array about an arbitrary line say, y=2x=3. Currently I am
> rotating the object by rotating each plane of the array, for example I did:
>
> for i=0, xside-1 do cube[i,*,*]=ROT(cube[i,*,*],45)
>
> to rotate the object by 45 degrees. At this stage I want to rotate the
> object about the line y=-x, but don't know how to do that. Any ideas?

Why do you need to transform your data in data space? It is trivial to
do it in visualization space using /T3D or IDLgrModel transforms.

If you really need to do it the hard way, without checking the
literature I would suggest converting the indices of your 3d cube into a
3xN array and transform that (using VERT_T3D or IDLgrModel). Then you
would have to associate your intensity values with the transformed index
locations and use them to interpolate values back into your 3d array.

There have to be better ways of doing this though. I would use your
favorite web search tool to find an algorithm for doing this in the 2d
case (i.e. ROT) and go from there.

-Rick
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Input/Output, C++ to IDL, using Procedures
Next Topic: Can't load a color table

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

Current Time: Wed Oct 08 19:54:08 PDT 2025

Total time taken to generate the page: 0.00661 seconds