ballistics.foo
// Interactive Ballistics Playground
Explore ballistics physics through code, powered by Rust and WebAssembly

About

// What is ballistics.foo?

What is ballistics.foo?

ballistics.foo is an interactive web-based playground for learning about ballistics physics and modern web technologies. It combines a professional-grade ballistics calculation engine with a multi-language programming environmentβ€”all running entirely in your browser.

Whether you're a shooter curious about trajectory calculations, a developer exploring WebAssembly, or a student learning physics, ballistics.foo provides a hands-on environment to experiment and learn.

Educational Mission: Our goal is to make ballistics physics accessible and understandable through interactive code examples. By seeing the math in action and modifying parameters in real-time, users can build intuition about how projectiles behave.

Features

🎯 Professional Ballistics Engine

High-precision trajectory calculations with drag models, wind drift, spin drift, Coriolis effect, and more.

πŸš€ Multi-Language Support

Run ballistics calculations in JavaScript, Python, Ruby, or PHPβ€”all in the browser.

⚑ Lightning Fast

Powered by WebAssembly for near-native performance. Complex calculations run in milliseconds.

πŸ”’ Privacy First

All calculations run locally in your browser. We don't see or store your data.

πŸ“š Interactive Examples

Pre-loaded code examples to get started immediately. Modify and experiment freely.

πŸ†“ Free and Open Source

The ballistics engine is open source (MIT OR Apache-2.0). No accounts, no paywalls.

Technology Stack

Core Engine:

The ballistics calculations are powered by the Ballistics Engine, a high-performance Rust library compiled to WebAssembly.

Rust
WebAssembly
wasm-pack
wasm-bindgen

Language Runtimes:

Multiple programming languages run directly in the browser:

JavaScript (Native)
Pyodide (Python)
ruby.wasm (Ruby)
php-wasm (PHP)

User Interface:

A clean, developer-focused interface built with:

Monaco Editor
Vanilla JavaScript
CSS Grid/Flexbox

Why WebAssembly?

Who is this for?

πŸŽ“ Students and Educators

πŸ‘¨β€πŸ’» Developers

🎯 Shooters and Reloaders

πŸ”¬ Researchers

The Ballistics Engine

ballistics.foo is powered by the Ballistics Engine, a professional-grade Rust library for external ballistics calculations.

Key Capabilities:

Physics Models:

The engine implements several ballistics models:

Open Source: The ballistics engine source code is available on GitHub under dual MIT and Apache-2.0 licenses. Contributions welcome!

Two Ways to Use the Engine

1. CLI-Style Interface

Simple command-line style interface. Great for quick calculations and demos:

const ballistics = new ballisticsEngine.WasmBallistics();
const result = ballistics.runCommand(
  "ballistics trajectory -b 0.505 -v 2789 --drag-model G7 -r 600"
);
console.log(result);

2. Object-Oriented API

Fluent API with method chaining. Type-safe and developer-friendly:

const calc = new ballisticsEngine.Calculator()
    .setBC(0.505)
    .setVelocity(2789)
    .setDragModel('G7')
    .setWind(10, 90)
    .setZeroRange(200);

const result = calc.calculateTrajectory(600);
console.log(`Drop: ${result.drop_inches}" | Drift: ${result.drift_inches}"`);

Safety and Responsible Use

Educational Tool Only: ballistics.foo provides estimates for educational purposes. Calculations should not be relied upon for actual shooting scenarios without independent verification.

Please review our Safety Disclaimer before using ballistics calculations. Key points:

See our Terms of Service for complete legal terms.

Project Background

Why ballistics.foo?

This project was born from the intersection of three interests:

  1. Ballistics: A fascination with the physics of projectile motion
  2. Rust and WebAssembly: Exploring modern web technologies and performance
  3. Education: Making complex physics concepts accessible through interactive tools

Traditional ballistics software often requires desktop installation, has outdated interfaces, or lacks educational focus. We wanted to create something that:

Development Philosophy

Future Plans

Upcoming Features:

Want to Contribute?

The ballistics engine is open source! Contributions are welcome:

Credits and Acknowledgments

Created By:

Alex Jokela - Developer, ballistics enthusiast, and Rust advocate

Built With:

Inspired By:

Contact

Get in Touch:

Follow the Project:

License

The ballistics engine is dual-licensed under your choice of:

Both licenses allow:

See the full license text for details.

The website content and design are Β© 2025 Alex Jokela.

Ready to explore ballistics?

Launch Playground β†’
← Back to Playground