Re: A89: 3d programming


[Prev][Next][Index][Thread]

Re: A89: 3d programming




Displaying "3d" graphics on a 2D surface is the realm of linear algebra.  What
you are doing, in effect, is modeling a 3d object, then projecting it onto a 2D
surface.

This involves converting your 3d object into x,y, and z coordinates relative to
the screen you are displaying it on, and throwing away the z value before
displaying it on the screen.  There is more to it if you want to do perspective
shots as well, which changes how you convert your object into the x,y, and z
screen dimensions.

To really *understand* 3D, you need to study linear algebra (doesn't require any
calculus, it's just a step up from algebra) which is the method of solving
multiple equations with multiple variables simultaneously.

It looks like all you are asking for, though, are the 'equations' to do this for
you, so you don't have to really delve into much math.  In that case, take the
programs which are already made, and use them to learn from.  You will NOT be
able to find a set of equations which do what you want, but you will find
various algorithms that accomplish most of what you are aiming for.  Of course,
this means you are taking someone else's engine, and trying to cram in into your
car, so we all know it really won't work all that well.  But to really
understand this material, you're going to have to do a lot more studying than
asking a mailing list for 'the math ... needed for 3d'  (I'm not knocking that
method, some very good programs come from the creative use of other's 3d
engines.  But I did want to make sure you understand that it would be
unproductive trying to learn 3d graphics programming from a mailing list,
studying other people's programs, and through 3d websites without having a
basic, underlying understanding of linear algebra.  You WILL end up with much
more code and kluges trying to make 3d without this that you will with it.)

-Adam

Glenn Murphy wrote:
> 
> This isn't exactly 68k specific but, right now that's what I'm aiming for.
> What I want, is to know what kind of math is needed for 3d programming (not
> knowing is due to my school lacking in every academic (and athletic)
> department imaginable...and a little bit due to me :) ).  And, if you don't
> mind, I would like to know how that would be implemented in 68k asm.  My
> game will just be using lines, so the 89/92+ should be fast enough to handle
> it (unless my programming skills are lacking more than I thought).  Thank
> you for your time, help and patience in bearing with my questions.
> 
> Thanks,
> Glenn Murphy



References: