Pop A Pill

Psychedelic Trigonometric Visualizer in C/SDL




This project implements a high-performance, procedurally generated psychedelic visualizer leveraging low-level C and SDL2 surfaces. By mapping 2D spatial coordinates to dynamic hue values via trigonometric sine modulation, the renderer computes real-time HSL-to-RGB conversions per pixel, producing a vivid chromatic spectrum.

The algorithm exploits per-pixel arithmetic for hue oscillations enabling complex interference patterns and fluid color morphing. SDL surfaces facilitate CPU-side pixel manipulation, ensuring precise control over rasterized output without GPU blending overhead. The combination of trigonometric coordinate transformations and HSL-derived color synthesis yields a visually immersive, continuously evolving psychedelic display, optimized for responsiveness and computational simplicity.