From: Carsten Svaneborg Newsgroups: comp.os.msdos.djgpp Subject: Re: Orbiting Spheres? Date: Fri, 15 May 1998 22:37:21 +0200 Organization: REMOVE all 'a''s from email address! Lines: 41 Message-ID: <355CA781.65B25288@aafys.aaaku.aadkaaa> References: <000401bd75d9$069ac040$cf4b08c3 AT arthur> NNTP-Posting-Host: fys-170.risoe.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Arthur wrote: > The problem's a lot more complex than using conservation of > momentum, but it's sparked an idea... From using momentum > you've got to apply all sorts of stuff like Newtonian Physics, > restitution and that. Yes, Newtons second law of motion for both the starship and the sphere, mA=F where A is the 2d acceleration vector, and F the force. On the starship there is 3 forces acting, Gravity pointing downward (or upward if your screen is upside down), the thrust pointing in the the forward direction, the pull of the sphere, can be modeled as being a rigid rod, a spring, or a wire connection, depending on preference. A rod can transfer torque about the center of mass, depending the mass and relative velocity of the starship and sphere. The difference being that a spring will have a soft distance dependent force, and the wire a step like distance dependent force (0 when slack, large (infinite) when taut). > Is there an easy way of patching the keyboard to register a > number of different keys (say 6) being pressed at the same > time? Of course there is, but how is it done? When a key is depressed a scancode is generated, and when it's lifted another scancode is generated, so you would have to grab the scan codes somehow and interprete them. Isn't a IRQ generated each keypress?, so there must be an interrupt handler, which could be intercepted. Have you checked x2ftp.oulu.fi they have loads of games programming code, probably also keyboard source. -- * from zqex Salespersons please use the backdoor \dev\null * * Darwinism or Christianity? * * Well remember Christianity is only a theory * * Homepage: http://www.fys.ku.dk/~zqex/c.cgi *