Skip to content
Sign upLog in
← Back to Community

Ideal rocket simulator

Profile icon
CodeLongAndPros

This is a bit of math and turtles, in python, to simulate the ideal flight of a rocket.

The function assumes that there is no air resistance, the rocket is massless, and that application of thrust is at t=0.

If you actually want to launch a rocket, do not use this.

The x value is one order of magnitude greater that the returned value for the purpose of graphing. The Y-axis is not distorted.

The red line is when the rocket is falling. The green line is when the rocket is ascending.

Voters
Profile icon
osiudhosduihfos
Profile icon
HahaYes
Profile icon
DynamicSquid
Profile icon
HADRONZ
Profile icon
oignons
Profile icon
ARJPEG
Profile icon
21natzil
Profile icon
JoeyLent
Profile icon
DUDEMASTER169
Profile icon
HerculukeZeEpic
Comments
hotnewtop
Profile icon
ElixirAlpha

AMAZING MAN! GREAT JOB!!!

Profile icon
codeitfast

if you want the turtle to go faster, you will want t.speed(100) to be t.speed(0). It is the fastest possible turtle speed (except for goto).

Profile icon
DynamicSquid

This is one of the best things I've ever seen!

Profile icon
lolgod2

What will be the starting velocity (V0) of the rocket? -10000
What will be the starting height of the rocket? 250000
umm I'm stuck

Profile icon
DUDEMASTER169

SO AWESOME!!!!!!!

Profile icon
HerculukeZeEpic

cool, I put it in a infinate loop!

Profile icon
CodeLongAndPros

@HerculukeZeEpic
I’d say you reached space…

Profile icon
Navinor

congrats ;)
image

Profile icon
CodeLongAndPros

@Warhawk947
Thanks. This is the product of algebra and boredom + python knowledge.

Profile icon
Navinor
Profile icon
AgastyaSandhuja

this is really cool

Profile icon
CodeLongAndPros

@AgastyaSandhuja
Thanks. Couldn't get the better set of equations to work though.

Profile icon
AgastyaSandhuja

it's still good :-)

@CodeLongAndPros

Profile icon
CodeLongAndPros

@AgastyaSandhuja
I know. Just wish it was better. Looking for a college textbook to find the right equations. Google failed me.