from math import sin
from processing import *
X = 30
Y = 30
delay = 16
radius = 30
def setup():
strokeWeight(10)
frameRate(20)
size(500,500)
def sircle():
global X, Y, radius
background(100)
fill(0,121,184)
stroke(255)
fc = environment.frameCount
X += (mouse.x-X)/delay;
Y += (mouse.y-Y)/delay;
radius = radius + sin(fc / 4)
draw = sircle
run()
for some reason run()
only creates the background.
does anybody know how to call the function for sircle()
?
I think the OP is referring this code
where it does seem correct that draw
is being assigned the function variable sircle
. Besides, its not like sircle()
is returning anything that can be assigned to draw
Looking at the example code in the link I shared above, you need a line like
ellipse(X,Y,radius,radius)
at the end of your sircle
function