Code Sketch


Floating lines
By: Anusha Pant
cleari()
initRandomGenerator(-279157099102188423L)
originBottomLeft()
size(1000, 1000)
val cb = canvasBounds
setBackgroundH(black, ColorMaker.rgb(65, 65, 65))

def l(size: Double) = Picture{
    right(random(15,75))
    repeat(randomDouble(size/4, size/2).toInt) {
        forward(1)
        right(random(0, 5))
        forward(1)
        left(random(0, 5))
    }
}
val diag = math.sqrt(math.pow(cb.height,2) + math.pow(cb.width,2))
def shape = trans(0, 0) * penColor(randomColor) -> l(cb.width)

repeat(100){
        draw(shape)
}