2 ms·
storing a set of lines and efficiently seeing if another line (eg the dot's trajectory) has intersected one of them. This is the basic principle behind raytrac
by userbinator 12y ago
storing a set of lines and efficiently seeing if another line (eg the dot's trajectory) has intersected one of them.
This is the basic principle behind raytracing and the variant raymarching, which can be used to create some very interesting images with very compact descriptions:
http://iquilezles.org/www/material/nvscene2008/rwwtt.pdf http://iquilezles.org/www/material/nvscene2008/rwwtt.pdf
Applied to things bouncing around on other things, this technique would enable calculating exactly when the collisions are, which is a possible optimisation to requiring collision checks at each time step. It is very similar to the principle of a discrete event simulator.