Message Boards Message Boards

0
|
2586 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Avoid ParametricPlot3D producing curves that are "under-sampled"?

Posted 7 years ago

I was trying to display an animation of two amortized sinusoids that cross each other, like in the example below:

EB[x_, t_] := Cos[2*Pi*x - t]/(1 + 0.125*x^2)
Animate[ParametricPlot3D[{{u, 0, EB[u, t]}, {5, 5 - u, EB[u, t]}}, {u,
    0, 10}, PlotRange -> {{0, 10}, {-5, 5}, {-1, 1}}, 
  ImageSize -> Scaled[0.8], AxesOrigin -> {0, 0, 0}, 
  Boxed -> False], {t, 0, 2*Pi}]

As you can see, the first curve displays as expected, but the second (orange) one is ugly. How can I sort this out ?

Many thanks for your time.

Yohann

POSTED BY: Yohann Bénédic
4 Replies

Ok, thank you for your insights.

POSTED BY: Yohann Bénédic

When making an animation we must make a compromise between the smoothness in space of every single frame and the smoothness through time. The internal algorithm chooses what to sacrificed, and it is not always the best for human judgement. With PerformanceGoal -> "Quality" we force Mathematica to give precedence to space accuracy.

POSTED BY: Gianluca Gorni

You can try giving the option PerformanceGoal -> "Quality", or PlotPoints->50 or more.

POSTED BY: Gianluca Gorni

Thank you! That's exactly what I needed, It did the trick (esp. the second proposition).

However, I don't understand why the two curves were not treated the same regarding Quality or PlotPoints in the first place. I would have expected both to have the same look (both nice, lucky me then, or both ugly and I would then have to enhance PlotPoints or Quality).

POSTED BY: Yohann Bénédic
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