HomeComputer ScienceShannon Entropy Visualizer

📊 Shannon Entropy Lab

An interactive 3D symbol-frequency histogram where reshaping a source's probability distribution computes the Shannon entropy live and shows it as the hard floor beneath any compression scheme.

Computer Science3DModerate60 FPS
shannon-entropy-lab ↗ Open standalone

An interactive 3D symbol-frequency histogram where reshaping a source's probability distribution computes the Shannon entropy live and shows it as the hard floor beneath any compression scheme.

🔬 What It Demonstrates

Each pillar's height is a symbol's probability; the translucent overlay is the optimal code length Shannon's theorem predicts for it. The glowing ring marks entropy H — and the streaming bins below race entropy coding against naive fixed-length coding to show the bits actually saved.

🎮 How to Use

Pick an alphabet size, drag the skew slider to make the distribution more lopsided, or hit Randomize for a fresh draw. Watch H fall as one symbol comes to dominate, and watch the entropy-coded bin fill slower than the fixed-length one.

💡 Did You Know?

A uniform distribution has maximum entropy and cannot be compressed at all — every symbol is equally surprising. Real text, images and audio are far from uniform, which is exactly why ZIP, JPEG and MP3 work.

⚙ Under the hood

Interactive 3D probability-distribution landscape where reshaping symbol probabilities shows how Shannon entropy sets the theoretical limit on lossless compression.

shannon-entropyinformation-theorydata-compressionprobability-distributionscoding-theorycomputer-science

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)