I’ve just started working on my first coding for the eyesy, largely cobbled together from watching a couple of youtube videos.
It is very simple, and seems to work (yay!) but I don’t really know what some of the code is actually doing.
In essence, I have some circles moving across the screen to form a sine wave. I can change the colour and width of this wave.
What I want to be able to do, is to slow down the speed at which the balls are moving, and to change the number of balls on screen. Any idea how I might do this?
Would anyone be able to look at my code and tell me what the different parts are actually doing?
def setup(screen, etc):
def draw(screen, etc):
color_bg = etc.color_picker_bg(etc.knob5) color = etc.color_picker(etc.knob4) for i in range(720): radius = int(etc.knob1 * 50) x = int(1280 / 2 + etc.knob2 * 640 * math.sin(i * etc.knob3 / 2 + time.time())) pygame.gfxdraw.filled_circle(screen, x, i, radius, color)