Message: Re: Direction of rotation - clockwise or counterclockwise Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Direction of rotation - clockwise or counterclockwise 

Forum: Geometry
Re: Warning Direction of rotation - clockwise or counterclockwise (Patrik Eschle)
Re: None Re: Direction of rotation - clockwise or counterclockwise (michel maire)
Re: None Re: Direction of rotation - clockwise or counterclockwise (Patrik Eschle)
Date: 02 Apr, 2015
From: John Allison <John Allison>

I can't let this thread pass without comment.

I don't think there are two conventions. The schemes within Geant4 and CLHEP are the same and consistent.

You comment that in Rotate3D it says, "Function: Create 3D Rotation through angle "a" (counterclockwise)". That is the normal way of viewing things - looking down the axis. Think about it...The normal two-dimensional representation of the x-y plane has the x-axis to the right, the y-axis up. Polar coordinates (r, theta) specify a counter-clockwise rotation theta from the x-axis. In three dimensions, if you are looking at a x-y plane, with the x-axis to the right, the z-axis will be pointing towards you. So a positive rotation will be counter-clockwise. Your picture has the x-axis to the left, so the z-axis points away from you and a positive rotation will appear clockwise, as though you were looking from behind the x-y plane.

>   new G4PVPlacement(transform1, // Rotates clockwise, right hand - ok
>                     fTrdVolume,"Trd", fWorldVolume, false,1);

I agree, this is correct for an object rotation - it is clockwise in your upside-down 3D view.

>   new G4PVPlacement(rm,-shiftX, // Rotates ccw - confusing
>                     fTrdVolume,"Trd", fWorldVolume, false,1);

The header file clearly says that the transformation is applied to the coordinate system, so it will always have an apparent opposite effect.

Personally, like you, I find the former more intuitive.

There is no inconsistency in the definition of transformations, just two constructors that do different things - one rotates the object, the other rotates the coordinate system,

John

 Add Message Add Message
to: "Re: Direction of rotation - clockwise or counterclockwise"

 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 ]