Moar drawing functions

This commit is contained in:
arne 2025-10-04 21:24:46 +02:00
commit b58087f22c
2 changed files with 201 additions and 9 deletions

View file

@ -1,20 +1,23 @@
local math = require('math')
local paper = require('paper')
paper.init()
paper.clear()
local width = paper.get_width()
local height = paper.get_height()
print(
'width: ' .. paper.get_width(),
'height: ' .. paper.get_height()
'width: ' .. width,
'height: ' .. height
)
pad_w = paper.get_width() * 0.12
pad_h = paper.get_height() * 0.12
for i = 1, 50 do
x = math.random() * width
y = math.random() * height
r = 24 + math.ceil(math.random() * 12)
for i = 0, 15 do
for j = 1, 4 do
paper.draw_line(paper.get_height() / 16 * i, j, paper.get_width(), paper.get_height() - 4 + j, i * 16)
end
-- paper.draw_line(0, paper.get_height(), paper.get_width(), paper.get, i * 16)
paper.fill_circle(x, y, r, math.floor(math.random() * 0xFF))
end
paper.update()