Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.164 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.67; '*S*': 0.00; 'say,': 0.05; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'appreciated,': 0.16; 'at,': 0.16; 'bug...': 0.16; 'gained': 0.16; 'horizontally': 0.16; 'landing': 0.16; 'measured': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'result:': 0.16; 'rotation': 0.16; 'vpython': 0.16; 'everyone,': 0.17; 'jan': 0.18; 'input': 0.18; 'changes': 0.20; 'equivalent': 0.20; 'trying': 0.21; '(all': 0.22; 'minor': 0.22; 'subject:problem': 0.22; "i'd": 0.22; "i've": 0.23; 'values': 0.26; 'guess': 0.27; 'accuracy': 0.27; 'header:X-Complaints-To:1': 0.28; 'fine': 0.28; 'initial': 0.28; 'crash': 0.29; 'horizontal': 0.29; 'vector': 0.29; 'vertical': 0.29; "i'm": 0.29; 'designated': 0.30; 'fri,': 0.30; 'code': 0.31; 'point': 0.31; '(and': 0.32; 'could': 0.32; 'getting': 0.33; 'safely': 0.33; 'url:home': 0.33; 'problem': 0.33; 'to:addr:python-list': 0.33; 'code:': 0.33; 'version': 0.34; 'text': 0.34; 'direction': 0.35; 'received:org': 0.36; 'really': 0.36; 'except': 0.36; 'but': 0.36; 'visual': 0.36; "didn't": 0.36; "i'll": 0.36; 'subject:with': 0.36; 'charset:us-ascii': 0.36; 'unable': 0.36; 'being': 0.37; 'subject:: ': 0.38; 'degree': 0.38; 'some': 0.38; 'instead': 0.39; 'to:addr:python.org': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'help': 0.40; 'most': 0.61; 'real': 0.61; 'fire': 0.62; 'land': 0.62; 'close': 0.63; 'perfect': 0.63; 'more': 0.63; 'here': 0.65; 'fuel': 0.65; 'stuck': 0.65; 'due': 0.66; 'life': 0.66; 'sum': 0.66; 'college': 0.71; 'press': 0.71; 'low': 0.83; '180': 0.84; '2013': 0.84; 'coming,': 0.84; 'game,': 0.84; 'hour,': 0.84; 'jet': 0.84; 'ship.': 0.84; 'sight': 0.84; "they'd": 0.84; 'was...': 0.84; 'email addr:hotmail.com': 0.88; 'burn': 0.91; 'dennis': 0.91; 'drops': 0.91; 'exam': 0.91; 'graphical': 0.91; 'impact.': 0.91; 'inches': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: problem with exam task for college Date: Fri, 04 Jan 2013 17:11:56 -0500 Organization: > Bestiaria Support Staff < References: <6f3c7fdf-7439-43b1-b3a2-da9da019b1ec@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-76-253-98-240.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 3.3/32.846 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 42 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1357337518 news.xs4all.nl 6915 [2001:888:2000:d::a6]:55948 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:36142 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.
right now i am completely stuck on trying to make the visual of the ship rotate.
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/