Skip to content

About

Open, reproducible reconstructions of Leonardo da Vinci's civil inventions

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

96 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

The da Vinci Codex Project

"Obstacles do not bend me. Every obstacle yields to stern resolve. He who is fixed to a star does not change his mind." β€” Leonardo da Vinci

Python 3.9+ License: MIT Tests Code style: ruff Open in Colab

Computational Archaeology of Renaissance Mechanical Engineering

🌐 Live Website β€’ 🎨 Interactive Gallery β€’ 🎡 Renaissance Ensemble β€’ πŸ“– Documentation β€’ 🀝 Contributing


πŸ“‘ Table of Contents


Overview

This repository is an experimental open-source computational framework for analyzing Leonardo da Vinci's mechanical inventions. Using modern engineering principles, physics-based simulation, and safety analysis, we explore how da Vinci's 15th-century designs might perform when implemented with contemporary materials and methods.

🌟 Project Goals

  • πŸ“ Digital Exploration β€” Create computational models of Renaissance mechanical concepts
  • πŸŽ“ Educational Resources β€” Develop open-source materials for STEM education
  • πŸ”¬ Technical Analysis β€” Apply modern simulation to historical engineering
  • πŸ›‘οΈ Safety Focus β€” Ensure all implementations prioritize safety (non-weaponized)
  • 🌍 Open Collaboration β€” Enable community contributions to historical engineering

πŸ“œ Historical Context

Leonardo da Vinci (1452-1519) produced over 13,000 pages of notes and drawings spanning the Codex Atlanticus, Madrid Codices, Codex Leicester, and Codex on the Flight of Birds. This project explores selected civil inventions, focusing on educational applications while maintaining strict adherence to non-weaponized implementations.


🎨 Interactive Gallery

✨ Experience Leonardo's Genius Through 24 Interactive Web Interfaces ✨

🌐 Open the Gallery β†’

Built with Renaissance aesthetics, golden ratio proportions, and modern web technology

Featured Interactive Experiences

✈️ Flight Systems

Invention Status Experience
🚁 Aerial Screw Breakthrough Explore Live β†’
πŸ¦… Ornithopter Complete Explore Live β†’
πŸͺ‚ Parachute Complete Explore Live β†’
πŸŽ›οΈ Variable Pitch Mechanism Complete Explore Live β†’

πŸš— Ground Transportation

Invention Status Experience
πŸ›’ Self-Propelled Cart Complete Explore Live β†’
πŸ“ Mechanical Odometer Complete Explore Live β†’
πŸŒ‰ Revolving Bridge Complete Explore Live β†’

🎭 Automata & Entertainment

Invention Status Experience
🦁 Mechanical Lion Complete Explore Live β†’
πŸ›‘οΈ Armored Walker Prototype Explore Live β†’
🧢 Bobbin Winder Complete Explore Live β†’

🎡 Musical Instruments

"Music is the shaping of the invisible." β€” Leonardo da Vinci

Invention Status Experience
🎼 Mechanical Ensemble Complete Explore Live β†’
🎹 Mechanical Organ Complete Explore Live β†’
🎻 Viola Organista Complete Explore Live β†’
🎺 Mechanical Trumpeter Complete Explore Live β†’
🎢 Programmable Flute Complete Explore Live β†’
πŸ₯ Mechanical Drum Complete Explore Live β†’
πŸ”” Mechanical Carillon Complete Explore Live β†’

πŸ’§ Hydraulic Systems

"Water is the driver of nature." β€” Leonardo da Vinci, Codex Leicester

System Experience
🌊 Hydraulic Systems Explore Live β†’

Includes: Canal locks, Archimedes screws, water wheels, pumps, and flood control

πŸ”¬ Exploration Tools

Tool Purpose Experience
πŸ•ΈοΈ Cross-Pollination Explorer Network visualization Explore Live β†’
⏰ Invention Timeline Historical journey Explore Live β†’
πŸͺž Mirror Writing Interface Decode Leonardo's script Explore Live β†’
βš™οΈ Universal Machine Builder Build mechanisms Explore Live β†’

Quickstart

πŸš€ Get Started in 3 Steps

1️⃣ Try it now in Google Colab (no installation required):

# Open the Quickstart notebook:
# https://colab.research.google.com/github/Shannon-Labs/davinci-codex/blob/main/notebooks/Quickstart.ipynb

2️⃣ Or install locally:

pip install git+https://github.com/Shannon-Labs/davinci-codex.git

3️⃣ Run a simulation:

davinci-codex simulate --slug parachute --seed 0 --fidelity educational

