About Transforms2D Transformations
3D Transformations
![]()
There are three different ways to make a turn. The first one is to turn the element around one axis. This axis can be one of the main axis, X,Y,Z or another one you choose. In the number field you select the angle you want to turn by the element in radians or degrees. The second way is to align one known vector with an other one. And finally, the third way with a quaternion rotation. In all them you can see EJS translate our choices in a string variable.
If we want to make a dinamic transform we will need concatenate this string variables. For example, if I want to turn the element around the Z axis and change the angle used with a previously defined variable ang. Then we have to type in the bottom field “z:”+ang. EJS will use then the JAVA property to concatenate the two strings.
Advanced users can build more complex transforms with the JAVA class org.opensourcephisics.numerics.Trasformation.
|