[Fixed]2.0.2b14 Undo-ing changes vel/angvel
Posted: Thu Mar 29, 2012 5:40 am
Edit: (by tatt61880 on 2012.05.13 21:26)
Fixed in 2.0.2b15. Thanks
-Tatt
----
NOTE: Please read my self-response, at first: Re: 2.0.2b14 Undo-ing changes vel/angvel.
Since Phun v5.28 or earlier.
When you undo, vel of Geoms will be changed under certain conditions.
This issue can be one of the cause of non-deterministic/randomness.
I consider that there are several conditions that can cause this issue.
* There is a small digit in vel and angvel (0.0000000003, 1.0000000003 etc.).
* Two or more Geoms are glued or fixated together.
* Other conditions of this issue aren't confirmed.
The scene below will reproduce this issue perfectly(100%).
[scene]61642[/scene]
The code below is what I wrote for bug report.
// When you set angvel := 0, this issue won't happen.
== How to reproduce bug ==
When you opened the scene,
vel := [1.0000000, -3.7617631e-011]; // blue one
vel := [1.0000000, 3.7617631e-011]; // red one
angvel := 1.5047052e-010;
(NOTE: When I open the scene, it sometimes says vel = [1.0000000, -3.7617603e-011] (instead of [1.0000000, -3.7617631e-011]), and angvel = 1.5047041e-010. I cannot reproduce the issue.... Maybe another bug?)
Sim start and Undo.
Then, the vel and angvel will be changed.
vel := [1.0000000, 2.9481001e-011]; // red one
angvel := 1.1792400e-010;
== Survey results ==
Surprisingly, this change is not random.
The plot below shows the relation between #trials and vel/angvel : exponentially decrease.
i.e. vel = first_vel * (second_vel/first_vel)^(#undo).
math.abs(vel(1)) // 10 trials
angvel // 10 trials
Fixed in 2.0.2b15. Thanks
-Tatt
----
NOTE: Please read my self-response, at first: Re: 2.0.2b14 Undo-ing changes vel/angvel.
Since Phun v5.28 or earlier.
When you undo, vel of Geoms will be changed under certain conditions.
This issue can be one of the cause of non-deterministic/randomness.
I consider that there are several conditions that can cause this issue.
* There is a small digit in vel and angvel (0.0000000003, 1.0000000003 etc.).
* Two or more Geoms are glued or fixated together.
* Other conditions of this issue aren't confirmed.
The scene below will reproduce this issue perfectly(100%).
[scene]61642[/scene]
The code below is what I wrote for bug report.
// When you set angvel := 0, this issue won't happen.
- Code: Select all
Scene.Clear;
Scene.addPolygon {
color := [0, 0, 1, 1]; /* blue */
surfaces := [[[0.0, 0.0], [1.0, 0.0], [1.0, 1.0]]];
entityID := 1;
geomID := 1;
pos := [0.0, 0.0];
body := 1;
vel := [1.0000000003, 0.0];
angvel := 0.0000000003
};
Scene.addPolygon {
color := [1, 0, 0, 1]; /* red */
surfaces := [[[0.0, 0.0], [1.0, 0.0], [1.0, 1.0]]];
entityID := 2;
geomID := 2;
pos := [0.5, 0.3];
body := 1;
vel := [1.0000000005, 0.0];
angvel := 0.0000000003
};
== How to reproduce bug ==
When you opened the scene,
vel := [1.0000000, -3.7617631e-011]; // blue one
vel := [1.0000000, 3.7617631e-011]; // red one
angvel := 1.5047052e-010;
(NOTE: When I open the scene, it sometimes says vel = [1.0000000, -3.7617603e-011] (instead of [1.0000000, -3.7617631e-011]), and angvel = 1.5047041e-010. I cannot reproduce the issue.... Maybe another bug?)
Sim start and Undo.
Then, the vel and angvel will be changed.
vel := [1.0000000, 2.9481001e-011]; // red one
angvel := 1.1792400e-010;
== Survey results ==
Surprisingly, this change is not random.
The plot below shows the relation between #trials and vel/angvel : exponentially decrease.
i.e. vel = first_vel * (second_vel/first_vel)^(#undo).
math.abs(vel(1)) // 10 trials
- Code: Select all
3.7617631e-011
2.9481001e-011
2.3104324e-011
1.8106849e-011
1.4190343e-011
1.1121021e-011
8.7154728e-012
6.8303696e-012
5.3529403e-012
4.1951165e-012
angvel // 10 trials
- Code: Select all
1.5047052e-010
1.1792400e-010
9.2417296e-011
7.2427397e-011
5.6761373e-011
4.4484083e-011
3.4861891e-011
2.7321478e-011
2.1411761e-011
1.6780466e-011