Math-First Syntax
Unicode operators, set operations, and mathematical notation built into the language. Write code that reads like math.
let A = {1, 2, 3} ∪ {3, 4, 5}
MathViz is a modern domain-specific language designed for mathematical animations. Write clean, expressive code that compiles to Python and integrates seamlessly with Manim.
// Create an animated circle scene
scene CircleAnimation {
fn construct(self) {
let circle = Circle(radius: 2.0)
circle.set_color(BLUE)
let label = MathTex("A = \\pi r^2")
label.next_to(circle, DOWN)
play(Create(circle))
play(Write(label))
wait(2.0)
play(circle.animate.scale(1.5))
play(FadeOut(circle, label))
}
}
fn main() {
println("MathViz Animation Ready!")
}
A production-ready language designed for clarity, performance, and seamless integration with the Python ecosystem.
Unicode operators, set operations, and mathematical notation built into the language. Write code that reads like math.
let A = {1, 2, 3} ∪ {3, 4, 5}
Generated Python code is clean and readable. Full interoperability with the entire Python ecosystem.
mathviz compile file.mviz -o output.py
Scene blocks compile directly to Manim classes. Create beautiful animations with a clean, declarative syntax.
scene MyAnimation { ... }
Type checking, linting, formatting, analysis, and watch mode. Everything you need to develop efficiently.
mathviz watch src/
Organize code with modules. Use pub for exports, use for imports. Clean architecture for any project size.
use geometry.distance
Native desktop editor built with Tauri and Monaco. Syntax highlighting, preview, and integrated tooling.
Win / macOS / Linux
Full syntax highlighting, 18 code snippets, bracket matching, and Tokyo Night theme support for VS Code.
.mviz / .mvz
Built-in update detection checks PyPI automatically. Get notified of new versions without leaving the terminal.
pipx upgrade mathviz
Install MathViz with a single command. Use pipx for isolated installation or uv for development.
MathViz source files use the .mviz extension.
pipx install mathviz
pip install mathviz
git clone https://github.com/CyberSnakeH/MathViz.git && cd MathViz && uv sync --dev
mathviz --version
mathviz run examples/hello_world.mviz
A native desktop editor with syntax highlighting, live preview, and integrated tooling.
use geometry
fn main() {
let d = geometry.distance(0, 0, 3, 4)
println("Distance: {}", d)
let area = PI * 5.0 ^ 2
println("Circle area: {}", area)
}
@njit(parallel=true)
fn compute_sum(arr: List[Float]) -> Float {
let total = 0.0
for x in arr {
total += x * x
}
return total
}
import numpy as np
from numba import njit, prange
def main():
d = geometry_distance(0, 0, 3, 4)
print(f"Distance: {d}")
area = np.pi * 5.0 ** 2
print(f"Circle area: {area}")
@njit(parallel=True, cache=True)
def compute_sum(arr):
total = 0.0
for x in prange(len(arr)):
total += arr[x] * arr[x]
return total
Everything you need to compile, run, analyze, and format your MathViz code.
mathviz compile animation.mviz -o output.py
mathviz run animation.mviz -q h --preview
mathviz typecheck src/*.mviz --strict
mathviz fmt src/ --write
mathviz analyze src/main.mviz --json
mathviz watch src/ -o build/