NewtonCreateBody new head?

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: NewtonCreateBody new head?

Postby PJani » Sat Feb 19, 2011 3:39 pm

something doesn't add up.

i dont know why is there so much duplicates...

my python script reduces list to this(as it looks this should be a box...):
Code: Select all
[-295.27499999999998, 0.0, -295.27499999999998]
[-295.27499999999998, 0.0, 295.27499999999998]
[-295.27499999999998, 0.5, -295.27499999999998]
[-295.27499999999998, 0.5, 295.27499999999998]
[295.27499999999998, 0.0, -295.27499999999998]
[295.27499999999998, 0.0, 295.27499999999998]
[295.27499999999998, 0.5, -295.27499999999998]
[295.27499999999998, 0.5, 295.27499999999998]
Last edited by PJani on Sat Feb 19, 2011 3:47 pm, edited 1 time in total.
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: NewtonCreateBody new head?

Postby Julio Jerez » Sat Feb 19, 2011 3:43 pm

Oh I know what happen, a while back in 2.00 I changed the meaning of the tolerance.
The tolerance is the distance that a popint must be fasther away from the surface of a plane so that is can be considered part of that HULL.
In 1.0 the tolerance value was absolute, by if has the problem that hulls of large shapes had more detail than hulsl of small shapes, in fact is causes big problems wih small shapes.

In 2.00 I changed the tolerance to be a relative value. Basically it is the fraction of the diagonal of the Boundin Box of the vertex Cloud.
This works mush better because like that a scale Geometry will produce teh same detail convex shape.

there was a bug that I some one reported in an earlly version of 2.00, and the was when I was calcuation the distance, I suport to squared and by I by mistake made to the cube.
But that is the only change I had made to the conve Hull since 1.5, so I was suprice it failed now.

The good news is that it is not failing, the problem is the interpreation of the tolerance in 2.00,

you see your poind cloud is a very, very wide box, that is almost paper thing high, the dimensions are (580 x 0.5 x 580)
the diagonal of the box is 820 units and when mutiply by the tolerance it becomes 0.8
That means the the thickness of the Box is less than the torance, because the thickness is 0.5

therefore from the point of view of the convex Hull constructions algorithm, the entire cloud form a flat plane.
the convex hull does not fail but the collision rejects the convex as a flat plane and return zero.
if you use a lower tolerance like 0.0001 then it will be OK.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonCreateBody new head?

Postby PJani » Sat Feb 19, 2011 3:52 pm

I see xD, silly me, I never suppose the tolerance would be a problem! :P

Thanx, Julio!
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest