Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

how to rotate about an axis say axisY in code example WaveMachine.ejs post and replies

Return to the how to rotate about an axis say axisY in code example WaveMachine.ejs thread
Login to post to this thread

how to rotate about an axis say axisY in code example WaveMachine.ejs ? - Aug 14, 2012 at 11:38AM
lookang Avatar
lookang
118 Posts

how to rotate about an axis say axisY in code example WaveMachine.ejs found here http://www.compadre.org/osp/items/detail.cfm?ID=10481 ?

attached is my attempt to create drawings of masses on the tip of the rods but i can seem to get the codes right for rotating about the Y axis.

referring to http://fem.um.es/Javadoc/OSP_EJS/org/opensourcephysics/numerics/Matrix3DTransformation.html#rotation%28double,%20double[]%29

i tried rotationsYaxis[i] = Matrix3DTransformation.rotation(theta[i],axisY);

and other permutations of codes but just could not get the masses to rotate as if they were attached on the tips of the rods.

the reason i need this is to create situations similar to http://www.nationalstemcentre.org.uk/elibrary/resource/2096/wave-machine/
to illustrate wave speed through different medium

thanks!

Attached File: ejs_WaveMachinewee.zip


http://weelookang.blogspot.sg

Replies to how to rotate about an axis say axisY in code example WaveMachine.ejs ?

Re: how to rotate about an axis say axisY in code example WaveMachine.ejs ? - Aug 29 2012 2:23AM
lookang Avatar
lookang
118 Posts

i have solved it!
no worries
http://weelookang.blogspot.sg/2012/08/ejs-open-source-wave-machine-model-java.html


http://weelookang.blogspot.sg


The OSP Network:
Open Source Physics - Tracker - EJS Modeling
Physlet Physics
Physlet Quantum Physics