Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

variable size of particle set objects? post and replies

Return to the variable size of particle set objects? thread
Login to post to this thread

variable size of particle test objects? - Mar 6, 2012 at 5:24PM
David Joiner
3 Posts

Is it possible to use an array for the size of individual objects in a particle set in the 2-D drawing pane?

I'm creating a model of an n-body simulation with collisions, and would like to have merged objects appear larger based on their mass.


Replies to variable size of particle test objects?

Re: variable size of particle test objects? - Mar 06 2012 5:46PM
Francisco Esquembre
128 Posts

Yes, it is. Just link the Size X and Size Y properties to an array of doubles, each with the size for the corresponding object on the set. Then change the size programmatically to whatever you want.
That should do it.
Paco



The OSP Network:
Open Source Physics - Tracker - EJS Modeling
Physlet Physics
Physlet Quantum Physics