done renaming

This commit is contained in:
2023-09-25 18:56:08 +02:00
parent 5870c6ba9c
commit 9a3380dee1
33 changed files with 554 additions and 31 deletions

View File

@@ -0,0 +1,15 @@
void setup()
{
size(800, 600);
}
void draw()
{
// Clear Background to prevent shadows
background(40, 40, 40, 256);
line(0, 0, mouseX, mouseY);
circle(mouseX, mouseY, 10);
circle(mouseX * .5, mouseY * .5, 10);
}

View File

@@ -0,0 +1,24 @@
void setup()
{
size(800, 600);
}
void draw()
{
// Clear Background to prevent shadows
background(40, 40, 40, 256);
//First circle
fill(0, 50, 256);
circle(mouseX, mouseY, 100);
// Second circle
// project mouse pos between 0 and 1. Take inverse to get the point symmetric postion
PVector fitMouse = new PVector((float) mouseX / (float) width, (float) mouseY / (float) height);
PVector twinPos = new PVector((1.0f - fitMouse.x) * width, (1.0f - fitMouse.y) * height);
fill(256, 50, 0);
circle(twinPos.x, twinPos.y, 100);
//println(fitMouseX + ", " + inverseMouseX );
}