1
$\begingroup$

How to build a spherical polygon on a sphere.moreover. Manually changing the number of sides of the polygon?

$\endgroup$
3
  • 7
    $\begingroup$ Have a look at SphericalPolygon $\endgroup$
    – eldo
    Commented Dec 9, 2023 at 17:38
  • 1
    $\begingroup$ The post could use some good cleanup, but I don't find this question as bad as other uses who voted for closing it. It is not like SphericalPolygon were part of the language. @Eldo Your comment is awesome; please change it into an answer. I think in this case a 1-link answer is justified. $\endgroup$ Commented Dec 9, 2023 at 18:51
  • $\begingroup$ Related Construction of a Fuller Dome $\endgroup$
    – eldo
    Commented Dec 9, 2023 at 20:32

1 Answer 1

4
$\begingroup$

As requested I turn my comment into an answer:

SP = ResourceFunction["SphericalPolygon"] (* Author: Jan Mangaldan *);

Example from its documentation (with minor changes)

coord =
  First /@ First[Normal[MapAt[Map[Normalize, #] &,
      N[PolyhedronData["TruncatedIcosahedron", "GraphicsComplex"]], 1]]];

Graphics3D[Map[{GrayLevel[If[Length[#] == 5, 0, 0.8]],
    SP[#, "EdgeStyle" -> GrayLevel[0.4], "ShowEdges" -> True]} &, coord],
 Boxed -> False,
 Lighting -> "Neutral"]

enter image description here

Another example:

coord =
  First /@ First[Normal[MapAt[Map[Normalize, #] &,
      N[PolyhedronData["DisdyakisTriacontahedron", "GraphicsComplex"]], 1]]];

Graphics3D[Map[
   {RGBColor[0.5, 1, 0.5, 0.5],
     SP[#, "EdgeStyle" -> GrayLevel[0.8], "ShowEdges" -> True]} &, coord],
  Boxed -> False,
  Lighting -> "Neutral"] /. Line :> (Tube[#, 0.015] &)

enter image description here

Related

construction-of-a-fuller-dome

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.