Message Boards Message Boards

GROUPS:

[✓] Plot roller coaster mathematics?

Posted 1 year ago
1243 Views
|
3 Replies
|
2 Total Likes
|

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

3 Replies

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

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 1 year ago

Thank you very much Marco !!

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