Interaction with CindyLabInteraction with CindyLabThe simulation environment:
|
Name | Writeable | Type | Purpose |
friction | yes | real | total friction of the simulation |
gravity | yes | real | total gravity of the simulation |
kinetic | no | real | total kinetic energy of the simulation |
ke | no | real | total kinetic energy of the simulation |
potential | no | real | total potential energy of the simulation |
pe | no | real | total potential energy of the simulation |
addforce(<mass>,<vec>)
<vec>
to an existing mass <mass>
. This operator is useful to implement user defined force fields. It should be called in the Integration Tick
slot.setforce(<mass>,<vec>)
<vec>
for an existing mass <mass>
. This operator is very useful to implement user defined force fields. It should be called in the Integration Tick
slot.force(<vector>)
force
is closely related to physics simulations in CindyLab. It can be used for testing the force that would affect a mass particle at a specific position. The vector <vector>
represents the position. The operator returns a two-dimensional vector that is the force at this position. If no modifiers are used, the operator assumes that the probe particle has mass=1
, charge=1
and radius=1
(see Free Mass).drawforces
operator and a color plot of the force
operator. It shows the force field and force strength of the electrostatic field of two charges.A.charge=(|C,G|-3)*3; B.charge=(|E,H|-3)*3; f(x):=max((0,min([x,1]))); colorplot([0.1,0.1,0.1]+hue(f(abs(force(#)/3))),(-10,-10),(20,10)); drawforces(stream->true,move->0.2,color->[0,0,0],resolution->10);
force([0,0],charge->2)
tests the force that would be present for a particle of charge=2
, mass=0
, and radius=0
at point [0,0]
.
Contributors to this page: Wurster
,
Richter
and
Kortenkamp
.
Page last modified on Thursday 10 of July, 2014 [08:18:13 UTC] by Wurster.
The content on this page is licensed under the terms of the License.