Open this sketch in P5 Web Editor →
Click to watch the circle move in an arc into the semi-transparent box. Notice how the circle appears behind the box as it enters.
INTO means moving from outside to inside something, entering or penetrating a space, container, or boundary. This side-view demonstration shows a circle moving in an arc path into a semi-transparent box, emphasizing the transition from external to internal position.
To create "into" relationships on screen:
x > boxX && x < boxX + boxWidth
let boxX = 280, boxY = 150, boxWidth = 100, boxHeight = 80;
let startX = 80, startY = 200; // Outside the box
let targetX = 320, targetY = 190; // Inside the box
circleX = lerp(startX, targetX, progress);
let straightY = lerp(startY, targetY, progress);
let arcOffset = sin(progress * PI) * arcHeight;
circleY = straightY - arcOffset;
let isInside = circleX > boxX && circleX < boxX + boxWidth &&
circleY > boxY && circleY < boxY + boxHeight;
ellipse(circleX, circleY, circleSize, circleSize); // Circle behind
fill(200, 200, 200, 150); // Semi-transparent box
rect(boxX, boxY, boxWidth, boxHeight); // Box in front