The project is —– ATTENTION: THE PAGE IS VERY SLOW, I MEAN VERY SLOW —–> Here
I did ray tracing by casting a ray and letting it bounce off on the mirror constructed using subdivisions and on the positioned balls/walls.
q are three control points on the Bézier curve.
Take the midpoint of
l and the midpoint of
r, and the midpoint of
The set of points
c and the one of
q act like standalone controls, and we can use the same schema to subdivide them further.
It takes a while to load the page, and the FPS is pretty low though, due to I guess insufficient tracing and intersecting checking. I first compute the intersection of the ray and each panel, and then make sure the intersection is in the panel.
It’s slow but hey it works :)