It sounds like you want to draw a series of rectangles, starting rom 0 and going to x – use a for
loop for that, and rect()
.
Then, you want to change the height of each rectangle according to a sine wave function. Use sin()
for that.
…in fact… you might want to take a look at the Processing short example for using sin
…