kopia lustrzana https://github.com/villares/sketch-a-day
coments day 25
rodzic
1f4ad8b1d1
commit
3472e9cf5a
|
@ -15,8 +15,10 @@ def setup():
|
||||||
def draw():
|
def draw():
|
||||||
global pspeed
|
global pspeed
|
||||||
x, y, px, py = mouseX, mouseY, pmouseX, pmouseY
|
x, y, px, py = mouseX, mouseY, pmouseX, pmouseY
|
||||||
speed = (dist(x, y, px, py))**0.5 # squareroot of dist to previous mouse pos
|
# speed is the square root of distance to previous mouse position
|
||||||
w = ((10 - speed) + (10 - pspeed))/2 # mean of 10 minus speed & previous
|
speed = (dist(x, y, px, py))**0.5
|
||||||
|
# w is the mean of 10 minus speed & 10 minus previous speed
|
||||||
|
w = ((10 - speed) + (10 - pspeed))/2
|
||||||
strokeWeight(abs(w))
|
strokeWeight(abs(w))
|
||||||
if mousePressed:
|
if mousePressed:
|
||||||
line(x, y, px, py)
|
line(x, y, px, py)
|
||||||
|
|
Ładowanie…
Reference in New Issue