I'm new to processing (though I am familiar with Java), and I just wrote some basic code for a curve:
void draw()
{
beginShape();
for (int i = 1; i < 50; i++)
{
line(i,((i-1)*(i-1)),i,(i*i));
}
endShape();
}
However, I'd really like to manipulate this curve (stretch/compress, rotate, reflect), as well as other shapes in general. Is there a simple way to do this, possibly store the shape in a variable then apply transformations? Also, how would I go about drawing something like a parabola, or a sine wave? I imagine trying to create them using the same formula for the curve above would prove too tedious.