flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
avcaballero 01 Jun 2009, 07:56
Someone asked it to me, so i put it here if it could be on interest. Code in masm sintax, sorry, and spanish commets, sorry... I'm in a hurry.
There are many circle algorithms, this one is "Bresenham" one. It uses octants similarity on circles. It must be changed for screen aspect egg-circle result. For this maybe ellipse-algorithm. Bye EDIT (2x) by DOS386 2009-06-04 : enhanced subject, adding note: this post has an attachment visible for registered users only, see also below
|
|||||||||||
![]() |
|
avcaballero 01 Jun 2009, 13:47
Well, here it is, very simple code... comments in spanish yet... to lazy now...
|
|||||||||||
![]() |
|
rCX 01 Jun 2009, 16:02
Very cool, thanks for sharing it.
(This is my 100th post! ![]() |
|||
![]() |
|
DOS386 04 Jun 2009, 13:58
What is it supposed to do ? All what I get is a big black screen with a thin white potato (might be a fault of my electron ray based monitor) outline
![]() http://en.wikipedia.org/wiki/Midpoint_circle_algorithm ??? |
|||
![]() |
|
avcaballero 04 Jun 2009, 15:51
Correct. Very simple, only a timid gentleman potato in a dark world. Did i say i would put a demo?. Perhaps everybody did not know an algorithm in assembler to draw one lady potato. Slightly more complicated (yes not very much...) is to feed the potato until it becomes a ring. I do not put the code because I already know that everyone is in masterful level
![]() |
|||
![]() |
|
bitRAKE 05 Jun 2009, 01:54
I wonder if the eight pixel updates could be efficiently integrated with something like:
Code: mov [edi],ecx mov [edi+ebx*2],ecx mov [esi],ecx mov [esi+ebp*2],ecx lea edi,[edi+ebp*2] lea esi,[esi+ebx*2] mov [edi],ecx mov [edi+ebx*2],ecx mov [esi],ecx mov [esi+ebx*2],ecx Look at Abrash's book "The Zen of Graphics Programming." Hardenbergh's algorithm from the book, Chapter 18. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.