Group Abstract Group Abstract

Message Boards Message Boards

Empty output from an old 3DParametricPlot3D code

POSTED BY: Paul Swanson
Posted 2 years ago

The basic form you're creating in the Table looks like this:

{Sin[2 (t + \[Pi])] Cos[(t + \[Pi])] Sin[n 36 °], 
 Sin[2 (t + \[Pi])] Cos[(t + \[Pi])] Cos[n 36 °], 
 Sin[(t + \[Pi])] Sin[t + \[Pi]], {Thickness[
   0.1 Sin[\[Pi] t/(\[Pi] - 2)]], 
  RGBColor[(0.34 + t/(3 (\[Pi] - 2))), (0.55 + 
     t/(3.5 (\[Pi] - 2))), (0.12 + t/(3.5 (\[Pi] - 2)))]}}

Which, simplified is this:

{x, y, z, {< style directives >}}

ParametricPlot3D expects this to be just a three-valued list: {x, y, z}. Maybe putting the styling directives right into the list was okay back then, but I think this is causing your problem now. You'll need to move those styling directives into a PlotStyle option. To at least get a visible plot, just remove that fourth element from each list that Table creates. Also, I think it's a bit cleaner to move your closing bracket so that Evaluate just encloses the Table and not the plot variable. So, something like this:

ParametricPlot3D[
 Evaluate[
  Table[{Sin[2 (t + \[Pi])] Cos[(t + \[Pi])] Sin[n 36 °], 
    Sin[2 (t + \[Pi])] Cos[(t + \[Pi])] Cos[n 36 °], 
    Sin[(t + \[Pi])] Sin[t + \[Pi]]}, {n, 0, 10}]], {t, 0, \[Pi] - 2},
  Axes -> False, Boxed -> False, PlotPoints -> 200, 
 BoxRatios -> {1, 1, 1}, ViewPoint -> {0.862, -2.214, 2.409}]
POSTED BY: Eric Rimbey
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard