Need help in Volume manipulation [message #48422] |
Sat, 15 April 2006 06:41  |
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  |
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
|
|
|