APS Excellence in Physics Education Award
November 2019

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 ?
lookang Avatar
lookang
244 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


OSP@SG blog
OSP@SG Digital Library

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 ? -
lookang Avatar
lookang
244 Posts

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


OSP@SG blog
OSP@SG Digital Library


OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book