Http://njbenjamin.com/demo/raycasting/

Raycasting in WebGL.

Raycasting is often used in Computer Graphics for hit detection. In this example, drag the quadrant in order to hit on a circle. Only the front of the quadrant is draggable.

The scene can also be tinkered with. Zoom in or out using your mouse (or whichever gesture your device is configured with), rotate by dragging/tapping.

The code is organize to ease your understanding of Raycasting as a concept.

The raycasting method uses the quadrant geometry to cast rays. When multiple rays are hitting a circle, something else happens.

http://njbenjamin.com/demo/raycasting/

Would be great to provide a more detailed description of the showcase, e.g. how it works, benefits of the method(s) you used and so on.

4 Likes

Fascinating! Absolutely mesmerizing!

I have no idea what’s going on, but those blinking circles look excellent!

Well done!

:mermaid:

2 Likes