Centre point of mesh

Blitz3D Forums/Blitz3D Programming/Centre point of mesh

Hmm, don't you get the center point by adding the smallest and largest value of each axis and divide by 2?
MidPointX = (SmallestX + LargestX) / 2
MidPointY = (SmallestY + LargestY) / 2
MidPointZ = (SmallestZ + LargestZ) / 2

If you sum all Vx#'s you get the mean value.

Consider a 2D triangle.

Topvertex Y = 0
BottomRightvertex Y = 100
BottomLeftvertex Y = 100

The middle should be at Y = 50 , right?

But (0 + 100 + 100) / 3 = 66.6666...
Instead use this...
(0 + 100)/2 = 50