Skip to content
cameronryePublic

About

An interactive spiral visualization app built with React and TypeScript

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

50 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Uzumaki

An interactive spiral visualization app for Web, iOS, iPadOS, macOS, tvOS, and watchOS.

Try it live at uzumaki.app

React 19 TypeScript Swift 6 SwiftUI PWA Ready MIT License

Uzumaki Demo

Fibonacci Spiral Vogel Sunflower

Features

  • 10 spiral types: Archimedean, Fibonacci, Fermat, Logarithmic, Hyperbolic, Lituus, Theodorus, Vogel, Uzumaki, and Curlicue
  • Real-time animation with adjustable speed
  • 10 color presets with gradient support
  • Line style options: Solid, Dashed, Dotted, Glow, Points, and Triangles
  • Variable line thickness for dynamic visuals
  • Theme options: Dark, Black, Gradient, and Matching backgrounds
  • Curated presets for interesting spiral configurations
  • Pan and zoom controls
  • Export to PNG
  • Shareable URLs with encoded parameters
  • Keyboard shortcuts for quick control
  • Progressive Web App (PWA) support
  • iOS 26 / macOS 26 Liquid Glass design support
  • Web Workers with TypedArray optimization for smooth performance

Showcase


Fibonacci Aurora

Uzumaki Neon

Vogel Sunflower

Logarithmic Ocean

Fermat Fire

Curlicue Matrix

Theodorus Retro

Lituus Candy

Apple TV

Uzumaki on Apple TV

Experience Uzumaki on the big screen with Apple TV. Navigate using the Siri Remote, explore curated presets from the Top Shelf, and enjoy 4K visuals.

Color Presets


Rainbow

Aurora

Sunset

Ocean

Fire

Neon

Candy

Matrix

Spiral Mathematics

Each spiral type follows a specific mathematical formula. Most use polar coordinates where r is the radius and theta is the angle.

Mathematical Constants

Constant Symbol Value Description
Golden Ratio phi (1 + sqrt(5)) / 2 Approximately 1.618
Golden Angle - 137.5 degrees 360 / phi^2, optimal packing angle
Euler's Number e 2.71828... Base of natural logarithm

Polar Coordinate Spirals


Archimedean Spiral
r = a + b * theta
Constant spacing between turns. Named after Archimedes who first described it circa 225 BC.

Fibonacci (Golden) Spiral
r = a * phi^(2 * theta / pi)
Self-similar spiral based on the golden ratio. Found in nautilus shells and galaxies.

Fermat Spiral
r = a * sqrt(theta)
Parabolic spiral where area swept is proportional to angle. Used in optics.

Logarithmic Spiral
r = a * e^(b * theta)
Self-similar at any scale. Also called equiangular spiral. Seen in hurricanes.

Hyperbolic Spiral
r = a / theta
Approaches a point asymptotically. The inverse of the Archimedean spiral.

Lituus Spiral
r = a / sqrt(theta)
Named for its trumpet-like shape (lituus = Roman curved trumpet).

Special Construction Spirals


Spiral of Theodorus
angle_n = sum(arctan(1 / sqrt(k))) for k=1..n
Constructed from right triangles with hypotenuse sqrt(n). Demonstrates irrationality of square roots.

Vogel Spiral (Phyllotaxis)
theta_n = n * 137.5 deg, r_n = c * sqrt(n)
Models sunflower seed arrangement. Uses golden angle for optimal packing.

Curlicue Fractal
phi_n = 2 * pi * s * n^2
Where s is irrational (phi). Cumulative angle sums create fractal patterns.

Uzumaki Spiral
Custom chaotic formula
Inspired by the manga. Time-varying amplitude with sinusoidal modulation.

Spirals in Nature

Spiral Type Natural Examples
Fibonacci / Logarithmic Nautilus shells, galaxy arms, hurricane formations
Vogel / Fermat Sunflower seeds, pinecones, flower petals
Archimedean Watch springs, rolled paper, coiled ropes
Theodorus Mathematical construction, no direct natural analog

Getting Started

Web App

Prerequisites

  • Node.js 18+
  • npm or yarn

Installation

cd web
npm install

Development

npm run dev

Build

npm run build

Preview Production Build

npm run preview

Apple App (iOS / iPadOS / macOS / tvOS / watchOS)

A native SwiftUI implementation with the same features as the web app, plus platform-specific optimizations.

Prerequisites

  • macOS 14.0+
  • Xcode 16+ (for development)
  • Swift 6.0+
  • iOS 17.0+ / iPadOS 17.0+ / tvOS 17.0+ / watchOS 10.0+

Build and Run

Using Swift Package Manager:

cd apple
swift build
swift run Uzumaki

Or open in Xcode:

cd apple
open Package.swift

Then select the Uzumaki scheme and run (Cmd+R).

Run Tests

cd apple
swift test

Features

  • Native SwiftUI Canvas rendering
  • SIMD-optimized spiral generation
  • All 10 spiral types from the web app
  • All 10 color presets
  • Play/pause animation with TimelineView
  • Pinch-to-zoom and pan gestures
  • PNG export
  • Keyboard shortcuts (Space, R, E)
  • macOS menu bar integration
  • iOS 26 / macOS 26 Liquid Glass effects with backward compatibility
  • iPadOS menu toggle for full-screen experience

tvOS Features

  • Siri Remote gesture support (swipe, click, play/pause)
  • Focus-based navigation optimized for TV
  • Top Shelf integration with curated spiral previews
  • 4K display support for stunning visuals
  • Game Controller support

watchOS Features

  • Digital Crown zoom control with haptic feedback
  • Swipe gestures for preset navigation
  • Tap to play/pause, double-tap to reset zoom
  • Long press for settings
  • Watch face complications (circular, corner, rectangular, inline)

Keyboard Shortcuts

Key Action
Space Play/Pause animation
R Reset to defaults
E Export as PNG
F Toggle fullscreen
Arrow Left/Right Adjust speed
? Toggle shortcuts
Esc Close shortcuts

Tech Stack

Web

  • React 19
  • TypeScript
  • Vite
  • Canvas API

Apple

  • Swift 6
  • SwiftUI
  • Swift Package Manager
  • SIMD for optimized math

License

MIT


Made with ❤️ by Cameron Rye

About

An interactive spiral visualization app built with React and TypeScript

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages