# Average point on sphere between 3 other points (spherical triangle)

I am trying to get a normal of a triangle on a sphere, however the normal equations (straight line) give the wrong answer.

For the points:

$$(-986.786743, -93.348259, -132.439041)\\ (210.731644, -534.785583, -818.290039)\\ (637.734985, -449.826904, -553.501648)$$

on a radius $1000$ sphere, the average point (straight line) is $(-0.074536, -0.580873, -0.810574) * 1000$, which is visibly incorrect on a sphere.

The triangle's normal normalized to distance $1000$ gives: $(0.086455, 0.899604, -0.428062) * 1000$ which is different from the average value above (which would have also given a normal) and also far off from the spherical triangle.

Edit: I was trying to unwrap a mesh into a globe to map it to a texture. I needed to know if triangles were upside down using normals.

• It might help to describe the reason that you need this. There are many different centres of a triangle in 2D so I imagine there may be many approaches for a sphere surface triangle. If we know what your underlying purpose is we will have a better idea of whether "average" is the best approach. – trichoplax Jan 20 '17 at 1:29
• Could you detail a little more what the context is (why you are trying to do this), what your constraints are (for example, do you know what the sphere center and radius are, or do you only have the triangle?) and what formula you are using (random floating points values are a lot harder to read than equations)? – Julien Guertault Jan 25 '17 at 3:42

If i read you right, you have a triangular patch which is on the surface of a sphere - so the triangle isn't really a true triangle in that it isn't flat, but instead is just made up of 3 points on a sphere connected by lines across the spheres surface.

Also if I understand you correctly, you have a point on this triangle that you want to get the normal at.

If all that is right, the way to get the normal is to subject subtract the origin from your point on the triangle (since it is also a point on the sphere) and normalize it.

The normal at any point on a sphere is parallel to the point from the center of the sphere to that point on the surface.

The triangle spans from one side of the sphere to the other so using straight line equations is very inaccurate.

I think I can figure it out like so:

The centroid of a triangle is where its medians intersect:

Median of a triangle - math word definition | Math Open Reference

So use the equations given elsewhere to find the shortest path between two points on a sphere for all the vertices, and get the intersection between two midpoints on those with the opposing vertices to get two curves along the sphere and their point intersection.