<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>
<!--
.hmmessage p
{margin:0px;
padding:0px}
body.hmmessage
{font-size:12pt;
font-family:Calibri}
-->
</style><style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1" class="hmmessage">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">I don't think it acts as a boolean, think of it as a vector that defines the axis about which the object is rotated. i.e. 1 0 0 for rotation in the yz plane, about the x axis.<br>
<br>
There's never a need to rotate something three times in succession. The math is a bit tedious, but you can always reduce a series of rotations to a single rotation about some axis. I don't know it well enough to explain, but Google "Euler's rotation theorum."<br>
<br>
If I understand correctly the rotation is only applied once in GATE, (if you call setRotationAxis or setRotationAngle a second time it just overwrites the first) so you'd need to work out the equivalent rotation axis and angle for the series of rotations you
wish to apply. You can't build up rotations without creating daughter volumes as you've done.<br>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div class="BodyFragment"><font size="2"><span style="font-size:10pt">
<div class="PlainText">Jared STRYDHORST<br>
<br>
<span lang="fr">
<div style="margin:0"><font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><font face="Cambria,serif" size="2"><span style="font-size:10pt">Laboratoire Imagerie Moléculaire In Vivo (IMIV)</span></font><font face="Cambria,serif" size="2"><span style="font-size:10pt"><br>
UMR 1023 Inserm/CEA/Université Paris Sud - ERL 9218 CNRS</span></font></span></font></div>
<div style="margin:0"><font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><font face="Cambria,serif" size="2"><span style="font-size:10pt">CEA/I2BM/Service Hospitalier Frédéric Joliot</span></font></span></font></div>
<div style="margin:0"><font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><font face="Cambria,serif" size="2"><span style="font-size:10pt">4, place du Général Leclerc</span></font><font face="Cambria,serif" size="2"><span style="font-size:10pt"><br>
91401 ORSAY Cedex</span></font><font face="Cambria,serif" size="2"><span style="font-size:10pt"><br>
</span></font><font face="Cambria,serif" size="2"><span style="font-size:10pt"></span></font><font face="Cambria,serif" size="2"><span style="font-size:10pt"><br>
</span></font><a href="mailto:karima.ait-aissa@cea.fr" target="_blank"><font face="Cambria,serif" size="2"><span style="font-size:10pt"></span></font></a></span></font></div>
<div style="margin:0"><font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><a href="http://i2bm.cea.fr/dsv/i2bm/shfj/imiv" target="_blank"><font face="Cambria,serif" size="2"><span style="font-size:10pt">http://i2bm.cea.fr/dsv/i2bm/shfj/imiv</span></font></a></span></font></div>
</span></div>
</span></font></div>
</div>
</div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF940541"><font color="#000000" face="Tahoma" size="2"><b>De :</b> gate-users-bounces@lists.opengatecollaboration.org [gate-users-bounces@lists.opengatecollaboration.org] de la part de Matt D [edw.d@outlook.fr]<br>
<b>Envoyé :</b> mardi 23 février 2016 16:36<br>
<b>À :</b> gate-users@lists.opengatecollaboration.org<br>
<b>Objet :</b> [Gate-users] Volume rotation along x, y and z different for each axis<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr"><br style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">
Dear Gaters,
<div><br>
</div>
<div>I have difficulties rotating my volume as I want.</div>
<div><br>
</div>
<div>I've searched in previous mails from the mailing list and I saw that I was not alone !</div>
<div><br>
</div>
<div><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">From: Kesava S Kalluri <</span><a href="mailto:kkalluri@lsu.edu" style="color:rgb(17,85,204); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)" target="_blank">kkalluri@lsu.edu</a><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">></span></div>
<div><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)"><br>
</span></div>
<div><i><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">"hi,</span><br style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">
</i></div>
<div>
<div><i><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">/</span><span class="il" style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">gate</span><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">/cylinder/placement/</span><wbr style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)"><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">enable</span><br style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">
<span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">/</span><span class="il" style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">gate</span><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">/cylinder/placement/</span><wbr style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)"><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">setRotationAxis
-0.571 0.571 0.571 #(1/sqrt(3))</span><br style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">
<span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">/</span><span class="il" style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">gate</span><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">/cylinder/placement/</span><wbr style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)"><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">setRotationAngle
45 deg</span><br style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">
<span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">/</span><span class="il" style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">gate</span><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">/cylinder/placement/</span><wbr style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)"><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">setTranslation
1 1 1 cm</span><br style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">
</i></div>
</div>
<div><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)"><i><br>
</i></span></div>
<div><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)"><i>Following up with a previous thread, I was able to orient it @ 45* to each axis using these commands. Now I would like to orient the
cylinder at 3 different angles with respect to each axis . Any ideas?"</i></span></div>
<div><br>
</div>
<div><br>
<br>
First I've discovered that setRotationAxis acts as a boolean, so no need to put anything esle than 0 or 1.</div>
<div><br>
</div>
<div>So for example if I want to rotate my_volume 35° in both the x and y plan I would write :</div>
<div><br>
</div>
<div>/gate/my_volume/setRotationAxis 1 1 0</div>
<div>/gate/my_volume/setRotationAngle 35 deg</div>
<div><br>
</div>
<div>So that's all working fine, but now what if I want to rotate my volume, let's say, 10° in the x plan, 20° in the y and 30<span style="font-size:12pt">°</span><span style="font-size:12pt"> in the z ?</span></div>
<div><br>
</div>
<div>If anyone has an answer to that, i'm ready to ship a mars bar !</div>
<div><br>
</div>
<div>I thought about a possible solution which is to:</div>
<div>- rotate a volume in one plan</div>
<div>- create a daughter to this volume (benefiting from the initial rotation) and rotate it in another plan</div>
<div>- create a third grand-daughter volume and rotate in the last plan if needed</div>
<div><br>
</div>
<div>But first, it seems crazy complicated to do something that I'm sure is really simple (and I'm too dumb to have thought about it), and second, each time I rotate the daughter volume I need to expand the mother volume and I create some dead space where I
cannot put any other volume if I don't want deadly overlapping volumes.</div>
<div><br>
</div>
<div>Any ideas would be much appreciated :)</div>
<div><br>
</div>
<div>Ed<br style="background-color:rgb(255,255,255)">
<br style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">
<br>
<br>
<br style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)">
<div><span style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:12.8px; background-color:rgb(255,255,255)"><br>
</span></div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>