Interactive Kaleidoscope

An interactive visual experiment. Move your cursor to rotate and scale the geometric stars, click to change colors, and use your keyboard to alter the render state.

Technical Features

Trigonometric Spaced Star Ring

Spawns 40 custom geometric stars in a circular ring. The positions are calculated using cosine and sine parameterized by evenly distributed radial angles.

Dynamic Translation & Rotations

As the mouse moves, the stars are translated along their radial vectors and rotated around their local origin. The velocity and direction scale based on mouse coordinates.

Keyboard State Handlers

Listens to physical key commands: [S] triggers a cleanup event emptying the active shapes array, [R] triggers a re-initialization, and holding [C] overlays a semi-transparent black rectangle to fade current trails.

p5.js
Trigonometry
Interactive Canvas
Keyboard Listeners