0
点赞
收藏
分享

微信扫一扫

processsing 函数random

灯火南山 2022-06-27 阅读 33
size(600, 600)
background(50)

stroke(200)
for i in range(5):
line(random(width), random(height),
random(width), random(height))

processsing 函数random_学习

 

size(600, 600)
background(50)

def draw_me_a_line(colour=200):
stroke(colour)
line(random(width), random(height),
random(width), random(height))

for i in range(5):
draw_me_a_line()
size(600, 600)
background(50)

def draw_me_a_line(colour=200):
stroke(colour)
line(random(width), random(height),
random(width), random(height))

for i in range(5):
chance = random(100)
if chance > 50:
draw_me_a_line()
else:
draw_me_a_line(100)


举报

相关推荐

0 条评论