Launch rocket with countdown and acceleration in stdout: Difference between revisions
Launch rocket with countdown and acceleration in stdout (view source)
Revision as of 15:01, 8 August 2019
, 4 years ago→{{header|Perl 6}}: A little exposition, no programming changes
Thundergnat (talk | contribs) (→{{header|Perl 6}}: A little exposition, no programming changes) |
|||
Line 114:
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.
The motion is a little "jerky" as the vertical resolution in a terminal is rather low. See example gif. Exits after the rocket leaves the visible area of the terminal.▼
▲The motion is a little "
<lang perl6>signal(SIGINT).tap: { cleanup() }
|