Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uwm.edu!zaphod.mps.ohio-state.edu!mips!pacbell.com!att!ucbvax!pasteur!cory.Berkeley.EDU!morgan From: morgan@cory.Berkeley.EDU (Alan Morgan) Newsgroups: comp.sys.amiga.programmer Subject: Re: 3D stuff & quick line drawing Message-ID: <12923@pasteur.Berkeley.EDU> Date: 22 Apr 91 02:06:11 GMT References: <1991Apr21.081925.4722@lynx.CS.ORST.EDU> Sender: news@pasteur.Berkeley.EDU Reply-To: morgan@cory.Berkeley.EDU Lines: 39 In article <1991Apr21.081925.4722@lynx.CS.ORST.EDU> divineg@prism.CS.ORST.EDU writes: > > Here's my situation: > >I've coded and coded and coded and finally found a way to crudely rotate >3 dimensional objects ... now all of you wizards out there, what's the >quickest way to draw a line? I'd like to do it with the Blitter (I can >use the processer to calculate while I draw lines) or is it better to use >the 68'? By the way, I'm using C & asm (pretty original, huh?). > Please post your responses, I'm interested in what kind of >discussion follows..... If you haven't already you should pick up a copy of Foley, van Dam, Feiner, and Hughes _Computer Graphics: Principles and Practice_ 2nd Ed. which tells you everything you ever wanted to know about 2D, 3D, 9D (haven't checked, but I'm sure its in there :) ) graphics. They list a line drawing method invented by a man named Bressenham which uses no floating point calculations, only integer multiplications by 2. Not being a Blitter guru (or even a Blitter incompetent, my knowledge is far less) I can't tell you if this is workable, but you should give it a try. Incidently, if you are trying to get blinding speed you probably don't want to spend your entire life juicing up the line drawing algorithm for a coupla reasons: 1. Other things, such as rotation and clipping are much slower and thus should be accorded more attention 2. If you do polygon fills (i.e. solid 3D objects) you will only ever need to draw horizontal lines. *THESE* you can make really fast using the Blitter. > >Yenivid Edalg 8^) >(E-Mail me at divineg@prism.cs.orst.edu) Alan Morgan