02-24-2004, 03:22 PM
Heckbert fill proceeds scanline by scanline. Don't know how it fits into your classification. I once posted it for Jark at this forum,
http://forum.qbasicnews.com/viewtopic.ph...t=heckbert
In a stack the last item you push is the first you retrieve. A stack is Last In-First out (LIFO). In a queue the first item pushed is the first you Retrieve (FIFO).
I can also post a very simple RECURSIVE Hilbert curve algorithm. I remember you hating recursion.... :evil:
Edited:
http://forum.qbasicnews.com/viewtopic.ph...t=heckbert
In a stack the last item you push is the first you retrieve. A stack is Last In-First out (LIFO). In a queue the first item pushed is the first you Retrieve (FIFO).
I can also post a very simple RECURSIVE Hilbert curve algorithm. I remember you hating recursion.... :evil:
Edited:
Code:
'Hilbert curve
DECLARE SUB Hilbert (r1%, r2%, level%)
SCREEN 12
PSET (0, 0)
clr% = 12
Hilbert 2, 0, 8
a$ = INPUT$(1)
END
SUB Hilbert (r1%, r2%, level%)
SHARED clr%
IF level% THEN
Hilbert r2%, r1%, level% - 1
LINE -STEP(r1%, r2%), clr%
Hilbert r1%, r2%, level% - 1
LINE -STEP(r2%, r1%), clr%
Hilbert r1%, r2%, level% - 1
LINE -STEP(-r1%, -r2%), clr%
Hilbert -r2%, -r1%, level% - 1
END IF
END SUB
Antoni