how to rotate about an axis say axisY in code example WaveMachine.ejs
Return to the OSP Programming forum
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
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
Attached File: ejs_WaveMachinewee.zip