Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Draw that Circle
#11
(08-26-2022, 06:05 PM)SMcNeill Wrote:
(08-26-2022, 05:59 PM)bplus Wrote: Wow BF makes that much a difference? Seems like something is wrong about Line?

BF is highly optimized and is *much* faster than line, just as DO is faster than FOR...

A FOR loop has to track Start, Stop, Step, counting up or down...   A DO loop is just DO.. LOOP and the user has to deal with the exit conditions.  There's a lot less code to process for a DO-LOOP than there is a FOR-Next...

Same way with a line vs a line, BF.   A line has slope.  You calculate rise/run, do a loop, plot the necessary pixels, increment to the next pixel...

BF is just:
FOR y = start to stop
   memfill x, x.start, s.stop, kolor
NEXT

Care to guess which is going to be faster, once you think about the basic premise behind them?  

BF is always quite a bit faster than without it.  Wink


Oh yes, got it! Thanks for explaining.
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply


Messages In This Thread
Draw that Circle - by James D Jarvis - 08-26-2022, 04:00 PM
RE: Draw that Circle - by bplus - 08-26-2022, 05:34 PM
RE: Draw that Circle - by bplus - 08-26-2022, 05:39 PM
RE: Draw that Circle - by SMcNeill - 08-26-2022, 05:49 PM
RE: Draw that Circle - by James D Jarvis - 08-26-2022, 05:56 PM
RE: Draw that Circle - by James D Jarvis - 08-26-2022, 05:49 PM
RE: Draw that Circle - by bplus - 08-26-2022, 05:54 PM
RE: Draw that Circle - by bplus - 08-26-2022, 05:59 PM
RE: Draw that Circle - by SMcNeill - 08-26-2022, 06:05 PM
RE: Draw that Circle - by SMcNeill - 08-26-2022, 05:59 PM
RE: Draw that Circle - by bplus - 08-26-2022, 06:18 PM
RE: Draw that Circle - by James D Jarvis - 08-26-2022, 06:33 PM
RE: Draw that Circle - by mnrvovrfc - 08-26-2022, 09:44 PM
RE: Draw that Circle - by justsomeguy - 08-28-2022, 01:26 AM
RE: Draw that Circle - by SMcNeill - 08-28-2022, 03:32 AM
RE: Draw that Circle - by justsomeguy - 08-28-2022, 04:13 AM
RE: Draw that Circle - by SMcNeill - 08-28-2022, 05:55 AM
RE: Draw that Circle - by justsomeguy - 08-28-2022, 06:29 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Draw Worms Study bplus 15 923 01-01-2026, 08:23 PM
Last Post: bplus
  The Curve statement, an improved Circle 2112 6 707 11-02-2025, 09:45 PM
Last Post: bplus
  Bright Circle Colors SierraKen 4 643 08-23-2025, 03:33 PM
Last Post: DANILIN
  Another way to draw rounded rectangles James D Jarvis 4 1,365 10-09-2024, 07:11 PM
Last Post: James D Jarvis
  Rotating Circle CharlieJV 0 529 08-06-2022, 02:56 AM
Last Post: CharlieJV

Forum Jump:


Users browsing this thread: 2 Guest(s)