order of moving and rotating
Kristian Nielsen
kristian.nielsen at risoe.dk
Mon Jan 18 16:44:06 CET 1999
> Hello,
>
> First of all a happy new year to all of you!
Thanks! I apologize for taking a bit long to answer your question.
> Now the question:
> I'm trying to optimize the angle of a specific mirror in the neutron
> path. From the manual and also the results of the calculations it is not
> quite clear to me, how the mirror is moved and rotated and what the
> reference points are.
Yes, this is a point that can be a bit confusing, and I am planning on
writing a clarification in the next version of the manual.
But if you approach the issue in the right way, it is not at all
complicated. The coordinate system of a component has a position and an
orientation. The position is the spatial location of the reference
point. The orientation is the direction of the axes.
Now, when a component is specified in the instrument definition, it has
an AT and a ROTATED specification. The AT specifies the position and the
ROTATED specifies the orientation.
Thus if component C is AT (x,y,z) relative component A and ROTATED
(v,0,0) relative component B, the reference point of C is at (x,y,z) in
the coordinate system of A and the axes of C are the axes of B rotated
the angle v around the X axis of B.
> Am I right, that any rotation is done after the translation, and that
> the rotation axes are the (not translated) axes of the coordinate system
> defined by the RELATIVE command? Or are only the directions of the
> rotation axis those of the component defined by RELATIVE, but the center
> of rotation now lies at (0,0,0) of the already moved component?
> Thanks for any advice!
The last of your two possibilities describes most precisely what happens
in McStas, I think. I hope the above explanation clarifies the issue. If
not, ask again and I will use your feedback when updating the manual.
A quick remark on the use on the mirror component. Consider building a
guide from four mirrors. The guide entrance and exit are parallel to
the X-Y plane, the guide top and bottom are parallel to the X-Z plane
and the guide left and right sides are parallel to the Y-Z plane. The
mirror component lies in the X-Y plane of the component local coordinate
system. Thus to get the top or bottom, the mirror should be rotated
about the X axis and moved up or down. To get the sides, the mirror
should be rotated about the Y axis and moved left or right.
I just finished a much improved version of the graphics display program
for McStas simulations. It is capable of drawing real sketches of
components so that one may see the exact position and orientation of
every component. This will be in the next McStas release (due in March),
and should greatly help understanding the setup of ones instrument.
- Kristian.
More information about the mcstas-users
mailing list