Skip to content

Instantly share code, notes, and snippets.

@LeMasters
Last active August 31, 2020 17:10
Show Gist options
  • Save LeMasters/5b895f1215f97f90c73c08c2fff136b6 to your computer and use it in GitHub Desktop.
Save LeMasters/5b895f1215f97f90c73c08c2fff136b6 to your computer and use it in GitHub Desktop.
-- let's make a single square
-- but fill it with another
cls(1)
start=30
finish=10
centerx=50
centery=50
resize = -4
for sz=start,finish,resize do
sx=sz
sy=sz
x1=centerx-(sx/2)
y1=centery-(sy/2)
x2=x1+sx
y2=y1+sy
c=flr(rnd(1)*15)+1
rectfill(x1,y1,x2,y2,c)
end
-- important to consider
-- why start at max size
-- and then reduce?
-- would it work to start
-- from smallest point
-- and grow?
-- no, b/c each layer
-- would obscure the last.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment