Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,27 @@
_window = 1
_width = 600
_height = 500
local fn SierpinskyTriangle( level as NSUInteger, x as NSUInteger, y as NSUInteger, w as NSUInteger, h as NSUInteger )
NSUInteger w2 = w/2, w4 = w/4, h2 = h/2
if ( level == 1 )
pen -1.0
line to x, y
pen 1.0, fn ColorYellow
line to x+w2, y+h
line to x+w, y
line to x, y
else
fn SierpinskyTriangle( level-1, x, y, w2, h2 )
fn SierpinskyTriangle( level-1, x+w4, y+h2, w2, h2 )
fn SierpinskyTriangle( level-1, x+w2, y, w2, h2 )
end if
end fn
window _window, @"Sierpinsky Triangle", ( 0, 0, _width, _height )
WindowSetBackgroundColor( 1, fn ColorBlack )
fn SierpinskyTriangle( 9, _width * 0.05, _height * 0.05, _width * 0.9, _height * 0.9 )
HandleEvents