[Gate-users] Volume rotation along x, y and z different for each axis
edw.d at outlook.fr
Wed Feb 24 11:50:37 CET 2016
Thank you very much Jared,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 :)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.I think in practice it should be a bit different :/ Euler's rotation theorem, here I come !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.Thanks again for your answer!Ed
------------------------------Dear Gaters, I have difficulties rotating my volume as I want.I've searched in previous mails from the mailing list and I saw that I was not alone !From: Kesava S Kalluri <kkalluri at lsu.edu>"hi,/gate/cylinder/placement/enable/gate/cylinder/placement/setRotationAxis -0.571 0.571 0.571 #(1/sqrt(3))/gate/cylinder/placement/setRotationAngle 45 deg/gate/cylinder/placement/setTranslation 1 1 1 cmFollowing 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?"First I've discovered that setRotationAxis acts as a boolean, so no need to put anything esle than 0 or 1.So for example if I want to rotate my_volume 35? in both the x and y plan I would write :/gate/my_volume/setRotationAxis 1 1 0/gate/my_volume/setRotationAngle 35 degSo 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 ?If anyone has an answer to that, i'm ready to ship a mars bar !I thought about a possible solution which is to:- rotate a volume in one plan- create a daughter to this volume (benefiting from the initial rotation) and rotate it in another plan- create a third grand-daughter volume and rotate in the last plan if neededBut 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.Any ideas would be much appreciated :)Ed-------------- next part --------------An HTML attachment was scrubbed...URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20160223/33d98ad3/attachment-0001.html>------------------------------Message: 2Date: Tue, 23 Feb 2016 16:13:46 +0000From: STRYDHORST Jared <Jared.STRYDHORST at cea.fr>To: Matt D <edw.d at outlook.fr>,"gate-users at lists.opengatecollaboration.org"<gate-users at lists.opengatecollaboration.org>Subject: Re: [Gate-users] Volume rotation along x, y and z differentfor each axisMessage-ID:<9AB82962C0EE2E49AA2CC04530A29587A624AC at EXDAG0-B0.intra.cea.fr>Content-Type: text/plain; charset="iso-8859-1"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.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."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.Jared STRYDHORSTLaboratoire Imagerie Mol?culaire In Vivo (IMIV)UMR 1023 Inserm/CEA/Universit? Paris Sud - ERL 9218 CNRSCEA/I2BM/Service Hospitalier Fr?d?ric Joliot4, place du G?n?ral Leclerc91401 ORSAY Cedex
-------------- section suivante --------------
Une pi?ce jointe HTML a ?t? nettoy?e...
More information about the Gate-users