Hello Processing forum,
I’m trying to create a programme where I can draw mirrored lines. My code looks like this:
void setup() {
fullScreen();
background(255);
noStroke();
translate (width/2, 0);
}
void draw() {
//if (mousePressed) {
translate (width/2, 0);
rotate(0.75);
stroke(0, 0, 255);
strokeWeight(20);
line(mouseX, mouseY, pmouseX, pmouseY);
stroke(0, 0, 255);
line(mouseY, mouseX, pmouseY, pmouseX);
}
It goes quite well, but i’m struggling with making the line follow the mouse cursor and not just random
I would also like for the line to be drawn somewhat from the center - right now it’s only able to draw in the triangle-shaped area showed on the image below.
I hope that you’re able to help, Kind regards.