Complete Technical Guide to Draw Thomae Function
Also called the Ruler Function or Stars Over Babylon, Thomae's function is a crown jewel of real analysis counterexamples.
Rendered natively on a High-DPI HTML5 Canvas with real-time parameter sliders, live mathematical metrics, and instant PNG export.
Thomae's Popcorn Definition (1875)
f(x) = 1 / q if x = p/q in lowest terms (gcd(p,q)=1, q > 0) f(x) = 0 if x is irrational | ∫₀¹ f(x) dx = 0
Because only finitely many reduced fractions have 1/q > ε, the function approaches 0 around every irrational point (making it continuous at all irrationals!).
How to Use Draw Thomae Function
- 1Adjust parameters with the sliders or inputs to update the curve in real time.
- 2Switch color themes between Rainbow, Plasma, Emerald, and Cyan.
- 3Click Download PNG to save high-contrast mathematical diagrams.
Reference Examples & Worked Benchmarks
| Property | Value / Formula | Notes |
|---|---|---|
| Irrationals | Continuous | Limit = 0 everywhere |
| Rationals | Discontinuous | Jump of height 1/q |
| Integral | ∫₀¹ f(x)dx = 0 | Riemann integrable |
Practical Applications & Engineering Workflows
Mathematics & Physics Visualization
Explore the exact geometry and convergence behavior of Thomae Function.
Publication & Classroom Figures
Export crisp dark-mode PNG plots ready for slides and notes.
Accuracy, Edge Cases & Best Practices
- Computed 100% client-side with zero external dependencies.
All calculations execute locally inside your browser using JavaScript with zero server round-trips, guaranteeing instant responsiveness and complete data privacy.