TransWikia.com

Removing a crease artifact in a surface of revolution SphericalPlot

Mathematica Asked on January 4, 2021

Consider the surface

r[t_, n_: 2, a_: 1,b_: 1] := ((Abs@Cos[t]/a)^(2/n) + (Abs@Sin[t]/b)^(2/n))^(-n/2)
SphericalPlot3D[r[t, 2], {t, 0,  [Pi]}, {p, 0, 2 [Pi]}, PlotRange -> {-1, 1}, AxesLabel -> StringPart["xyz", ;;],  Mesh -> False, MaxRecursion -> 5]

enter image description here
There exists a vertical crease where the $phi=0$ edge meets $phi=2pi$. It doesn’t disappear with increased PlotPoints or MaxRecursion. How to smooth it out?

One Answer

In light of J.M.'s comment here, using ParametricPlot3Dinstead:

r[t_, n_: 2, a_: 1,b_: 1] := ((Abs@Cos[t]/a)^(2/n) + (Abs@Sin[t]/b)^(2/n))^(-n/2)
coords = CoordinateTransform["Spherical" -> "Cartesian", {r, t, p}];
ParametricPlot3D[coords /. r -> r[t, 2], {t, 0, [Pi]}, {p, 0, 2 [Pi]}, 
 MaxRecursion -> 5, Mesh -> None, PlotRange -> {-1, 1}]

Answered by lineage on January 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP