Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def main():
with Erosion(verbose=VERBOSE)\
.init(fg=rgb(1.0, 0.0, 0.0, 0.1),
bg=white()) as erosion:
send = erosion.send
send([box(0.15, (0.3, 0.3), 2.0),
box(0.2, (0.2, 0.5), 0.1),
box((0.05, 0.5), (0.25, 0.9), 1.0),
box((0.3, 0.2), (0.1, 0.9), 2.0)])
erosion.set_fg(rgb(0, 0.5, 0.5, 0.1))
send([box(0.15, (0.5, 0.3), 2.0),
box(0.2, (0.5, 0.5), 0.1),
box((0.05, 0.5), (0.6, 0.9), 1.0),
box((0.1, 0.2), (0.3, 0.9), 1.0)])
erosion.set_fg(rgb(0, 0.0, 0.8, 0.1))
send([box(0.05, ((0.7, 0.3), (0.7, 0.8)), 1.0)])
send([stroke(((0.1, 0.1),
(0.1, 0.1),
(0.1, 0.9),
(0.1, 0.1)),
def main():
with Erosion(verbose=VERBOSE)\
.init(fg=rgb(1.0, 0.0, 0.0, 0.1),
bg=white()) as erosion:
send = erosion.send
send([box(0.15, (0.3, 0.3), 2.0),
box(0.2, (0.2, 0.5), 0.1),
box((0.05, 0.5), (0.25, 0.9), 1.0),
box((0.3, 0.2), (0.1, 0.9), 2.0)])
erosion.set_fg(rgb(0, 0.5, 0.5, 0.1))
send([box(0.15, (0.5, 0.3), 2.0),
box(0.2, (0.5, 0.5), 0.1),
box((0.05, 0.5), (0.6, 0.9), 1.0),
box((0.1, 0.2), (0.3, 0.9), 1.0)])
erosion.set_fg(rgb(0, 0.0, 0.8, 0.1))
send([box(0.05, ((0.7, 0.3), (0.7, 0.8)), 1.0)])
send([stroke(((0.1, 0.1),
with Erosion(verbose=VERBOSE)\
.init(fg=rgb(1.0, 0.0, 0.0, 0.1),
bg=white()) as erosion:
send = erosion.send
send([box(0.15, (0.3, 0.3), 2.0),
box(0.2, (0.2, 0.5), 0.1),
box((0.05, 0.5), (0.25, 0.9), 1.0),
box((0.3, 0.2), (0.1, 0.9), 2.0)])
erosion.set_fg(rgb(0, 0.5, 0.5, 0.1))
send([box(0.15, (0.5, 0.3), 2.0),
box(0.2, (0.5, 0.5), 0.1),
box((0.05, 0.5), (0.6, 0.9), 1.0),
box((0.1, 0.2), (0.3, 0.9), 1.0)])
erosion.set_fg(rgb(0, 0.0, 0.8, 0.1))
send([box(0.05, ((0.7, 0.3), (0.7, 0.8)), 1.0)])
send([stroke(((0.1, 0.1),
(0.1, 0.1),
(0.1, 0.9),
(0.1, 0.1)),
((0.9, 0.9),
(0.1, 0.9),
(0.9, 0.9),
(0.2, 0.15)), 2)])
.init(fg=rgb(1.0, 0.0, 0.0, 0.1),
bg=white()) as desert:
draw = desert.draw
draw([box(0.15, (0.3, 0.3), 2.0),
box(0.2, (0.2, 0.5), 0.1),
box((0.05, 0.5), (0.25, 0.9), 1.0),
box((0.3, 0.2), (0.1, 0.9), 2.0)])
desert.show()
desert.set_fg(rgb(0, 0.5, 0.5, 0.1))
draw([box(0.15, (0.5, 0.3), 2.0),
box(0.2, (0.5, 0.5), 0.1),
box((0.05, 0.5), (0.6, 0.9), 1.0),
box((0.1, 0.2), (0.3, 0.9), 1.0)])
desert.show()
desert.set_fg(rgb(0, 0.0, 0.8, 0.1))
draw([box(0.05, ((0.7, 0.3), (0.7, 0.8)), 1.0)])
desert.show()
draw([stroke(((0.1, 0.1),
(0.1, 0.1),
(0.1, 0.9),
(0.1, 0.1)),
((0.9, 0.9),
def main():
with Erosion(verbose=VERBOSE)\
.init(fg=rgb(1.0, 0.0, 0.0, 0.1),
bg=white()) as erosion:
send = erosion.send
send([box(0.15, (0.3, 0.3), 2.0),
box(0.2, (0.2, 0.5), 0.1),
box((0.05, 0.5), (0.25, 0.9), 1.0),
box((0.3, 0.2), (0.1, 0.9), 2.0)])
erosion.set_fg(rgb(0, 0.5, 0.5, 0.1))
send([box(0.15, (0.5, 0.3), 2.0),
box(0.2, (0.5, 0.5), 0.1),
box((0.05, 0.5), (0.6, 0.9), 1.0),
box((0.1, 0.2), (0.3, 0.9), 1.0)])
erosion.set_fg(rgb(0, 0.0, 0.8, 0.1))
send([box(0.05, ((0.7, 0.3), (0.7, 0.8)), 1.0)])
send([stroke(((0.1, 0.1),
(0.1, 0.1),
send([box(0.15, (0.3, 0.3), 2.0),
box(0.2, (0.2, 0.5), 0.1),
box((0.05, 0.5), (0.25, 0.9), 1.0),
box((0.3, 0.2), (0.1, 0.9), 2.0)])
erosion.set_fg(rgb(0, 0.5, 0.5, 0.1))
send([box(0.15, (0.5, 0.3), 2.0),
box(0.2, (0.5, 0.5), 0.1),
box((0.05, 0.5), (0.6, 0.9), 1.0),
box((0.1, 0.2), (0.3, 0.9), 1.0)])
erosion.set_fg(rgb(0, 0.0, 0.8, 0.1))
send([box(0.05, ((0.7, 0.3), (0.7, 0.8)), 1.0)])
send([stroke(((0.1, 0.1),
(0.1, 0.1),
(0.1, 0.9),
(0.1, 0.1)),
((0.9, 0.9),
(0.1, 0.9),
(0.9, 0.9),
(0.2, 0.15)), 2)])
erosion.set_fg(rgb(0, 0.7, 0.2, 0.1))
send([circle(0.05, ((0.5, 0.4), (0.8, 0.4)), 1.0)])
send([circle(0.05, ((0.9, 0.1),
(0.9, 0.15),
bg=white()) as desert:
draw = desert.draw
draw([box(0.15, (0.3, 0.3), 2.0),
box(0.2, (0.2, 0.5), 0.1),
box((0.05, 0.5), (0.25, 0.9), 1.0),
box((0.3, 0.2), (0.1, 0.9), 2.0)])
desert.show()
desert.set_fg(rgb(0, 0.5, 0.5, 0.1))
draw([box(0.15, (0.5, 0.3), 2.0),
box(0.2, (0.5, 0.5), 0.1),
box((0.05, 0.5), (0.6, 0.9), 1.0),
box((0.1, 0.2), (0.3, 0.9), 1.0)])
desert.show()
desert.set_fg(rgb(0, 0.0, 0.8, 0.1))
draw([box(0.05, ((0.7, 0.3), (0.7, 0.8)), 1.0)])
desert.show()
draw([stroke(((0.1, 0.1),
(0.1, 0.1),
(0.1, 0.9),
(0.1, 0.1)),
((0.9, 0.9),
(0.1, 0.9),