Message Boards Message Boards

Avoid discontinuities in visualization of supertoroidal surfaces?

Hello, I am running the following line of code for Mathematica 10 to visualize superquadrics (supertoroid):

Manipulate[
 ParametricPlot3D[{a1*(a4 + Sign[Cos[u]]*Abs[Cos[u]]^eps1)*
    Sign[Cos[t]]*Abs[Cos[t]]^eps2, 
   a2*(a4 + Sign[Cos[u]]*Abs[Cos[u]]^eps1)*Sign[Sin[t]]*
    Abs[Sin[t]]^eps2, a3*Sign[Sin[u]]*Abs[Sin[u]]^eps1}, {t, -Pi, 
   Pi}, {u, -Pi, Pi}, MaxRecursion -> 5, ViewPoint -> {2, 2, 2}, 
  PlotStyle -> Lighter[Red, op]],
 {{op, 1, "Lightness"}, 0, 1, Appearance -> "Labeled"},
 {{a1, 1, "Parameter a1"}, 0, 5, 
  Appearance -> "Labeled"}, {{a2, 1, "Parameter a2"}, 0, 5, 
  Appearance -> "Labeled"}, {{a3, 1, "Parameter a3"}, 0, 5, 
  Appearance -> "Labeled"}, {{a4, 1, "Parameter a4"}, 0, 5, 
  Appearance -> "Labeled"}, {{eps1, 1, "Parameter eps1"}, 0, 5, 
  Appearance -> "Labeled"}, {{eps2, 1, "Parameter eps2"}, 0, 5, 
  Appearance -> "Labeled"}]

Figure

Unfortunately, the image has several discontinuities (see Figure) and I do not know how to fix it. These discontinuities are more significant if parameters eps1 and eps2 are smaller (i.e. 0.25). Could anyone help with that? Thank you,

Wawosz

4 Replies

Thank you, Gianluca.

Thank you, Erik. It worked!

Try adding the Exclusions -> None option to ParametricPlot3D.

POSTED BY: Gianluca Gorni
Posted 8 years ago

Try eliminating the exclusions: Exclusions->None

Manipulate[
 ParametricPlot3D[{a1*(a4 + Sign[Cos[u]]*Abs[Cos[u]]^eps1)*
    Sign[Cos[t]]*Abs[Cos[t]]^eps2, 
   a2*(a4 + Sign[Cos[u]]*Abs[Cos[u]]^eps1)*Sign[Sin[t]]*
    Abs[Sin[t]]^eps2, a3*Sign[Sin[u]]*Abs[Sin[u]]^eps1}, {t, -Pi, 
   Pi}, {u, -Pi, Pi}, Exclusions -> None, MaxRecursion -> 5, 
  ViewPoint -> {2, 2, 2}, 
  PlotStyle -> Lighter[Red, op]], {{op, 1, "Lightness"}, 0, 1, 
  Appearance -> "Labeled"}, {{a1, 1, "Parameter a1"}, 0, 5, 
  Appearance -> "Labeled"}, {{a2, 1, "Parameter a2"}, 0, 5, 
  Appearance -> "Labeled"}, {{a3, 1, "Parameter a3"}, 0, 5, 
  Appearance -> "Labeled"}, {{a4, 1, "Parameter a4"}, 0, 5, 
  Appearance -> "Labeled"}, {{eps1, 1, "Parameter eps1"}, 0, 5, 
  Appearance -> "Labeled"}, {{eps2, 1, "Parameter eps2"}, 0, 5, 
  Appearance -> "Labeled"}]

torus

POSTED BY: Erik Mahieu
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract