Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #36142
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Subject | Re: problem with exam task for college |
| Date | 2013-01-04 17:11 -0500 |
| Organization | > Bestiaria Support Staff < |
| References | <6f3c7fdf-7439-43b1-b3a2-da9da019b1ec@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.103.1357337518.2939.python-list@python.org> (permalink) |
On Fri, 4 Jan 2013 10:23:24 -0800 (PST), jeltedeproft@hotmail.com
declaimed the following in gmane.comp.python.general:
> hy everyone, for my exam this year i had to write a computer game on vpython (visualpython).we had to make a lunar lander game where the ship drops by gravity and is able to manouver to safely land on the moon.<br>right now i am completely stuck on trying to make the visual of the ship rotate.<br>i'm new to this forum, i guess i'll just paste my code here. Everything works fine on the game, except the rotation of the ship. however the when you press "up" the after rotating the velocity actually changes direction , but the visual doesn't. i'm getting kinda nervous because due date is coming, any help is appreciated, here is the code:
>
Except for the initial de-orbit burn, the lunar landers didn't
really rotate during the descent phase. The main engine was used to
control the fall from gravity (vertical speed), and maneuvering
thrusters on all sides were used to "slide" the LEM horizontally (and
somewhat vertically, until actually "stopping" the descent to land). One
reason is that "riding the main engine" down (rotating) would result in
being unable to see the landing point -- instead of "hovering" on the
main jet while traversing for the best flat spot.
Instead of rotating the LEM to fire X-lbs of fuel at, say, a 45
degree angle, they'd fire X/Y1 vertically, and X/Y2 horizontally, where
the Y1&Y2 values result in a vector sum equivalent to X at 45 degrees.
Most all of the graphical lunar lander games I've seen start with
the LEM in the vertical/upright position and only control descent and
horizontal velocity.
My college version (all text in those days, no graphics at all) had
one minor bug... No check was made on input values; one could enter:
burn -100 lbs of fuel
at 180 degrees (0 degrees was straight down)...
The result: one gained fuel while still slowing the ship. I used to
crash with more fuel than I started out with. The game scored by how
close to the designated target sight one came, and how hard the impact
was... I once managed a near perfect accuracy score, with a low vertical
impact. Problem -- in real life I'd have left the landing gear some 30
miles away... My vertical rate was measured in inches per hour, but the
horizontal rate started in miles per hour... I SLID into the landing
zone!
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
problem with exam task for college jeltedeproft@hotmail.com - 2013-01-04 10:23 -0800
Re: problem with exam task for college Chris Angelico <rosuav@gmail.com> - 2013-01-05 05:59 +1100
Re: problem with exam task for college Chris Angelico <rosuav@gmail.com> - 2013-01-05 06:00 +1100
Re: problem with exam task for college MRAB <python@mrabarnett.plus.com> - 2013-01-04 19:17 +0000
Re: problem with exam task for college Joshua Landau <joshua.landau.ws@gmail.com> - 2013-01-04 19:18 +0000
Re: problem with exam task for college Chris Angelico <rosuav@gmail.com> - 2013-01-05 06:30 +1100
Re: problem with exam task for college jeltedeproft@hotmail.com - 2013-01-04 12:01 -0800
Re: problem with exam task for college Chris Angelico <rosuav@gmail.com> - 2013-01-05 07:36 +1100
Re: problem with exam task for college Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-01-05 16:09 -0500
Re: problem with exam task for college jeltedeproft@hotmail.com - 2013-01-04 12:01 -0800
Re: problem with exam task for college Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-01-04 17:11 -0500
Re: problem with exam task for college jeltedeproft@hotmail.com - 2013-01-05 04:24 -0800
Re: problem with exam task for college Chris Angelico <rosuav@gmail.com> - 2013-01-05 23:39 +1100
Re: problem with exam task for college jeltedeproft@hotmail.com - 2013-01-05 05:14 -0800
Re: problem with exam task for college Chris Angelico <rosuav@gmail.com> - 2013-01-06 00:32 +1100
Re: problem with exam task for college jeltedeproft@hotmail.com - 2013-01-07 08:22 -0800
Re: problem with exam task for college Vincent Vande Vyvre <vincent.vandevyvre@swing.be> - 2013-01-07 18:40 +0100
Re: problem with exam task for college Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-01-07 15:36 -0500
Re: problem with exam task for college jeltedeproft_8@hotmail.com - 2013-01-13 04:29 -0800
Re: problem with exam task for college jeltedeproft@hotmail.com - 2013-01-13 04:48 -0800
Re: problem with exam task for college jeltedeproft@hotmail.com - 2013-01-13 05:57 -0800
Re: problem with exam task for college Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-01-13 17:28 +0000
Re: problem with exam task for college stefaang@gmail.com - 2013-01-14 04:57 -0800
Re: problem with exam task for college jeltedeproft@hotmail.com - 2013-01-14 08:01 -0800
Re: problem with exam task for college Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-01-14 13:54 -0500
csiph-web