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.

more drawables? post and replies

Return to the more drawables? thread
Login to post to this thread

how can I add more drawings to my simulation
Javier Mas
5 Posts

I'm currently programming the twin paradox simulation. I would like to add a rocket, and/or a couple of twins. Is there a way to insert them in the simulation if I have them as, say, a jpeg file? Or, else, are the more libraries of drawables? Thanks a lot


Replies to how can I add more drawings to my simulation

Re: how can I add more drawings to my simulation -
Francisco Esquembre
228 Posts

Sure.

1.- Open the simulation with EJS,

2.- in the View panel, add an Image element (2D or 3D depending on the number of dimensions of your drawing panel, I guess it is 2D for this simulation)

3.- Set the "Image file" property of the Image element to the JPEG file you want to display. The file must be located (copy it) to the same directory of your EJS model file (or in a subdirectory of it).

4.- Use it according to your model

Paco



Re: Re: how can I add more drawings to my simulation -
Javier Mas
5 Posts

how cool, thanks!



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