Attraction calculation bug.

If you have problems installing or running Algodoo, have found a bug or need in-game help - this is it!

Attraction calculation bug.

Postby RA2lover » Thu Dec 31, 2009 12:33 am

With some tests, i found out that, in phun/algodoo, the source of attraction is the gravitational center of the geometry.

this, hovewer, is an issue when it comes to some polygon shapes with gravitational centers outside of the body itself. i understand that calculating each section of it would be a lag source, and therefore, i don't think there are any feasible solutions for normal computers. this has a good enough demonstration by making a 2d-torus, setting positive attraction(negative also works, but it's harder to show), then adding something inside it.
Jrv wrote:
TC42 wrote:Quite honestly, I didn't think anyone on 4chan has that good a use of grammar, spelling, usage, mechanics, ect.
But I've never been there, so I may be wrong.


GTFO newfgt
User avatar
RA2lover
 
Posts: 607
Joined: Mon Aug 31, 2009 8:43 pm
Location: Brazil

Re: Attraction calculation bug.

Postby KarateBrot » Thu Dec 31, 2009 2:19 pm

That's known and it's not really a bug because they did it like this on purpose. but like you said it's very very hard to calculate. The geometry has to be divided in very small parts and every part has to be calculated for itself. After that they all get summed up to get the resultant gravitational vector. The smaller and more parts the more realistic it gets. The best result is to divide it into infinite little points and integrate them all together.
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: Attraction calculation bug.

Postby Twinkle » Sun Jan 03, 2010 11:59 pm

This computation need only be done once, when the polygon is created, provided a sufficiently high-resolution array of gravitational force vectors can be stored in memory. This approach would be reasonable for an arbitrary shape attracting particles (such as water droplets), but even more computations would be required to compute the forces between two arbitrary shapes. Perhaps the different algorithms could be options?
Twinkle
 
Posts: 9
Joined: Tue Sep 08, 2009 10:42 pm

Re: Attraction calculation bug.

Postby Mystery » Mon Jan 04, 2010 4:15 am

What if you cut, scale, stretch, use CSG or change the density of this shape? other then that you make a good point.
User avatar
Mystery
 
Posts: 2802
Joined: Thu Sep 03, 2009 1:16 pm
Location: Southern Australia

Re: Attraction calculation bug.

Postby RA2lover » Mon Jan 04, 2010 3:06 pm

changing a density of a single object doesn't change its gravitational center position.
Jrv wrote:
TC42 wrote:Quite honestly, I didn't think anyone on 4chan has that good a use of grammar, spelling, usage, mechanics, ect.
But I've never been there, so I may be wrong.


GTFO newfgt
User avatar
RA2lover
 
Posts: 607
Joined: Mon Aug 31, 2009 8:43 pm
Location: Brazil


Return to Help / Bug reports

Who is online

Users browsing this forum: No registered users and 3 guests