[Gate-users] Rotation of Daughter Volume inside rotated mother volume

Russ, Tom Tom.Russ at medma.uni-heidelberg.de
Wed Dec 18 13:56:44 CET 2019


Hi Étienne,

thank you so much for your support.
You were right, your calculations were correct and I forgot a factor of 2.
In addition, I was trying to rotate the tungsten wire about -90 degree around the y-axis, which I suspect caused an error.
With your positive rotation, everything seems to work out fine.
Again, thank you so much for investing your time for my issue.

No further question, but wouldn't it make sense to add this to the GATE geometry/rotation documentation.
Took me some time to figure out that GATE can't handle two rotation commands and that it always rotates the mother volume after the daughter volumes.
I am not that into GitHub to understand how to make suggestions for documentation changes.
But I guess this can potentially help some people save some time.

Thank you and happy holidays to all,
Tom


----------------------------------------------------------------------

Message: 1
Date: Tue, 17 Dec 2019 15:40:23 +0000
From: Etienne Auger < Etienne.Auger at USherbrooke.ca Etienne.Auger at USherbrooke.ca >
To: "gate-users at lists.opengatecollaboration.org"
	<gate-users at lists.opengatecollaboration.org>
Subject: [Gate-users] Rotation of Daughter Volume inside rotated
	mother	volume
Message-ID:
	<YTOPR0101MB10172BFAF523156E30A9BCB283510 at YTOPR0101MB1017.CANPRD01.PROD.OUTLOOK.COM>
	
Content-Type: text/plain; charset="iso-8859-1"

Hello Tom,

First of all, your two assumptions are correct I think.

So both the WaterCylinder and the TungstenWire start along the z axis before any rotations are applied to any of them. Now, as you said, the daughter (TungstenWire) is rotated alone before its mother (WaterCylinder) gets also rotated, but with its daughters following the same rotation (mother and daughters move together).

Basically, the TungstenWire (parallel to the z axis at the beginning) has to rotate 0 deg around x axis, 90 deg around y axis and 23 deg around z axis. So now, it is parallel to the x-y plane and has an angle of 23 deg with respect to the x axis.

Finally, when the WaterCylinder gets rotated of 90 deg around its y axis, the Tungsten Wire follows and becomes parallel to the y-z plane, and everything is oriented as you wished, I think.

So I've redone the calculations for the rotation (axis and angle) that the TungstenWire has to do before being rotated with the WaterCylinder, and I get these values:

/gate/TungstenWire/placement/setRotationAxis -0.3907  1.921  0.3907 /gate/TungstenWire/placement/setRotationAngle 92.28 deg

As you can see, we have the same angle value, but the axis values I get are two times yours, plus the sign is opposite. It is hard to tell where your calculations went wrong, but rotations are always tricky to conceptualize I find.

Therefore, I have attached the small python script (.txt extension because Outlook would not let me send a .py) that I used to generate these values, so you can see for yourself what I did, and maybe reuse it later.

Do not hesitate if you have any questions,

Étienne


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20191217/3b1191a5/attachment-0001.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rotation.txt
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20191217/3b1191a5/attachment-0001.txt>

------------------------------


More information about the Gate-users mailing list