Hi,
I found an article on Roller Coasters in Mathematica
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
danl
(Daniel Lichtblau)
September 17, 2017, 9:27pm
2
I should think it would require a definition for tube[]. Other than that, probably the DisplayFunction -> $DisplayFunction can be removed.
mthiel
(Marco Thiel)
September 17, 2017, 10:01pm
3
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
Cheers,
Marco
Thank you very much Marco !!