Using fewer mesh lines, 3D graphics
The FEM package will tend to give you more isotropic triangles as shown in your spherical mesh than other discretization functions in Mathematica. Also, for a torus, an implicit region seems to give a cleaner mesh than a parametric region as can be seen by the FindMeshDefects
function.
Below, you can see a comparison between ParametricRegion
and ImplicitRegion
:
Needs["NDSolve`FEM`"]
torus = ParametricRegion[{(3 + Cos[v]) Cos[u], (3 + Cos[v]) Sin[u],
Sin[v]}, {{u, 0, 2 π}, {v, 0, 2 π}}];
mrtorus =
MeshRegion@
ToBoundaryMesh[torus, "MeshOrder" -> 1, MaxCellMeasure -> .1,
AccuracyGoal -> 1];
HighlightMesh[mrtorus, 1]
FindMeshDefects[mrtorus]
torus = SolidData["SolidTorus", "ImplicitRegion"][1, 3];
mrtorus =
MeshRegion@
ToBoundaryMesh[torus, "MeshOrder" -> 1, MaxCellMeasure -> .1,
AccuracyGoal -> 1];
HighlightMesh[mrtorus, 1]
FindMeshDefects[mrtorus]
Change the MeshFunctions
and Mesh
and PlotPoints
ex1 = ParametricPlot3D[{(3 + Cos[v]) Cos[u], (3 + Cos[v]) Sin[u],
Sin[v]}, {u, 0, 2 Pi}, {v, 0, 2 Pi}, Boxed -> False,
Axes -> False, MeshFunctions -> Automatic, Mesh -> {{0}},
PlotPoints -> {12, 8}];
reg = DiscretizeGraphics[ex1];
newedges = MeshPrimitives[reg, 1];
Graphics3D[Map[Tube[#, .05] &, newedges[[All, 1]]], Boxed -> False]