Message Boards Message Boards

[GIF] Left or Right? (Rotating Roman surface)

Rotating Roman surface

Left or Right?

A slightly unusual view of the Roman surface.

Source code:

DynamicModule[{cols},
 cols = RGBColor /@ {"#FFF4E1", "#E67A7A"};
 Manipulate[
  ParametricPlot3D[
   Evaluate@
    Table[{Cos[?] Sin[?] Sin[?], Cos[?] Sin[?] Cos[?], Cos[?]^2 Cos[?] Sin[?]}, 
      {?, 0, 2 ?, ?/50}], {?, 0, 2 ?}, PlotRange -> 1/2, 
   ViewPoint -> 5 {Cos[t], Sin[t], 0}, Boxed -> False, Axes -> False, 
   ImageSize -> 540, SphericalRegion -> True, Background -> cols[[2]],
    PlotStyle -> Directive[Thickness[.004], cols[[1]]]], {t, 0, ?}]
 ]
4 Replies
Posted 8 years ago
POSTED BY: J. M.

Nice. I think I switched from meshes to individually-plotted curves because the mesh was not playing very nicely with the surface I originally had in this. Of course, when I got rid of the surface altogether, I should have gone back to the mesh, since it's faster and conceptually simpler.

Incidentally, what's the reason for using With rather than DynamicModule?

Posted 8 years ago

Since you aren't dynamically changing cols in your Manipulate[] (which I'd say is really the only reason to use DynamicModule[]), simply injecting them with With[] suffices.

POSTED BY: J. M.

enter image description here - another post of yours has been selected for the Staff Picks group, congratulations !

We are happy to see you at the top of the "Featured Contributor" board. Thank you for your wonderful contributions, and please keep them coming!

POSTED BY: Moderation Team
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