Hot answers tagged


Here's a starting point. Figuring out what I exactly did is left as an exercise. With[{r = 5/2, φ = π/4, s1 = 3/4, s2 = 3/2}, Graphics3D[{{Directive[CapForm[None], Opacity[2/3]], Tube[{{0, 0, -r Cot[φ/2]}, {0, 0, 0}, {0, 0, r Cot[φ/2]}}, {r, 0, r}]}, {Sphere[{0, 0, s1 Csc[φ/2]}, s1], Sphere[{0, 0, -s2 Csc[φ/2]}, s2]}, ...


As noted in the docs, the only effect of specifying VertexNormals is in the shading; recall that Mathematica uses the Phong model for depicting surfaces. The docs also have a review of how shading is done in Mathematica. For further illustrations, here is a modified version of your demonstration function g: g[p_, nl_, opts___] := Graphics3D[{FaceForm[...


Why not go to the WRI demo site and search for demos involving the Dandelin spheres? You can download the source code and see how some others did it. For example:

Only top voted, non community-wiki answers of a minimum length are eligible