English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 30 January 2012, 14:20   #1
h0ffman
Registered User
 
Join Date: Aug 2008
Location: Salisbury
Posts: 752
Drawing circles

Just a theoretical thread here. I've been thinking about how people draw circles in Assembly. The theory i thought was...

1. Plot the dots either side with the CPU
2. Blitter fill

I've seen loads of demos where the circles change in size, my guess here is you have a large high definition sine list and pre-calc the points for each different size of circle?

Just wondered if I was on the right lines here....
h0ffman is offline  
Old 30 January 2012, 21:55   #2
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
h0ff - drop me an email so I remember but I'm sure I've got some code for drawing circles that you can either plug into what you're working on or at least use as a springboard for your own routine.
pmc is offline  
Old 31 January 2012, 11:41   #3
WayneK
Registered User
 
Join Date: May 2004
Location: Somewhere secret
Age: 50
Posts: 366
It depends what you're doing with the circles - what you suggested is one common way to do it (precalc for each radius size, plot+fill) if the circles were smallish - afaik most large circles used the pyramid/scanline method (bitplane contains a large pyramid, until the base is as wide as the widest circle radius you need - then you 'just' show the correct line of the pyramid for each scanline of your circle, again from a precalced list of which widths to show...all those demos with the enormous 1-circle-per-bitplane 'vectorballs' were done this way I believe).
WayneK is offline  
Old 31 January 2012, 11:52   #4
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,833
Quote:
Originally Posted by h0ffman View Post
I've seen loads of demos where the circles change in size, my guess here is you have a large high definition sine list and pre-calc the points for each different size of circle?
No need for sine lists! Check out the mid-point algorithm: http://en.wikipedia.org/wiki/Midpoint_circle_algorithm. Precalculating the circles sounds like a fine plan, and you only need a quarter of each circle.
Thorham is offline  
Old 31 January 2012, 22:25   #5
h0ffman
Registered User
 
Join Date: Aug 2008
Location: Salisbury
Posts: 752
Cool, was just checking the Assembly theory I had in my head was what right, well, in relation to amiga assembly and hardware at least

I like the bitplane / pyramid idea, you could probably have some super phat AGA circle drawn with that !
h0ffman is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Old drawing of a book absence request.Other 8 04 June 2012 17:19
Drawing a line... Lonewolf10 Coders. Tutorials 24 06 September 2011 00:46
Crop Circles & Shoot Em ups... ST Dragon Retrogaming General Discussion 7 17 September 2009 16:30
drawing tablet improvements pbareges request.UAE Wishlist 2 10 April 2009 14:06
USB Drawing tablet support. oldpx request.UAE Wishlist 3 28 July 2004 13:24

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 14:16.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07395 seconds with 13 queries