Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!cbmvax!cbmehq!cbmger!peterk From: peterk@cbmger.UUCP (Peter Kittel GERMANY) Newsgroups: comp.sys.amiga.tech Subject: Fast circles? Keywords: Circles, fast, Blitter Message-ID: <656@cbmger.UUCP> Date: 20 Dec 90 12:03:10 GMT Organization: Commodore Bueromaschinen GmbH, West Germany Lines: 61 Here a question for a little project I perhaps would like to continue during the holidays: I want to draw FAST, filled circles in arbitrary size and in arbitrary (but solid) color on a 4-bitplane hires screen. You see, I still love these first-day Caleidoscope demos and want to do similar things on my own. BTW: These Caleidoscope demos had an announcement in their opening screen that this was only a demo for a real, coming product by Electronic Arts with which you were said to be able to create all such effects on your own. But this product never made it to the public. I already wrote to EA whether they could let me the source for it but got no answer. Anyone existing with better connections to them? So I was left on my own. I already achieved some nice line art effects, also solid area things, but my current attempts with circles are not very satisfying. So: what strategy is optimal? 1. Is AreaEllipse() simply the best? (I tried it, see above.) 2. I already tried to make up my own 32-edge polygon and draw it with AreaDraw()/AreaEnd. I would prefer to find a faster solution. 3. Would it be better to manage the 4 bitplanes separately by hand in an own loop? Which Blitter commands would be appropriate for this from C? One advantage in this special situation is that the objects have solid color. Thus the mask for any cookie-cutting has the same shape in every bitplane as the object itself, it only has to be inverted for some (or null) of the bitplanes. I imagine a single bitmap set aside which holds a one-bitplane circle and its inverted image and using this as sources for all the Blitter operations. Perhaps I can make this bitplane a little bigger providing space for circles and masks of many different sizes so that they only need to be computed one single time at start. Hmm, do I really need that inverted circle image? Isn't this inversion already done by simply using the proper minterms for the Blitter? (You see, I'm no expert in this, ... yet :-) 4. To avoid flickering, I think about syncing the drawing with WaitTOF(). If one circle is too big to get drawn fully during one vertical scan (I assume this program runs alone on the machine, NO multitasking, pure demo as fast as possible), then I think about cutting the circle in two halfs (or even more parts) so that the eye perhaps may follow the drawing process but sees no color flickering resulting from incomplete bitmaps. 5. Would it be necessary to turn to assembler to gain further performance? Well, if some kind soul may enlighten me or simply point me to the proper place in the RKMs... Have a nice Christmas and a happy plus successfull new year! -- Best regards, Dr. Peter Kittel // E-Mail to \\ Only my personal opinions... Commodore Frankfurt, Germany \X/ {uunet|pyramid|rutgers}!cbmvax!cbmger!peterk