Message: Re: rotation of volume obout global origin rather than local origin Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Ok Re: rotation of volume obout global origin rather than local origin 

Forum: Geometry
Re: None rotation of volume obout global origin rather than local origin (Greg Thom)
Re: None Re: rotation of volume obout global origin rather than local origin (Greg Thom)
Date: 24 Oct, 2017
From: Michael H. Kelsey <Michael H. Kelsey>

On Mon, 23 Oct 2017 19:04:44 GMT, Greg Thom wrote:
> After giving it some thought, I solved with it with calculating the
> translation needed after applying the rotation about the local center.
> 
> /control/multiply ZSinGantryAngle {GantryZPlacement} {SineGantryAngle}
> /control/multiply ZCosGantryAngle {GantryZPlacement} {CosineGantryAngle}
> 
> /gate/linac_gantry/placement/setTranslation {ZSinGantryAngle} 0 {ZCosGantryAngle} mm 
> /gate/linac_gantry/placement/setRotationAxis 0 1 0
> # /gate/linac_gantry/placement/setRotationAngle {GantryAngle} deg

Ah. You didn't mention that you were using an external package (GATE), or that you needed to do this in macros rather than in C++ code :-)

I'm glad that you were able to solve it. The macro-level math is awkward to use, even under the best of circumstances!

   -- Michael Kelsey

 Add Message Add Message
to: "Re: rotation of volume obout global origin rather than local origin"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]