Hello I'm having a bit of trouble with a assignment of mine for school. I got most of it down except for the most important part, the actual drawing.
What I'm trying to do is to draw a line and and rotate a certain amount and draw it again. In the end I'd be drawing something similar to the asterisks sign. My teacher told me to use sin and cos but I just don't get how I would use those to make my line move.
Thank you.
This is my code thus far:
void setup()
{
size(400,400);
background(255,127,0);
}
void draw()
{
if (mousePressed == true && (mouseButton == LEFT))
{
for(int i = 45; i < 245; i = i + 10)
{
line(mouseX,mouseY,mouseX,mouseY);
}
}
}