Attraction calculation bug.
5 posts • Page 1 of 1
Attraction calculation bug.
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.
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
-

RA2lover - Posts: 607
- Joined: Mon Aug 31, 2009 8:43 pm
- Location: Brazil
Re: Attraction calculation bug.
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.

-

KarateBrot - Posts: 825
- Joined: Mon Aug 31, 2009 7:32 pm
- Location: Germany
Re: Attraction calculation bug.
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.
What if you cut, scale, stretch, use CSG or change the density of this shape? other then that you make a good point.
-

Mystery - Posts: 2802
- Joined: Thu Sep 03, 2009 1:16 pm
- Location: Southern Australia
Re: Attraction calculation bug.
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
-

RA2lover - Posts: 607
- Joined: Mon Aug 31, 2009 8:43 pm
- Location: Brazil
5 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests



