This is a followup video to • Where do these circles... .
The original Shadertoy demo: www.shadertoy.com/view/7ds3zB
The closest parallel planes:
Suppose that v is an integer vector with no common factors between its coordinates. We want to find the integer vector u so that the component of u in the direction of v is as small as possible but still strictly positive. This component can be written using the dot product as u·v/|v|. Since v has no common factors between its coordinates, we can find an integer vector u so that u·v = 1. Thus the distance between the plane perpendicular to v and based at the origin and the parallel plane based at the end of u is 1/|v|. There is no closer plane, since u.v must be an integer.
Correction: the ripple frequency is proportional to the length of v, not inversely proportional. (Longer vectors have higher frequency ripples.)
13 янв 2022