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.

using perspective and perspective_origin in ejss 6.0 to recreate a drawing from ejss5

Return to the EJS Modeling forum
Login to post to this thread

Updating a 3d picture from ejss5 to ejss6
Paul DeYoung
100 Posts

The included zip file contains two pictures 3d-ejss5.png and 3d-ejss6.png.  The zip file also contains the files from exporting the javascript simulation that made the second picture.  I would like the stripped_down.ejss simulation to reproduce the way the 3d-ejss5 picture looks.  The code to make the older one included an option on the 3d drawing panel that allowed one to specific the location of the camera viewing the 3d object.  This option is not present in the ejss6.   I tried in the attached simulation to accomplish this with css code.  Specifically I tried perspective and perspective_origin in the css field of the 3d panel but even though the simulation showed no errors, the display did not change in any way.  This website (https://3dtransforms.desandro.com/perspective) has an example near the bottom that does what I want but I have failed to figure out how to do this in EJSS.

Thanks for any and all help




(ps. using css code to transform, did change the display but it basically this only change the display as if it was flat.  If you specify a rotation of 90 degrees in about the y axis, the picture disappears because you are looking edge on to the flattened 3d picture.)

Attached File: stripped_down.zip


Paul A. DeYoung

Current Replies - View all
Re: Updating a 3d picture...   (Paul DeYoung - )
Re: Updating a 3d picture...   (Francisco Esquembre - )
OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book