Triangle's contributory moment of inertia

Click For Summary
SUMMARY

The discussion centers on calculating the average distance from a point (x,y) to all points within a triangle defined by vertices (x1,y1), (x2,y2), and (x3,y3) for use in a 2D physics engine. The user seeks an algorithm to achieve this without relying on integrals, as they are not familiar with calculus. The solution will contribute to determining the center of rotation and mass distribution for solid shapes composed of multiple triangles, utilizing the three-point formula for area and potentially a trigonometric algorithm for finding the mass midpoint.

PREREQUISITES
  • Understanding of 2D geometry and triangle properties
  • Familiarity with basic calculus concepts
  • Knowledge of algorithms for distance calculations
  • Experience with physics engines in game development
NEXT STEPS
  • Research algorithms for calculating the centroid of a triangle
  • Learn about numerical integration techniques for area calculations
  • Explore optimization techniques for physics engines
  • Investigate alternative methods for distance calculations without trigonometry
USEFUL FOR

Game developers, physics engine designers, and anyone involved in computational geometry and simulations requiring accurate mass distribution calculations.

Jellyf15h
Messages
4
Reaction score
0
Triangle's contributory moment of inertia :D

Howdy.

I'm designing a 2-dimensional physics engine for use in games and simulations and have hit a roadblock.
The rotation system requires a value corresponding to the proportion between an object's regular inertia and its rotational inertia. EG, for a ring the proportion is 1, for a disc it's .5 evidently. Basically, <THIS> is what I'm after.

Anyway, what I need is an algorithm to find the average distance [not scaled] from a given point (x,y) to all points in the AREA of a triangle [(x1,y1), (x2,y2), (x3,y3)]. To say it differently, I need to find the average distance from all points within a given triangle to (x,y). Being in basic calculus [CURSE YOU PUBLIC EDUCATIONNNN] I'm not so familiar with integrals, so a solved algorithm is what I need.

Just to provide extra perspective, solid shapes will consist of multiple triangles [as it pertains to area, anyway.] and a weighted mean based on area will be used when computing their overall center of rotation and their average distribution. [what we're finding.] I plan to use the three-point formula for area and a trig algorithm to find the mass midpoint of each triangle. [If there's a way to do this without trig, tell me. Those tend to run faster.] There will be no variation in density in a triangle.

So, who among you is man enough to crack this nut?
 
Physics news on Phys.org
Please?

Pretty please? I'll be your friend. You'll get in the credits!
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 16 ·
Replies
16
Views
2K
Replies
2
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 4 ·
Replies
4
Views
21K
  • · Replies 21 ·
Replies
21
Views
3K
  • · Replies 49 ·
2
Replies
49
Views
6K
Replies
3
Views
4K
Replies
9
Views
6K