Re: Unit Measures [and other things :)]
Posted: Fri Jul 01, 2011 2:17 pm
by -=Magic=-
I've done some experiments.
Pos: position of the sphere
Vel: Linear Velocity
Ang: Angular Velocity
FixedTimeStep = false; First Try: 1102 Update from start to end
Start Impulse to Entity: MasterOfPool.Ball - Impulse: {X:250 Y:0 Z:0} - Pos: {X:-71 Y:12,86 Z:0} - Vel: {X:0 Y:0 Z:0} - Ang: {X:0 Y:0 Z:0}
Entity: MasterOfPool.Ball - Delta: 0,0166015 - Pos: {X:-50,33923 Y:12,86 Z:0} - Vel: {X:1239,646 Y:0 Z:0} - Ang: {X:0 Y:0 Z:-2,853371}
Entity: MasterOfPool.Ball - Delta: 0,0170007 - Pos: {X:-29,85071 Y:12,86 Z:0} - Vel: {X:1229,311 Y:0 Z:0} - Ang: {X:0 Y:0 Z:-5,689833}
Entity: MasterOfPool.Ball - Delta: 0,0309053 - Pos: {X:-9,534159 Y:12,86 Z:0} - Vel: {X:1218,993 Y:0 Z:0} - Ang: {X:0 Y:0 Z:-8,509485}
Entity: MasterOfPool.Ball - Delta: 0,002232 - Pos: {X:10,61075 Y:12,85999 Z:0} - Vel: {X:1208,694 Y:-0,000402584 Z:0} - Ang: {X:0 Y:0 Z:-11,31235}
Entity: MasterOfPool.Ball - Delta: 0,0163161 - Pos: {X:30,5843 Y:12,85999 Z:0} - Vel: {X:1198,413 Y:-0,0004002104 Z:0} - Ang: {X:0 Y:0 Z:-14,09868}
Entity: MasterOfPool.Ball - Delta: 0,0167851 - Pos: {X:50,38679 Y:12,85999 Z:0} - Vel: {X:1188,15 Y:2,030042E-08 Z:0} - Ang: {X:0 Y:0 Z:-16,86855}
Entity: MasterOfPool.Ball - Delta: 0,0169515 - Pos: {X:70,01853 Y:12,85999 Z:0} - Vel: {X:1177,904 Y:2,069959E-08 Z:0} - Ang: {X:0 Y:0 Z:-19,62194}
Entity: MasterOfPool.Ball - Delta: 0,0308686 - Pos: {X:89,47982 Y:12,85999 Z:0} - Vel: {X:1167,677 Y:0 Z:0} - Ang: {X:0 Y:0 Z:-22,35901}
Entity: MasterOfPool.Ball - Delta: 0,008089 - Pos: {X:108,771 Y:12,85999 Z:0} - Vel: {X:1157,468 Y:0 Z:0} - Ang: {X:0 Y:0 Z:-25,07986}
Entity: MasterOfPool.Ball - Delta: 0,0108067 - Pos: {X:124,657 Y:12,85999 Z:0} - Vel: {X:1147,276 Y:0 Z:0} - Ang: {X:0 Y:0 Z:-27,78459}
:
:
Entity: MasterOfPool.Ball - Delta: 0,0328407 - Pos: {X:-10,66328 Y:12,85 Z:0,002626768} - Vel: {X:0 Y:0 Z:0} - Ang: {X:-8,449786E-12 Y:1,260333E-12 Z:-1,904943E-06}
FixedTimeStep = false; Second Try: 1080 Update from start to end
Start Impulse to Entity: MasterOfPool.Ball - Impulse: {X:250 Y:0 Z:0} - Pos: {X:-71 Y:12,86 Z:0} - Vel: {X:0 Y:0 Z:0} - Ang: {X:0 Y:0 Z:0}
Entity: MasterOfPool.Ball - Delta: 0,0165417 - Pos: {X:-50,33923 Y:12,86 Z:0} - Vel: {X:1239,646 Y:0 Z:0} - Ang: {X:6,844755E-12 Y:2,881559E-12 Z:-2,853371}
Entity: MasterOfPool.Ball - Delta: 0,0167141 - Pos: {X:-29,85071 Y:12,86 Z:1,750991E-15} - Vel: {X:1229,311 Y:0 Z:1,050594E-13} - Ang: {X:1,106385E-11 Y:-3,424302E-12 Z:-5,689833}
Entity: MasterOfPool.Ball - Delta: 0,0167312 - Pos: {X:-9,534159 Y:12,86 Z:7,554673E-15} - Vel: {X:1218,993 Y:0 Z:3,48221E-13} - Ang: {X:1,898416E-11 Y:-5,548519E-12 Z:-8,509485}
Entity: MasterOfPool.Ball - Delta: 0,0165844 - Pos: {X:10,61075 Y:12,85999 Z:1,430272E-14} - Vel: {X:1208,694 Y:-0,000402584 Z:4,048825E-13} - Ang: {X:4,09723E-12 Y:-3,709922E-12 Z:-11,31235}
Entity: MasterOfPool.Ball - Delta: 0,0166738 - Pos: {X:30,5843 Y:12,85999 Z:1,857182E-14} - Vel: {X:1198,413 Y:-0,0004002104 Z:2,56146E-13} - Ang: {X:-9,073994E-12 Y:9,187734E-13 Z:-14,09868}
Entity: MasterOfPool.Ball - Delta: 0,0166069 - Pos: {X:50,38679 Y:12,85999 Z:3,723246E-14} - Vel: {X:1188,15 Y:2,030042E-08 Z:1,119639E-12} - Ang: {X:5,133543E-11 Y:-1,267754E-11 Z:-16,86855}
Entity: MasterOfPool.Ball - Delta: 0,0166661 - Pos: {X:70,01853 Y:12,85999 Z:6,555276E-14} - Vel: {X:1177,904 Y:2,069959E-08 Z:1,699218E-12} - Ang: {X:3,350334E-11 Y:1,751004E-11 Z:-19,62194}
Entity: MasterOfPool.Ball - Delta: 0,0167709 - Pos: {X:89,47982 Y:12,85999 Z:9,600896E-14} - Vel: {X:1167,677 Y:0 Z:1,827372E-12} - Ang: {X:7,933651E-12 Y:1,970664E-11 Z:-22,35901}
Entity: MasterOfPool.Ball - Delta: 0,0166359 - Pos: {X:108,771 Y:12,85999 Z:1,27924E-13} - Vel: {X:1157,468 Y:0 Z:1,914902E-12} - Ang: {X:5,603239E-12 Y:-9,391217E-12 Z:-25,07986}
:
:
Entity: MasterOfPool.Ball - Delta: 0,0166963 - Pos: {X:2,277892 Y:12,85998 Z:0,006737435} - Vel: {X:0 Y:0 Z:0} - Ang: {X:-7,659232E-12 Y:7,591094E-12 Z:-4,729362E-07}
FixedTimeStep = true; First Try: 1121 Update from start to end
Start Impulse to Entity: MasterOfPool.Ball - Impulse: {X:250 Y:0 Z:0} - Pos: {X:-71 Y:12,86 Z:0} - Vel: {X:0 Y:0 Z:0} - Ang: {X:0 Y:0 Z:0}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:-50,33923 Y:12,86 Z:0} - Vel: {X:1239,646 Y:0 Z:0} - Ang: {X:0 Y:0 Z:-2,853371}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:-29,85071 Y:12,86 Z:0} - Vel: {X:1229,311 Y:0 Z:0} - Ang: {X:0 Y:0 Z:-5,689833}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:-9,534159 Y:12,86 Z:0} - Vel: {X:1218,993 Y:0 Z:0} - Ang: {X:0 Y:0 Z:-8,509485}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:10,61075 Y:12,85999 Z:0} - Vel: {X:1208,694 Y:-0,000402584 Z:0} - Ang: {X:0 Y:0 Z:-11,31235}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:30,5843 Y:12,85999 Z:0} - Vel: {X:1198,413 Y:-0,0004002104 Z:0} - Ang: {X:0 Y:0 Z:-14,09868}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:50,38679 Y:12,85999 Z:0} - Vel: {X:1188,15 Y:2,030042E-08 Z:0} - Ang: {X:0 Y:0 Z:-16,86855}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:70,01853 Y:12,85999 Z:0} - Vel: {X:1177,904 Y:2,069959E-08 Z:0} - Ang: {X:0 Y:0 Z:-19,62194}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:89,47982 Y:12,85999 Z:0} - Vel: {X:1167,677 Y:0 Z:0} - Ang: {X:0 Y:0 Z:-22,35901}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:108,771 Y:12,85999 Z:0} - Vel: {X:1157,468 Y:0 Z:0} - Ang: {X:0 Y:0 Z:-25,07986}
:
:
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:-13,85999 Y:12,85998 Z:0,003719465} - Vel: {X:0 Y:0 Z:0} - Ang: {X:-1,256907E-11 Y:-1,553706E-11 Z:-1,891747E-06}
FixedTimeStep = true; Second Try: 1151 Update from start to end
Start Impulse to Entity: MasterOfPool.Ball - Impulse: {X:250 Y:0 Z:0} - Pos: {X:-71 Y:12,86 Z:4,643032E-25} - Vel: {X:1,604723E-23 Y:2,121149E-28 Z:-4,293519E-28} - Ang: {X:0 Y:0 Z:0}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:-50,33923 Y:12,86 Z:4,642961E-25} - Vel: {X:1239,646 Y:0 Z:-4,257956E-28} - Ang: {X:-2,720671E-11 Y:5,161751E-12 Z:-2,853371}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:-29,85071 Y:12,86 Z:-5,872835E-15} - Vel: {X:1229,311 Y:0 Z:-3,523701E-13} - Ang: {X:-3,710825E-11 Y:8,925829E-12 Z:-5,689833}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:-9,534159 Y:12,86 Z:-3,21876E-14} - Vel: {X:1218,993 Y:0 Z:-1,578886E-12} - Ang: {X:-9,560829E-11 Y:2,231561E-11 Z:-8,509485}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:10,61075 Y:12,85999 Z:-8,115328E-14} - Vel: {X:1208,694 Y:-0,000402584 Z:-2,93794E-12} - Ang: {X:-9,351139E-11 Y:2,855701E-11 Z:-11,31235}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:30,5843 Y:12,85999 Z:-1,604851E-13} - Vel: {X:1198,413 Y:-0,0004002104 Z:-4,759907E-12} - Ang: {X:-1,161721E-10 Y:1,403995E-11 Z:-14,09868}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:50,38679 Y:12,85999 Z:-2,818221E-13} - Vel: {X:1188,15 Y:2,030042E-08 Z:-7,280225E-12} - Ang: {X:-1,522213E-10 Y:1,251375E-10 Z:-16,86855}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:70,01853 Y:12,85999 Z:-4,170162E-13} - Vel: {X:1177,904 Y:2,069959E-08 Z:-8,111646E-12} - Ang: {X:-5,127702E-11 Y:-1,111607E-11 Z:-19,62194}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:89,47982 Y:12,85999 Z:-5,568073E-13} - Vel: {X:1167,677 Y:0 Z:-8,387464E-12} - Ang: {X:-1,950852E-11 Y:-8,875821E-12 Z:-22,35901}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:108,771 Y:12,85999 Z:-7,243375E-13} - Vel: {X:1157,468 Y:0 Z:-1,005181E-11} - Ang: {X:-9,254746E-11 Y:2,875119E-11 Z:-25,07986}
:
:
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:-22,61569 Y:12,85957 Z:0,01891729} - Vel: {X:0 Y:0 Z:0} - Ang: {X:-4,184632E-15 Y:6,582845E-12 Z:6,711678E-19}
FixedTimeStep = true; Third Try: 1078 Update from start to end
Start Impulse to Entity: MasterOfPool.Ball - Impulse: {X:250 Y:0 Z:0} - Pos: {X:-71 Y:12,86 Z:0} - Vel: {X:0 Y:0 Z:0} - Ang: {X:0 Y:0 Z:0}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:-50,33923 Y:12,86 Z:0} - Vel: {X:1239,646 Y:0 Z:0} - Ang: {X:4,429294E-11 Y:2,178133E-10 Z:-2,853371}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:-29,85071 Y:12,86 Z:1,719512E-14} - Vel: {X:1229,311 Y:0 Z:1,031707E-12} - Ang: {X:1,086495E-10 Y:2,814818E-10 Z:-5,689833}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:-9,534159 Y:12,86 Z:7,633235E-14} - Vel: {X:1218,993 Y:0 Z:3,548234E-12} - Ang: {X:1,964244E-10 Y:2,041403E-10 Z:-8,509484}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:10,61075 Y:12,85999 Z:2,166477E-13} - Vel: {X:1208,694 Y:-0,000402584 Z:8,418919E-12} - Ang: {X:3,336495E-10 Y:2,906386E-10 Z:-11,31235}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:30,5843 Y:12,85999 Z:4,499539E-13} - Vel: {X:1198,413 Y:-0,0004002104 Z:1,399837E-11} - Ang: {X:3,553896E-10 Y:-1,350069E-11 Z:-14,09867}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:50,38679 Y:12,85999 Z:8,136136E-13} - Vel: {X:1188,15 Y:2,030042E-08 Z:2,181958E-11} - Ang: {X:4,719236E-10 Y:-3,563472E-10 Z:-16,86855}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:70,01853 Y:12,85999 Z:1,470803E-12} - Vel: {X:1177,904 Y:2,069959E-08 Z:3,943137E-11} - Ang: {X:1,011155E-09 Y:2,540629E-10 Z:-19,62194}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:89,47982 Y:12,85999 Z:2,343892E-12} - Vel: {X:1167,677 Y:0 Z:5,238534E-11} - Ang: {X:7,296185E-10 Y:1,558534E-10 Z:-22,35901}
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:108,771 Y:12,85999 Z:3,390797E-12} - Vel: {X:1157,468 Y:0 Z:6,281428E-11} - Ang: {X:5,798322E-10 Y:-6,87304E-10 Z:-25,07986}
:
:
Entity: MasterOfPool.Ball - Delta: 0,0166667 - Pos: {X:2,294361 Y:12,85998 Z:-0,0003665402} - Vel: {X:0 Y:0 Z:0} - Ang: {X:9,917894E-13 Y:9,373031E-12 Z:-4,729362E-07}
The first thing to notice, is that I gave an Impulse over the X axis, but on the second try of both session (without and with FixedTimeStep) the Z value of LinearVelocity is changed. Why?
And in every try, at step 4,5,6,7 the Y value change, into negative value too. why?
Maybe a kind of "threshold limit value" should be inserted so that a value unde this, should be considered equal to 0.
Consider the second try:
Start Impulse to Entity: MasterOfPool.Ball - Impulse: {X:250 Y:0 Z:0} - Pos: {X:-71 Y:12,86 Z:0} - Vel: {X:0 Y:0 Z:0} - Ang: {X:0 Y:0 Z:0}
Entity: MasterOfPool.Ball - Delta: 0,0165417 - Pos: {X:-50,33923 Y:12,86 Z:0} - Vel: {X:1239,646 Y:0 Z:0} - Ang: {X:6,844755E-12 Y:2,881559E-12 Z:-2,853371}
Entity: MasterOfPool.Ball - Delta: 0,0167141 - Pos: {X:-29,85071 Y:12,86 Z:1,750991E-15} - Vel: {X:1229,311 Y:0 Z:1,050594E-13} - Ang: {X:1,106385E-11 Y:-3,424302E-12 Z:-5,689833}
Entity: MasterOfPool.Ball - Delta: 0,0167312 - Pos: {X:-9,534159 Y:12,86 Z:7,554673E-15} - Vel: {X:1218,993 Y:0 Z:3,48221E-13} - Ang: {X:1,898416E-11 Y:-5,548519E-12 Z:-8,509485}
Entity: MasterOfPool.Ball - Delta: 0,0165844 - Pos: {X:10,61075 Y:12,85999 Z:1,430272E-14} - Vel: {X:1208,694 Y:-0,000402584 Z:4,048825E-13} - Ang: {X:4,09723E-12 Y:-3,709922E-12 Z:-11,31235}
Entity: MasterOfPool.Ball - Delta: 0,0166738 - Pos: {X:30,5843 Y:12,85999 Z:1,857182E-14} - Vel: {X:1198,413 Y:-0,0004002104 Z:2,56146E-13} - Ang: {X:-9,073994E-12 Y:9,187734E-13 Z:-14,09868}
Entity: MasterOfPool.Ball - Delta: 0,0166069 - Pos: {X:50,38679 Y:12,85999 Z:3,723246E-14} - Vel: {X:1188,15 Y:2,030042E-08 Z:1,119639E-12} - Ang: {X:5,133543E-11 Y:-1,267754E-11 Z:-16,86855}
Entity: MasterOfPool.Ball - Delta: 0,0166661 - Pos: {X:70,01853 Y:12,85999 Z:6,555276E-14} - Vel: {X:1177,904 Y:2,069959E-08 Z:1,699218E-12} - Ang: {X:3,350334E-11 Y:1,751004E-11 Z:-19,62194}
Third line: Vel: {X:1229,311 Y:0 Z:1,050594E-13}
a value of 1,050594E-13 should be considered equal to 0. can be taken as real value. we are simulating the physic. but with approximations due to the hardware limits.
Using a global const value like 1E-8 as limit threashold should be fix the undeterministic behaviour (if there isn't any other element which cause undeterminism).
If someone need more precision, could include the source code, modify the const value, and recompile the physic engine.