Launch rocket with countdown and acceleration in stdout: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) (→{{header|Perl 6}}: A little exposition, no programming changes) |
|||
Line 114: | Line 114: | ||
Uses ANSI graphics. Works best in a 24 bit ANSI terminal at least 80x24, though bigger is better. |
Uses ANSI graphics. Works best in a 24 bit ANSI terminal at least 80x24, though bigger is better. |
||
This is a very simple simulation. It assumes a constant ~2G+ acceleration in a gravitational field; so net +10 meters per second². It completely neglects the effects of [[wp:Drag_(physics)|air friction]], [[wp:Impulse|impulse]], [[wp:Snap,_Crackle_and_Pop#Physics|snap, crackle & pop]] and has an unrealistically clean fuel burn (no contrail). It does however (unlike most of the entries at this time) start at the base of the terminal (on the ground) and go up, rather than starting at the top and dropping a contrail. It calculates and displays an accurate displacement and velocity over time and uses those to scale its vertical screen displacement. |
|||
⚫ | |||
⚫ | |||
<lang perl6>signal(SIGINT).tap: { cleanup() } |
<lang perl6>signal(SIGINT).tap: { cleanup() } |