4️⃣ Run tests:

make test

"Simplicity is the ultimate sophistication." β€” Leonardo da Vinci


πŸ““ Interactive Notebooks

Explore the physics of Leonardo's inventions with our interactive Colab notebooks. These educational resources combine historical context, mathematical derivation, and real-time simulation.

Notebook Focus Colab Link
Aerial Screw Aerodynamics & BEMT Open In Colab
Parachute Drag & Dynamics Open In Colab
Ornithopter Unsteady Aerodynamics Open In Colab
Variable Pitch Swashplate Mechanics Open In Colab
Self-Propelled Cart Spring Drive & Escapement Open In Colab
Odometer Measurement & Error Open In Colab
Revolving Bridge Statics & Balance Open In Colab
Mechanical Lion Cam Programming Open In Colab
Armored Walker Power & Friction Open In Colab
Bobbin Winder Cam Profiles Open In Colab
Programmable Loom Binary Logic Open In Colab
Mechanical Drum Rhythm Sequencing Open In Colab
Mechanical Ensemble Orchestration Open In Colab
Quickstart CLI & Basic Usage Open In Colab

Invention registry (auto-generated)

This table is regenerated from the Python registry; run make regen-readme-table after changes to any invention module.

Slug Title Status Summary
aerial_screw Leonardo's Aerial Screw - Advanced Aerodynamic Analysis validated Comprehensive aerodynamic analysis of Leonardo's helical air screw using modern blade element momentum theory.
armored_walker The Armored Walker simulation_prototype A walking war machine combining the chassis of the Self-Propelled Cart with the leg mechanism of the Mechanical Lion.
bobbin_winder Automatic Bobbin Winder prototype_ready Cam-programmable traverse winding mechanism with tension control analysis.
mechanical_carillon Mechanical Carillon concept_reconstruction Rotating drum that indexes bell strikers for programmable chimes.
mechanical_drum Mechanical Drum prototype_ready Programmable percussion device with cam barrels for rhythm patterns.
mechanical_ensemble Leonardo Mechanical Ensemble concept_reconstruction Coordinated simulations for Leonardo''s automated musical inventions.
mechanical_lion Leonardo's Mechanical Lion - Complete Walking and Reveal Mechanism validated Reconstruction of Leonardo's cam-based walking mechanism with chest cavity reveal for the 1515 Mechanical Lion automaton.
mechanical_odometer Leonardo's Mechanical Odometer Cart prototype_ready Enhanced distance-measuring cart with realistic pebble-drop physics and comprehensive error analysis.
mechanical_organ Automatic Pipe Organ concept_reconstruction Self-playing pipe organ driven by pinned barrels and dual bellows.
mechanical_trumpeter Mechanical Trumpeter concept_reconstruction Automated trumpeter automaton with programmable fingering and bellows-driven breath.
ornithopter Bio-inspired Ornithopter Flight Lab in_progress Advanced flapping-wing flight with unsteady aerodynamics and bio-inspired mechanics.
parachute Pyramid Parachute prototype_ready Modern analysis of da Vinci's pyramid-shaped parachute with advanced aerodynamic modeling, stability assessment, and historical accuracy.
programmable_flute Programmable Flute concept_reconstruction Cam-driven recorder with automatic fingering and regulated airflow.
programmable_loom Leonardo's Programmable Loom - Textile Pattern Automation in_progress Automatic loom concept with cam-based pattern programming for repeatable textile motifs, reconstructed from Codex Atlanticus folios 1090r-1091v.
revolving_bridge Leonardo's Revolving Bridge - Advanced Engineering Implementation in_progress Leonardo da Vinci's innovative rotating bridge with water-filled counterweight system, featuring advanced mechanical analysis and educational visualization.
self_propelled_cart Self-Propelled Cart prototype_ready Spring-driven cart with multi-stage gear reduction and escapement control for autonomous theatrical motion.
variable_pitch_mechanism Variable Pitch Swashplate Mechanism in_progress Swashplate-based variable pitch control system for aerial screw blades
viola_organista Viola Organista concept_reconstruction Continuous wheel-bowed keyboard capable of polyphonic string performance.

Featured Inventions

Visit our interactive gallery for detailed visualizations and technical specifications.

✈️ Flight Systems

"Once you have tasted flight, you will forever walk the earth with your eyes turned skyward."

Invention Status Key Achievement
Aerial Screw πŸš€ Breakthrough 1,416N lift (4Γ— improvement), variable pitch control
Ornithopter βœ… Complete Biomimetic flight, 140 min endurance, validated aerodynamics
Parachute βœ… Complete 6.9 m/s safe descent, turbulence-tested pyramid design

