Message Boards Message Boards

0
|
6395 Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:

[?] Plot roller coaster mathematics?

Posted 7 years ago

Hi,

I found an article on Roller Coasters in Mathematica http://library.wolfram.com/infocenter/Articles/1217/#downloads But unfortunately I do not succeed in getting any graphical output, nothing is shown...

u = 0; While[u <= 4 \[Pi], u = u + uStep[u];
 Show[tube[u], track,
  Axes -> False, 
  PlotRange -> {{-2.25, 2.25}, {-1.1, 1.1}, {-2.25, 2.25}},
  Boxed -> False, DisplayFunction -> $DisplayFunction]]; Clear[u]

I suppose as this code was made back in 1999 that in Mathematica 11.2 the commands must be given differently. Who can make this code display something?

Kind regards, Bert

POSTED BY: Bert Aerts
3 Replies

Dear Bert,

the code seems to work just fine form me (MMA11.2).

You might want to modify the last lines like so:

Monitor[list = {}; u = 0; While[u <= 2 \[Pi], u = u + uStep[u];
AppendTo[list,Show[tube[u], track, ViewPoint -> {3, -2, 1}, Axes -> False, PlotRange -> {{-3.6, 3}, {-3.3, 3.3}, {-2.1, 2.4}}]]], u]

If you then run

ListAnimate[list]

you get

enter image description here

Cheers,

Marco

POSTED BY: Marco Thiel

I should think it would require a definition for tube[]. Other than that, probably the DisplayFunction -> $DisplayFunction can be removed.

POSTED BY: Daniel Lichtblau
Posted 7 years ago

Thank you very much Marco !!

POSTED BY: Bert Aerts
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