[Gate-users] volume 's multiple rotation

Marc Chamberland mchamber at connect.carleton.ca
Thu Apr 19 04:33:09 CEST 2012


Hi Peter!

You just need to express this axis in function of the original x,y,z coordinate system.

In the command:

/gate/volume_name/placement/setRotationAxis 1 0 0

the numbers (1,0,0) actually represent the rotation axis expressed in the (x,y,z) coordinate system. So if you wanted to rotate around an axis that is at 45 degrees in the x-y plane (and z=0 plane), you would simply use:

/gate/volume_name/placement/setRotationAxis 1 1 0


The only thing I am uncertain of is if the rotation axis needs to be normalized or not. If it needs to be normalized, then you would use:

/gate/volume_name/placement/setRotationAxis 0.707 0.707 0.

I hope this helps!
Marc



__________________________


Marc Chamberland, MSc
PhD candidate
Department of Physics
Carleton University
Ottawa (ON)

Le 2012-04-18 $)A($ 10:18 PM, Peter Si a (&crit :

> Hi Marc,
>  
> That 's a good idea, but how can I implement that oblique axis into Gate?
> Best regards,
>  
> Peter
> 
>  
> Marc Chamberland <mchamber at connect.carleton.ca> $)Al6 2012Dj4TB18HUOBNg11:35 $)GlQg,$)A#:
> Hi Peter!
> 
> I don't think you can do successive rotations in Gate.
> 
> However, successive rotations can be represented by one equivalent rotation angle around one equivalent rotation axis. Find this equivalent rotation angle and equivalent rotation axis and set the angle and axis in Gate to these values.
> 
> You'll need to brush up on linear algebra and rotation matrices for this.
> 
> Good luck!
> Marc
> 
> 
> 
> __________________________
> 
> 
> Marc Chamberland, MSc
> PhD candidate
> Department of Physics
> Carleton University
> Ottawa (ON)
> 
> 
> 
> Le 2012-04-18 $)A($ 11:06 AM, Peter Si a (&crit :
> 
>> Dear all,
>> I am doing a multiple pinhole collimator design and I am wondering if it is
>> possible to rotate a volume in a specific angle. For example, if I want to
>> rotate the geometry by 60 degrees about the x-axis and 45 degrees about the
>> y-axis, if I typed:
>> 
>> /gate/volume_name/placement/setRotationAxis 1 0 0
>> /gate/volume_name/placement/settRotationAngle 60 deg
>> /gate/volume_name/placement/settRotationAxis 0 1 0
>> /gate/volume_name/placement/settRotationAngle 45 deg
>> Gate will only rotate the latest rotation axis and angle, that means the
>> volume will only be rotated by 45 degrees about the y-axis. It seems that
>> Gate can only rotate the geometry in a certain angle about the x,y or z
>> axis or rotate an equivalent angle about this three axis. Is there any
>> method can rotate the geometry in a certain angle such like described
>> before?
>> Best regards,
>> Peter
>> _______________________________________________
>> Gate-users mailing list
>> Gate-users at lists.opengatecollaboration.org
>> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
> 
> 



More information about the Gate-users mailing list