πŸš— Ground Transportation

Invention Status Key Achievement
Self-Propelled Cart βœ… Complete First autonomous vehicle, 150m range, spring-powered
Mechanical Odometer βœ… Complete Precision measurement (<17% error), pebble-drop counter
Revolving Bridge βœ… Complete 360Β° rotation, tactical engineering, water counterweight

🎭 Automata & Entertainment

Invention Status Key Achievement
Mechanical Lion βœ… Complete 30s choreography, synchronized movements, cam-based control
Programmable Loom πŸ”§ In Progress First programmable computer, 16-thread patterns
Armored Walker πŸ›‘οΈ Prototype Quadruped gait, 200kg payload, dynamic balance

🎡 Musical Instruments & Renaissance Ensemble

"Music is the shaping of the invisible." β€” Leonardo da Vinci

Our Renaissance Ensemble features 6 physics-based instrument timbres, each modeled with authentic harmonic profiles:

Instrument Timbre Profile Key Characteristics
🎻 Viola Organista Bowed Strings Warm tone, strong odd harmonics, 5Hz vibrato, pink noise
🎹 Mechanical Organ Pipe Organ 1/n harmonic series, breath noise, high sustain
🎡 Programmable Flute Recorder Fundamental-dominant, 8% breath noise, 4.5Hz vibrato
πŸ”” Mechanical Carillon Bell System Inharmonic partials (1, 2.4, 3.9...), long release
🎺 Mechanical Trumpeter Brass Bright harmonics, breath noise, 5.5Hz vibrato
πŸ₯ Mechanical Drum Percussion Bessel drumhead modes, 60% noise burst, no sustain

✨ Ensemble Capabilities:

  • AI Composition: Generate period-authentic music in Dorian, Mixolydian, and other church modes
  • Audio Synthesis: Physics-based sound generation (not samples!) with 44.1kHz output
  • Hall Reverb: Schroeder reverb (4 comb + 2 allpass filters) for court acoustics
  • Visualizations: Waveform, spectrogram, and piano-roll score renders
  • CLI Integration: davinci-codex concert command for full pipeline

🎡 Experience the Interactive Ensemble β†’

See complete inventory β†’


Installation

Prerequisites

  • Python 3.9+
  • Git
  • 8GB RAM minimum for simulations

Setup

# Clone repository
git clone https://github.com/Shannon-Labs/davinci-codex.git
cd davinci-codex

# Create virtual environment and install
make setup

# Or manually:
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -e .

# Verify installation
make test

Usage

Command Line Interface

# List all inventions
davinci-codex list

# Run simulation
davinci-codex simulate --slug ornithopter --seed 42

# Generate CAD models
davinci-codex build --slug aerial_screw

# Run safety analysis
davinci-codex evaluate --slug parachute

# Execute full pipeline
davinci-codex pipeline --slug ornithopter

# 🎡 Generate a Renaissance mechanical concert
davinci-codex concert --form pavane --mode dorian --measures 16 --seed 42 --reverb 0.2

# Available forms: pavane, galliard, basse_danse, saltarello, allemande
# Available modes: dorian, mixolydian, phrygian, lydian

Python API

from davinci_codex import registry

# List inventions
inventions = registry.list_inventions()

# Get specific invention
ornithopter = registry.get_invention("ornithopter")

# Run simulation with deterministic seed
results = ornithopter.module.simulate(seed=42)

# Generate CAD models
ornithopter.module.build()

# Safety evaluation
evaluation = ornithopter.module.evaluate()

Development Commands

make test          # Run full test suite
make lint          # Run Ruff + mypy
make smoke         # Fast smoke tests
make demo          # Generate visualizations
make book          # Build Jupyter Book documentation

Methodology

Our computational archaeology approach combines historical research with modern engineering:

1️⃣ Historical Research

  • Original codex folio examination
  • Provenance documentation with manuscript references
  • Dimensional recovery from Renaissance units
  • Engineering intent interpretation

2️⃣ Mathematical Modeling

  • Physics-based frameworks (Newtonian mechanics, fluids)
  • Material property mapping (Renaissance β†’ modern)
  • Parametric design for optimization
  • Constraint and safety analysis

3️⃣ Computational Simulation

  • Finite element analysis and CFD with FSI
  • Validation metrics (lift, stress margins, energy)
  • Sensitivity analysis (Sobol indices, tornado plots)
  • Uncertainty quantification (epistemic + aleatory)

