This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Psychedelic Patterns Overview
Psychedelic patterns are classic visual effects from demoscene and generative art traditions. These patterns use mathematical functions to create trippy, hypnotic visual effects that were popular in retro computing and continue to inspire modern generative art.
Pattern Philosophy
These patterns emphasize:
- Smooth transitions: Continuous value changes over time and space
- Color cycling: Dynamic color shifts create flowing effects
- Mathematical beauty: Simple formulas create complex visual results
- Retro aesthetics: Nostalgic visual styles from early computing
Pattern List
Scanline Shift
DMA-style horizontal scanline displacement with sine wave modulation.
Plasma Color Cycling
Multi-layer plasma with warm sunset palette and color cycling animation.
Fractal Noise Gradient
Multi-scale noise with psychedelic color mapping and subtle rotation effect.
flowchart TD
A[Psychedelic Patterns] --> B[Scanline Shift]
A --> C[Plasma Color Cycling]
A --> D[Fractal Noise Gradient]
B --> B1[HDMA-style distortion]
B --> B2[Sine wave modulation]
C --> C1[Multi-layer plasma]
C --> C2[Warm sunset palette]
C --> C3[Color cycling]
D --> D1[Multi-scale noise]
D --> D2[Psychedelic colors]
D --> D3[Subtle rotation]
Scanline Shifting
Based on EarthBound's DMA effects, scanline shifting displaces each horizontal line based on its vertical position. This creates a characteristic warping effect that was common in SNES-era games.
Key Elements:
- Per-row horizontal displacement
- Sine wave modulation over time
- Color palette rotation
Plasma Effects
Plasma effects use the superposition of multiple sine waves to create smooth, flowing patterns. The mathematical foundation is simple but the visual result is complex and organic.
Formula:
P(x, y, t) = sin(x + t) + sin(y + t) + sin((x + y)/2 + t)
Fractal Noise
Fractal noise (also called fBm or Perlin noise) creates self-similar patterns by summing noise at multiple scales (octaves). Each octave has higher frequency but lower amplitude, creating detail at multiple scales.
Process:
- Generate noise at base scale
- Generate noise at 2× scale with half amplitude
- Generate noise at 4× scale with quarter amplitude
- Continue for desired number of octaves
- Sum all layers
Color Palettes
Sunset Gradient
- Deep Purple: #2D1B4E
- Magenta: #8B2C5C
- Coral: #FF6B6B
- Orange: #FFA07A
- Yellow: #FFE66D
Oceanic Psychedelic
- Deep Blue: #1A237E
- Cyan: #00BCD4
- Teal: #009688
- Green: #4CAF50
- Lime: #CDDC39
Neon Vaporwave
- Purple: #9C27B0
- Pink: #E91E63
- Red: #F44336
- Orange: #FF9800
- Yellow: #FFEB3B
Performance Tips
- Precompute grids: Create coordinate grids once, reuse for all frames
- Vectorize operations: Use torch/numpy broadcasting instead of Python loops
- Limit octaves: More octaves = more detail but slower
- Use Gaussian filter: Smooth noise is faster than per-pixel computation
Historical Context
These patterns originated from:
- Demoscene: Computer art subculture focusing on procedural graphics
- Retro gaming: SNES, Amiga, and early PC visual effects
- Generative art: Algorithmic art created through mathematical processes
The demoscene pushed hardware limits to create impressive visual effects using mathematical formulas rather than pre-rendered assets. This philosophy continues in modern generative art and AI image generation.