MCPcopy Create free account
hub / github.com/ActiveState/code / DrawSplash

Function DrawSplash

recipes/Python/578044_Fractal_painter/recipe-578044.py:77–95  ·  view source on GitHub ↗
(nX, nY, colour)

Source from the content-addressed store, hash-verified

75
76
77def DrawSplash(nX, nY, colour):
78
79 # simulation of paint splatter or leaves
80
81 nX2 = dist(nX, nLow / 2.0)
82
83 nY2 = dist(nY, nLow / 2.0)
84
85 for i in range(8):
86
87 nX1 = dist(nX2, nLow / 3.0)
88
89 nY1 = dist(nY2, nLow / 3.0)
90
91 nL = dist(nLow / 6.0 + 2, nLow / 3.0)
92
93 canvas.create_oval( nX1, nY1, nX1 + nL, nY1 + nL, fill = colour, width = 0)
94
95 canvas.update()
96
97
98

Callers 1

FracDownFunction · 0.85

Calls 3

rangeFunction · 0.85
distFunction · 0.70
updateMethod · 0.45

Tested by

no test coverage detected