Data update

This commit is contained in:
Ingy döt Net 2025-06-11 20:16:52 -04:00
parent 72eb4943cb
commit 4d5544505c
2347 changed files with 62432 additions and 16731 deletions

View file

@ -0,0 +1,69 @@
Module TurtleGraphics {
cls 15,0
pen 0
single penangle=pi
boolean pendraw=true
hlen=min.data(scale.x, scale.y)/4
move scale.x/4, scale.y/2
house(hlen)
penup()
forward(hlen)
pendown()
d=(50, 33, 200, 130, 50)
items=len(d)
dspan=d#max()
ratio=scale.y/4/dspan
ditem=each(d)
while ditem
barvalue(scale.x/4, scale.y/3 ,items, ditem^, array(ditem)/dspan)
end while
sub house(n)
for i=1 to 3
right(120)
forward(n)
next
right(90)
bar(n, n)
right(90)
end sub
sub bar(w, h)
local i
for i=1 to 2
right(90)
forward(h)
right(90)
forward(w)
next
end sub
sub barvalue(maxW, maxH, bars, barno, valratio)
local bW=maxW/bars
forward(bw)
bar(bw, -maxH*valratio)
end sub
// Turtle Minimum Pack
// need:
// single penangle=pi
// boolean pendraw=true
//
sub penup()
pendraw=false
end sub
sub pendown()
pendraw=true
end sub
sub forward(distance)
if pendraw then
draw angle penangle, distance
else
step angle penangle, distance
end if
end sub
sub backward(distance)
forward(-distance)
end sub
sub right(angle)
penangle-=angle/180*pi
end sub
}
TurtleGraphics