Re: [stella] Real 3D Space Calculations

Subject: Re: [stella] Real 3D Space Calculations
From: Ronald Gershwin <wazzapfool@xxxxxxxxx>
Date: Mon, 27 Aug 2001 09:07:28 -0700 (PDT)
That solution would work good if you just wanted to
rotate.  Converting the polar coordinates to 2-d
coordintes would be a snap too, because you could just
say 'ok, left side of the screen corresponds to -45
degrees horizontal, middle is 0, and right is +45
degrees' or whatever (Might cause a little distortion
around the edges, but should be ok).  But it's kind of
like robbing Peter to pay Paul, because then you'd
have to do a lot of trigonometry to do any linear
*movement* in the 3-d world...

Ben L.
aka Ronald Gershwin :)

--- Chris Wilkson <ecwilkso@xxxxxxx> wrote:
> I'm surprised that no one has mention spherical
> coordinates yet.
> 
> For those who don't know, these consist of 2 angles
> (theta and phi)
> and a radius (r).  They are all referenced to the
> center of the sphere.
> One way to implement it is to have theta and phi
> range from 0 to 180
> degrees (or -90 to +90) and have r range from -x to
> +x, where x is the
> maximum distance.
> 
> An example:  Moving your head.  If you spin your
> head left to right,
> theta measures the angle from the center.  Looking
> straight ahead is
> zero.  If you nod your head up and down, phi
> measures that angle.
> Again, looking straight ahead is zero.  This gives
> you vision of the
> hemisphere in front of you.  Going on with the
> example...r measures
> the distance from the center of your head.  Positive
> r is in front of
> you, negative r is behind you.
> 
> Now, when your ship rotates, all you have to do is
> add angles...not
> multiply.  Of course at some point, you need to
> convert to screen
> coordinates, but this can be done using sine and
> cosine lookup tables....
> 
> -Chris
> 
> On Fri, 24 Aug 2001, Glenn Saunders wrote:
> 
> > <<
> > Even this would be hard, though.  For one, it
> involves
> > multiplication and division of non-power-of-2
> numbers,
> > and values that won't fit in 8 bits...and that's
> just
> > the beginning...
> > >>
> >
> > Really the best approach is to disassemble Star
> Raiders for the 400/800.
> > It's only 8K.  SR has more accurate pseudo-3D
> coordinate system than any
> > 8-bit space sim I know of outside of Elite, and
> Elite (as I remember it on
> > the Apple II at least) had a really sluggish
> framerate so I don't think that
> > would be a good game to copy.
> >
> > You could also look at the disassembly of Solaris.
>  Even though it's behind
> > the ship perspective, it's still kinda 3D with the
> radar and all.
> >
> >
> >
> >
>
_________________________________________________________________
> > Get your FREE download of MSN Explorer at
> http://explorer.msn.com/intl.asp
> >
> >
> > -
> > Archives (includes files) at
> http://www.biglist.com/lists/stella/archives/
> > Unsub & more at
> http://www.biglist.com/lists/stella/
> >
> 
> 
> -
> Archives (includes files) at
> http://www.biglist.com/lists/stella/archives/
> Unsub & more at http://www.biglist.com/lists/stella/


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

-
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/

Current Thread