NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/

Easy Java Simulations (2001- ) => Questions related to EJS => Topic started by: lookang on August 22, 2012, 12:27:17 pm



Title: how to transform about an axis a rotation using Matrix3DTransformation ?
Post by: lookang on August 22, 2012, 12:27:17 pm
Hi prof!
according to
http://fem.um.es/Javadoc/OSP_EJS/org/opensourcephysics/numerics/Matrix3DTransformation.html#setOrigin%28double[]%29

i can transform a rotation about an axis of my choice say x,y,z = 0,1,0 meaning y-axis.

i added the codes

i changed i to j for the syntax creating italics in the words
for(int j=0;j<n; j++){

  rotations[j] = Matrix3DTransformation.rotationY(theta[j]);
}

the result is not what i wanted.
(http://www.phy.ntnu.edu.tw/ntnujava/index.php?action=dlattach;topic=2542.0;attach=4928;image)
the sphere i added are rotating about it own axis, i want them rotate the coordinate system X,Y,Z


i wish to make the sphere move as if they were connected to the rectangle shapes
like in the video
http://www.nationalstemcentre.org.uk/elibrary/resource/2096/wave-machine/
(http://www.phy.ntnu.edu.tw/ntnujava/index.php?action=dlattach;topic=2542.0;attach=4930;image)
no one seems to know as i have posted here a few days back.
http://www.compadre.org/osp/bulletinboard/TDetails.cfm?FID=59&TID=2227&ViewType=2#PID51631

any ideas?
thanks!


Title: Re: how to transform about an axis a rotation using Matrix3DTransformation ?
Post by: Fu-Kwun Hwang on August 22, 2012, 05:27:45 pm
There is a Rotate property for Tex3d GUI element.

Matrix3DTransformation can be  used to transform a know shape object.
To transform the text , information about text is required-however, it is not available.

May be there are some new function in java3D which is possible to do this. However, I do not know.
May be you can ask Paco directly. Sorry! :-(


Title: Re: how to transform about an axis a rotation using Matrix3DTransformation ?
Post by: lookang on August 24, 2012, 03:16:04 pm
done!