9
$\begingroup$

Is it possible to get all points on a Polyhedron surface using two surface parameters, say

$ \phi,\theta $ spherical co-ordinates?

Just like in ParametricPlot3D, can we start with PolyhedronData["Tetrahedron"] to obtain spatial point positions?. The tip of position vector should cross edges automatically during $\phi,\theta$ sweep.

$\endgroup$
5
  • $\begingroup$ You can always make this kind of tricks $\endgroup$ Commented Dec 29, 2014 at 19:22
  • $\begingroup$ @belisarius: fine,but want to append or prepend available Polyhedra. $\endgroup$
    – Narasimham
    Commented Dec 29, 2014 at 19:59
  • 1
    $\begingroup$ This is a nice start. $\endgroup$ Commented Dec 29, 2014 at 20:04
  • $\begingroup$ Stick a small sphere around the barycenter. Now parametrize by the spherical angles, using intersection of ray through spherical point (theta,phi) with polyhedron. $\endgroup$ Commented Dec 29, 2014 at 23:57
  • $\begingroup$ Clear enough, we need to have direct coordinates as function of ($\theta,\phi, n $). $\endgroup$
    – Narasimham
    Commented Dec 30, 2014 at 7:58

3 Answers 3

16
$\begingroup$

Exploit the fact that the vertices of the dual to a Platonic solid correspond to the centers of the faces of the solid itself. For instance, the dual to a cube is a regular octahedron, and the six vertices of this octahedron are in the directions of the centers of the faces of its dual cube.

Find the normalized directions of the face centers of the cube (for instance) this way:

FaceCenters = Normalize /@ PolyhedronData[PolyhedronData["Cube", "Dual"], "Faces"][[1]];

The {x,y,z} direction in Euclidean coordinates as a function of spherical angles θ and φ are of course:

x[θ_Real, φ_Real] := {Sin[θ] Cos[φ], 
                      Sin[θ] Sin[φ], 
                      Cos[θ]}

Now sweep through all spherical angles, and for each corresponding direction find the nearest face center direction (i.e., the one with the smallest angle to the direction defined by θ and φ). For each such direction, the distance to the surface is 1/Sin[ψ], where ψ is the scalar angle between the candidate direction and its nearest face direction:

    SphericalPlot3D[
         1/Sin[x[θ, φ].Nearest[FaceCenters, x[θ, φ]][[1]]], 
         {θ, 0, π}, {φ, 0, 2 π}, 
         PlotPoints -> 100] // Quiet

Cube fig

If you repeat with a Tetrahedron, for instance, you get this:

Tetrahedron fig

If you repeat for an Octahedron, you get this:

Octahedron fig

If you repeat for a Dodecahedron, you get this:

Dodecahdrond fig

$\endgroup$
3
  • 5
    $\begingroup$ Wow... I really thought @Narasimhan would have accepted this answer! What more can he possibly want?! $\endgroup$ Commented Jan 6, 2015 at 0:58
  • $\begingroup$ That was great. My apologies for the inordinate delay earlier $\endgroup$
    – Narasimham
    Commented Feb 10, 2018 at 5:17
  • $\begingroup$ Wow... two months late! Better late than never! $\endgroup$ Commented Feb 10, 2018 at 6:20
2
$\begingroup$
RegionPlot3D[PolyhedronData["Octahedron", "Region"], 
 MeshFunctions -> {Function[{x, y, z}, ArcTan[z, Sqrt[x^2 + y^2]]], 
   Function[{x, y, z}, Arg[x + I*y]]}, Mesh -> 20, Boxed -> False, 
 PlotPoints -> 50]

enter image description here

RegionPlot3D[PolyhedronData["Dodecahedron", "Region"], 
 MeshFunctions -> (Function[{x, y, z}, #] & /@ 
    ToSphericalCoordinates[{x, y, z}][[2 ;; 3]]), Mesh -> 20]

enter image description here

$\endgroup$
2
$\begingroup$
regularPolyhedraParametricEquation[poly_String]:=
With[{sp={Sin[θ] Cos[ϕ], Sin[θ] Sin[ϕ], Cos[θ]}},
 sp/Max[(Cross[#2-#1,#3-#1]&@@@PolyhedronData[poly,"Polygons"][[All,1]]).sp]];

regularPolyhedraList = PolyhedronData["Platonic"]
paraEqn = regularPolyhedraParametricEquation /@ regularPolyhedraList;

ParametricPlot3D[#,{θ,0,Pi},{ϕ,0,2Pi},Exclusions->None,PlotPoints->120,
  PlotStyle->Opacity[0.7]]&/@N[paraEqn]

{Tetrahedron, Cube, Octahedron, Dodecahedron, Icosahedron} enter image description here

Related Transform sphere into a cube
enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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