python - ARGV in Processing -
i have application written in processing using python mode , didn't find in place in processing documentation using argv
arguments. need variable value passed parameter determine application behaviour. let things clearly, i'm doing rpm simulator has little circle translation move around big circle. current source is:
rpm = 27 def setup(): size(600, 600) rectmode(center) ellipsemode(radius) nofill() stroke(33, 33, 33) smooth() def draw(): background(2, 135, 208) fill(100, 100, 100) ellipse(width / 2, height / 2, 280, 280) translate(width / 2, height / 2) angle = framecount * parameter_table(rpm) x = cos(angle) * 280 y = sin(angle) * 280 fill(23, 187, 176) stroke(10) smooth() ellipse(x, y, 20, 20) def parameter_table(rpm): return 10.0 * 0.01 / (60.0 / rpm)
how can dynamically set rpm via command line, calling /home/my_application 27
?
Comments
Post a Comment