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,23 @@
func tree(img, x, y, scale=6/10, len=400, angle=270) {
len < 1 && return()
img.moveTo(x, y)
img.angle(angle)
img.line(len)
var (x1, y1) = img.curPos
tree(img, x1, y1, scale, len*scale, angle+35)
tree(img, x1, y1, scale, len*scale, angle-35)
}
require('GD::Simple')
var (width=1000, height=1000)
var img = %s|GD::Simple|.new(width, height)
img.fgcolor('black')
img.penSize(1, 1)
tree(img, width/2, height)
File('tree.png').write(img.png, :raw)