The Interactive Geometry Software Cinderella

Forum: Cinderella Support (E)

Forums->Cinderella Support (E)->Unexpected Simulation behavior ?

hembob56
1 stars
Unexpected Simulation behavior ?


Could anyone explain what is going on in the following situation....

Drop a point (A) onto a new view
In Simulation Start enter count=0;
In Timer Tick enter
count=count+1;
message(count);
A.xy=A.xy+0.1,0;

Now when you start the simulation, A moves to the right. If you click on the stop button A moves back to it's starting position. However if you click pause first, then stop, then A stays where it is !

Obervation: clearly the position of A is not absolute as it moves. There must be a stored original position, as on clicking stop first, the original position is "given" back to A.

What implications does this have for moving points in Cindyscript with A.xy=.....
When are these changes absolute, and how are the original coords accessable ?

Thanks
eek

 
on: Sat 22 of Nov, 2008 [20:07 UTC] reads: 107049

Posted messages

author message
Re: Unexpected Simulation behavior ?
on: Tue 02 of Dec, 2008 [09:58 UTC]
hembob56,

this is the expected behavior. When you start a simulation, the original coordinates of all elements are stored. If you stop it, they will be restored. If you pause and then stop, the stored coordinates will be updated to the current ones.

There is no way to access the original coordinates from CindyScript.

Ulli


author message
Re: Re: Unexpected Simulation behavior ?
on: Tue 02 of Dec, 2008 [09:59 UTC]
one additional note - of course, you can store the original coordinates yourself in the simulation start event!





Show posts:
 
Language