4️⃣ Safety Assessment

  • FMEA (Failure Mode and Effects Analysis)
  • Minimum 2Γ— safety factors on structural components
  • Ethical review (non-weaponization verification)
  • Modern regulatory compliance

5️⃣ Open Documentation

  • MIT licensed code, CC0 media
  • Seed-controlled reproducible simulations
  • Comprehensive educational resources

"Experience never errs; it is only your judgments that err by promising themselves results such as are not caused by your experiments." β€” Leonardo da Vinci

Learn more: Adaptation Methodology β€’ Physics Derivations


Contributing

"Patience serves as a protection against wrongs." β€” Leonardo da Vinci

We welcome contributions from engineers, historians, educators, and enthusiasts worldwide!

How to Contribute

  1. Fork and clone the repository
  2. Create a feature branch: git checkout -b feature/invention
  3. Develop and test: make test && make lint
  4. Submit a pull request with:
    • References to relevant codex folios
    • Safety analysis
    • Comprehensive tests
    • Documentation updates

Contribution Ideas

  • πŸ”§ New Inventions β€” Implement additional da Vinci designs
  • πŸ“ Enhanced Physics β€” Improve simulation accuracy
  • πŸ“š Historical Research β€” Add manuscript references
  • 🌍 Translations β€” Internationalize documentation
  • πŸŽ“ Educational Content β€” Create tutorials and guides
  • πŸ–¨οΈ CAD Models β€” Develop parametric 3D models
  • 🎨 Web Interfaces β€” Create interactive visualizations

See: CONTRIBUTING.md β€’ CODE_OF_CONDUCT.md


Resources

πŸ“– Documentation

πŸ“œ Leonardo's Original Manuscripts

πŸ“š Academic References

  • Martin Kemp, "Leonardo" (Oxford University Press) β€” Foundational text
  • e-Leo Archive β€” High-resolution manuscript scans
  • docs/meta/REFERENCES.md β€” Complete bibliography

Educational Applications

"Study without desire spoils the memory, and it retains nothing that it takes in." β€” Leonardo da Vinci

This project serves as a resource for:

  • πŸ“š STEM Education β€” Physics, mathematics, engineering, computer science
  • 🏫 Curriculum Integration β€” High school demonstrations to graduate research
  • πŸ› οΈ Maker Spaces β€” 3D printable CAD models for hands-on learning
  • πŸ›οΈ Museum Exhibitions β€” Interactive displays and historical reconstructions

Available Resources

  • 🎨 24 interactive web interfaces with Renaissance design
  • πŸ““ Jupyter notebooks with guided explorations
  • πŸ–¨οΈ Parametric CAD models for 3D printing
  • πŸ“Š Simulation visualizations
  • πŸ“œ Historical context and provenance documentation

License & Citation

Code

MIT License - See licenses/LICENSE

Media

CC0 1.0 Universal - Public Domain Dedication

Citation

@software{davinci_codex_2025,
  author = {Bown, Hunter},
  title = {The da Vinci Codex: Computational Archaeology of Renaissance Mechanical Engineering},
  year = {2025},
  publisher = {GitHub},
  url = {https://github.com/Shannon-Labs/davinci-codex}
}

See CITATION.cff for structured citation metadata.


Acknowledgments

🎨 Special Thanks

Leonardo da Vinci β€” For timeless inspiration and Renaissance genius

Open Source Community β€” For foundational tools and collaborative spirit

Digital Archives β€” For preserving and sharing Leonardo's manuscripts

Shannon Labs β€” For computational resources and research support


Author: Hunter Bown, Shannon Labs Development: Built with AI assistance for code generation and documentation Design: Renaissance aesthetics meet modern web technology


Contact

πŸ‘€ Principal Investigator: Hunter Bown πŸ“§ Email: hunter@shannonlabs.dev πŸ›οΈ Institution: Shannon Labs 🌐 Website: https://shannon-labs.github.io/davinci-codex/ πŸ’» GitHub: https://github.com/Shannon-Labs/davinci-codex


"Obstacles do not bend me. Every obstacle yields to stern resolve. He who is fixed to a star does not change his mind." β€” Leonardo da Vinci (1452-1519)

βš™οΈ Renaissance Engineering β€’ 🎨 Digital Innovation β€’ πŸ“ Golden Ratio Design β€’ 🌍 Open Source Forever


Made with ❀️, βš™οΈ, and Renaissance spirit Golden ratio proportions (Ο† = 1.618) throughout Built for education, exploration, and eternal curiosity

About

Open, reproducible reconstructions of Leonardo da Vinci's civil inventions

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages