Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Another small filled circe sub (not as fast as fcirc)
#94
I suspect I know what this is doing:
Code: (Select All)
e = e + 2 * y0
else
e = e - 2 * x0

Can you put it into words so maybe I can confirm my suspicions.

BTW what we are calling Steve's is a version of Bresenham
from StackOverFlow
void circle(Point p, int r) {
int x = 0;
int y = r;
int f = 1-r;

// plot vert/horiz points indepedently

while (x<y) {
x++;

if (f<0) {
f += 2*x+1;
} else {
y--;
f += 2*(x-y+1);
}

glRecti(p.x+x, p.y+y, p.x+x+1, p.y+y+1);
// plot other points using 8 way symmetry

// attempt to fill the circle - didn't go well
plotLine(Point(p.x, p.y+x), Point(p.x+x, p.y+x));

}
}


Update: that code is wrong! "didn't go well" indeed! Smile

which looks more like vince version!

No creators here just copiers LOL we stand on shoulders of other great copiers.
BTW I was just watching argument of Creationist against evolution because I got into discussion about man not evolving from ape but BOTH evolving from a common ancestor species down the tree of Life.
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply


Messages In This Thread
RE: Another small filled circe sub (not as fast as fcirc) - by bplus - 09-03-2024, 04:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  A Small Game Tutorial (from 2014) SMcNeill 2 981 11-13-2023, 09:11 PM
Last Post: Kernelpanic
  Small exploding image and fade-out effect Dav 18 3,546 09-08-2023, 11:16 PM
Last Post: dbox
  Space Orbs. Small screen saver. Dav 16 3,169 08-27-2023, 07:52 PM
Last Post: grymmjack
  Ball Sub - draws several kind of filled, textured balls (circles) Dav 15 3,503 08-23-2023, 09:31 PM
Last Post: Dav
  Improved my small Gradient Ball drawing SUB Dav 22 5,339 07-13-2023, 05:23 PM
Last Post: Dav

Forum Jump:


Users browsing this thread: 1 Guest(s)