APS Excellence in Physics Education Award
November 2019

Science SPORE Prize
November 2011

The Open Source Physics Project is supported by NSF DUE-0442581.
|
how to draw polygon in EJSS models?
post and replies
Return to the how to draw polygon in EJSS models? thread
Login to post to this thread
|
how to draw polygon in EJSS models?
|
 lookang
244 Posts
|
dear EJS community,
how to draw polygon in EJSS models?
previously in EJS, X Data = new double[] {-0.5, 0.5, 0} Y Data = new double[] {0.0, 0.0, 1.0}
but in in EJSS, how do i define the points of the polygon?
Post edited September 24, 2013 at 3:39 AM EST.
Attached File: ejss_src_rockettemplatelookang.zip
OSP@SG blog
OSP@SG Digital Library
|
|
Re: how to draw polygon in EJSS models? -
|
Francisco Esquembre
238 Posts
|
Define a double [3][2] array with the value:
[[-0.5,0.0],[0.5,0.0],[0.0,1.0]]
and then link it to the Points property of the polygon.
Or write the array directly into the Points property (if it is going to be constant).
Paco
|
|
Re: Re: how to draw polygon in EJSS models? -
|

lookang
244 Posts
|
awesome! it works beautifully.
attached is my attempt on Prof Larry's Rocket Model Template.
i will be trying this out with about 10-20 grade 9 students in November 2013 http://www.hillgrovesec.moe.edu.sg/
Wohoo! it will be fun :)
Attached File: ejss_model_rockettemplatelookang.zip
OSP@SG blog
OSP@SG Digital Library
|
|
Re: how to draw polygon in EJSS models? -
|
Wolfgang
195 Posts
|
The Half Atwood Machine JavaScript model uses a polygon.
http://www.compadre.org/osp/items/detail.cfm?ID=12976
|
|