# Draw a triangulation of a sphere

I want to draw a triangulation of a sphere starting from the following data. I have a collection of triangles represented by three points $$(p1,p2,p3)$$ on a sphere of radius 1. I would like to draw in a different color (or maybe even with a texture) each curvy triangle. Any ideas?

EDIT

Thanks for the first answers. Both method works fine, but there is something else that now bothers me.

For each triangle I have a picture that I would like to use as a Texture, each picture has a central "body" surrounded by white empty space that can be increased at pleasure. I would like the Texture to be added so that the central body ends up on the barycenter of the triangle and I would like it not to be too deformed. In other words, what I would like to happen is to cut a triangle out of the original picture and use it as a texture so that the vertices and barycenter (the central body) are mapped to vertices and barycenter of the spherical triangles. Here is an example of a picture

Also, I would like to be able to "see through" the regions, so that one can see the central body drawn on the far side of the sphere without rotating it. If I use PlotStyle->{Texture[Image],Opacity[.5]} from your first Method, the texture completely disappears.

• The surface of a sphere is two-dimensional. Only two coordinates are needed. You already specified the radius. Or, have you computed already the three dimensional.
– anon
Commented Mar 22, 2023 at 1:23

## Method-1

• ConicHullRegion[{{0, 0, 0}}, {p1, p2, p3}] generate the infinite pyramid. $$\{ t_1p1+t_2p_2+t_3p_3, t_1,t_2,t_3\geq 0 \}$$

• The spherical triangle is the intersection of theConicHullRegion region and Sphere[].

SeedRandom[1];
sphere = Sphere[];
{p1, p2, p3} = RandomPoint[sphere, 3];
viewpoint = Mean[{p1, p2, p3}];
reg = DiscretizeRegion[
RegionIntersection[{sphere,
ConicHullRegion[{{0, 0, 0}}, {p1, p2, p3}]}], {{-1.2,
1.2}, {-1.2, 1.2}, {-1.2, 1.2}}, MaxCellMeasure -> 10^-5,
AccuracyGoal -> 3];
sphericaltriangle =
RegionPlot3D[reg,
PlotStyle -> Texture[ExampleData[{"ColorTexture", "WhiteMarble"}]],
Mesh -> None]
Graphics3D[{sphere, sphericaltriangle[[1]]}, ViewPoint -> viewpoint,
ViewProjection -> "Orthographic", PlotRange -> All, Boxed -> False]


## Method-2

• For three points{p1,p2,p3}, we parametric the space triangle by
{1 - t, t} . {p1, {1 - s, s} . {p2, p3}}


where 0<=t<=1 and 0<=s<=1. After that we Normalize all of the points of triangle to projecte it to the unit-sphere.

SeedRandom[1];
sphere = Sphere[];
{p1, p2, p3} = RandomPoint[sphere, 3];
ParametricPlot3D[{1 - t, t} . {p1, {1 - s, s} . {p2, p3}} //
Normalize, {t, 0, 1}, {s, 0, 1},
PlotStyle -> Texture@ExampleData[{"ColorTexture", "GoldenOak"}],
Mesh -> None]


• The second method is very elegant. And nice use of the texture data!
– alex
Commented Mar 22, 2023 at 13:34