Cosine similarity
is a clock.

Keep x pointing straight up. Let y walk around the circle one tick at a time. The dot product is the height of y, which is exactly the cosine value on the curve.

The circle clock

x never moves. y rotates clockwise: theta = 0.00 radians.

x = (0, 1) y
x · y = 1.000
cos(theta) = x · y||x|| ||y|| = 1.000

The cosine curve

The moving dot has the same horizontal position theta and vertical position cos(theta) as the clock's dot product.

1 0 -1 0 pi/2 pi 3pi/2 2pi cos(theta) = 1.000
k = 0 / 64

The slider controls k. Each tick changes theta by 2 pi / K, with K = 64. Try pausing at the top, side, and bottom of the clock.