<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><pre style="line-height: 21.3px; white-space: normal; font-family: 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', 'BBAlpha Sans', 'S60 Sans', Arial, sans-serif; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);">Thank you very much Jared,</pre><pre style="line-height: 21.3px; white-space: normal; font-family: 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', 'BBAlpha Sans', 'S60 Sans', Arial, sans-serif; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);"><span style="line-height: 21.3px;">My bad ! You're right, setRotationAxis doesnt use boleans as parameters. I think I tried a specific case and draw conclusions a bit too fast :)</span></pre><pre style="line-height: 21.3px; white-space: normal; font-family: 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', 'BBAlpha Sans', 'S60 Sans', Arial, sans-serif; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);">So now I just need to find a way to easily find the right axis playing with the setRotationAxis parameters and then to apply the wished angle. Seems easy enough written like that.</pre><pre style="line-height: 21.3px; white-space: normal; font-family: 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', 'BBAlpha Sans', 'S60 Sans', Arial, sans-serif; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);"><pre style="line-height: 21.3px; white-space: normal; font-family: 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', 'BBAlpha Sans', 'S60 Sans', Arial, sans-serif;">I think in practice it should be a bit different :/ Euler's rotation theorem, here I come !</pre><pre style="line-height: 21.3px; white-space: normal; font-family: 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', 'BBAlpha Sans', 'S60 Sans', Arial, sans-serif;"><span style="line-height: 21.3px;">As to my previous solution to build daughter volumes and rotate them progressively, it works because the setRotationAxis and setRotationAngle are applied on a new volume each time (the daughter volume inside the initialy rotated volume) ... but it implies creating quite larger mother volumes (compared to the size of the multi-rotated daughter volume) and thus creates some dead space where you cannot define any other volume that you would maybe want to stick close to that rotated volume. So it could work in some cases.</span></pre><pre style="line-height: 21.3px; white-space: normal; font-family: 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', 'BBAlpha Sans', 'S60 Sans', Arial, sans-serif;"><span style="line-height: 21.3px;">Thanks again for your answer!</span></pre><pre style="line-height: 21.3px; white-space: normal; font-family: 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', 'BBAlpha Sans', 'S60 Sans', Arial, sans-serif;"><span style="line-height: 21.3px;">Ed</span></pre></pre><pre style="line-height: 21.3px; white-space: normal; font-family: 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', 'BBAlpha Sans', 'S60 Sans', Arial, sans-serif; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);"><br></pre><pre style="line-height: 21.3px; white-space: normal; font-family: 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', 'BBAlpha Sans', 'S60 Sans', Arial, sans-serif; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);"><pre style="line-height: 21.3px; white-space: normal; font-family: 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', 'BBAlpha Sans', 'S60 Sans', Arial, sans-serif;">------------------------------<br style="line-height: 21.3px;"></pre></pre><pre style="line-height: 21.3px; white-space: normal; font-family: 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', 'BBAlpha Sans', 'S60 Sans', Arial, sans-serif; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);"><i>Dear Gaters, <br style="line-height: 21.3px;">I have difficulties rotating my volume as I want.<br style="line-height: 21.3px;">I've searched in previous mails from the mailing list and I saw that I was not alone !<br style="line-height: 21.3px;">From: Kesava S Kalluri <kkalluri@lsu.edu><br style="line-height: 21.3px;">"hi,</i></pre><pre style="line-height: 21.3px; white-space: normal; font-family: 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', 'BBAlpha Sans', 'S60 Sans', Arial, sans-serif; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);"><i>/gate/cylinder/placement/enable</i></pre><pre style="line-height: 21.3px; white-space: normal; font-family: 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', 'BBAlpha Sans', 'S60 Sans', Arial, sans-serif; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);"><i>/gate/cylinder/placement/setRotationAxis -0.571 0.571 0.571 #(1/sqrt(3))</i></pre><pre style="line-height: 21.3px; white-space: normal; font-family: 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', 'BBAlpha Sans', 'S60 Sans', Arial, sans-serif; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);"><i>/</i><i style="line-height: 21.3px;">gate/cylinder/placement/setRotationAngle 45 deg</i></pre><pre style="line-height: 21.3px; white-space: normal; font-family: 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', 'BBAlpha Sans', 'S60 Sans', Arial, sans-serif; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);"><i style="line-height: 21.3px;">/gate/cylinder/placement/setTranslation 1 1 1 cm</i></pre><pre style="line-height: 21.3px; white-space: normal; font-family: 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', 'BBAlpha Sans', 'S60 Sans', Arial, sans-serif; color: rgb(68, 68, 68); font-size: 15px; 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?"<br style="line-height: 21.3px;"><br style="line-height: 21.3px;"><br style="line-height: 21.3px;">First I've discovered that setRotationAxis acts as a boolean, so no need to put anything esle than 0 or 1.<br style="line-height: 21.3px;">So for example if I want to rotate my_volume 35? in both the x and y plan I would write :<br style="line-height: 21.3px;">/gate/my_volume/setRotationAxis 1 1 0/gate/my_volume/setRotationAngle 35 deg<br style="line-height: 21.3px;">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? in the z ?<br style="line-height: 21.3px;">If anyone has an answer to that, i'm ready to ship a mars bar !<br style="line-height: 21.3px;">I thought about a possible solution which is to:</i></pre><pre style="line-height: 21.3px; white-space: normal; font-family: 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', 'BBAlpha Sans', 'S60 Sans', Arial, sans-serif; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);"><i>- rotate a volume in one plan</i></pre><pre style="line-height: 21.3px; white-space: normal; font-family: 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', 'BBAlpha Sans', 'S60 Sans', Arial, sans-serif; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);"><i>- create a daughter to this volume (benefiting from the initial rotation) and rotate it in another plan</i></pre><pre style="line-height: 21.3px; white-space: normal; font-family: 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', 'BBAlpha Sans', 'S60 Sans', Arial, sans-serif; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);"><i>- create a third grand-daughter volume and rotate in the last plan if needed</i></pre><pre style="line-height: 21.3px; white-space: normal; font-family: 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', 'BBAlpha Sans', 'S60 Sans', Arial, sans-serif; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);"><i><br style="line-height: 21.3px;">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.<br style="line-height: 21.3px;">Any ideas would be much appreciated :)<br style="line-height: 21.3px;">Ed</i><br style="line-height: 21.3px;"><br style="line-height: 21.3px;"><br style="line-height: 21.3px;">-------------- next part --------------<br style="line-height: 21.3px;">An HTML attachment was scrubbed...<br style="line-height: 21.3px;">URL: <<a href="http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20160223/33d98ad3/attachment-0001.html" target="_blank" style="line-height: 21.3px; font-weight: inherit; color: rgb(0, 104, 207); cursor: pointer;">http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20160223/33d98ad3/attachment-0001.html</a>><br style="line-height: 21.3px;"><br style="line-height: 21.3px;">------------------------------<br style="line-height: 21.3px;"><br style="line-height: 21.3px;">Message: 2<br style="line-height: 21.3px;">Date: Tue, 23 Feb 2016 16:13:46 +0000<br style="line-height: 21.3px;">From: STRYDHORST Jared <Jared.STRYDHORST@cea.fr><br style="line-height: 21.3px;">To: Matt D <edw.d@outlook.fr>,<br style="line-height: 21.3px;">"gate-users@lists.opengatecollaboration.org"<br style="line-height: 21.3px;"><gate-users@lists.opengatecollaboration.org><br style="line-height: 21.3px;">Subject: Re: [Gate-users] Volume rotation along x, y and z different<br style="line-height: 21.3px;">for each axis<br style="line-height: 21.3px;">Message-ID:<br style="line-height: 21.3px;"><9AB82962C0EE2E49AA2CC04530A29587A624AC@EXDAG0-B0.intra.cea.fr><br style="line-height: 21.3px;">Content-Type: text/plain; charset="iso-8859-1"<br style="line-height: 21.3px;"><br style="line-height: 21.3px;">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 style="line-height: 21.3px;"><br style="line-height: 21.3px;">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 style="line-height: 21.3px;"><br style="line-height: 21.3px;">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 style="line-height: 21.3px;"><br style="line-height: 21.3px;">Jared STRYDHORST<br style="line-height: 21.3px;"><br style="line-height: 21.3px;">Laboratoire Imagerie Mol?culaire In Vivo (IMIV)<br style="line-height: 21.3px;">UMR 1023 Inserm/CEA/Universit? Paris Sud - ERL 9218 CNRS<br style="line-height: 21.3px;">CEA/I2BM/Service Hospitalier Fr?d?ric Joliot<br style="line-height: 21.3px;">4, place du G?n?ral Leclerc<br style="line-height: 21.3px;">91401 ORSAY Cedex</pre> </div></body>
</html>