Show HN: Create math animations from text

https://github.com/sdan/openanimator

openanimator

generate videos like 3blue1brown with ✨ai✨

CalculusInMotion.mp4

how it works:

frontend runs ai sdk, two function calls: generate manim code, render manim code. generate manim code uses few-shot examples to use the user's request and turn that into manim code. render manim code then is called and takes that code, cleans and santizes(lightly) and sends it to rendering engine, which simply runs that manim code and hosts it on a simple flask server

specs:

client is a nextjs ai sdk frontend, reqs: auth0 auth, server runs independently on a dedicated machine (railway)

server is a python server that takes manim code and renders it, reqs: public endpoint

how to run

frontend: cd client, vc dev (need to add .env and various backend: cd server, python main.py, railway up (no configs needed)

improvements:

use claude, move rendering engine into a cf worker, use improved tool calling with ai sdk

{
"by": "sdan",
"descendants": 0,
"id": 40230533,
"score": 4,
"time": 1714603327,
"title": "Show HN: Create math animations from text",
"type": "story",
"url": "https://github.com/sdan/openanimator"
}
{
"author": "sdan",
"date": null,
"description": "Contribute to sdan/openanimator development by creating an account on GitHub.",
"image": "https://opengraph.githubassets.com/1a0dfb2a4e3738c34e7f7d24d01a4a681544824a2f1fb681e9c31dd7d0785c96/sdan/openanimator",
"logo": "https://logo.clearbit.com/github.com",
"publisher": "GitHub",
"title": "GitHub - sdan/openanimator",
"url": "https://github.com/sdan/openanimator"
}
{
"url": "https://github.com/sdan/openanimator",
"title": "GitHub - sdan/openanimator",
"description": "openanimator generate videos like 3blue1brown with ✨ai✨ CalculusInMotion.mp4 how it works: frontend runs ai sdk, two function calls: generate manim code, render manim code. generate...",
"links": [
"https://github.com/sdan/openanimator"
],
"image": "https://opengraph.githubassets.com/1a0dfb2a4e3738c34e7f7d24d01a4a681544824a2f1fb681e9c31dd7d0785c96/sdan/openanimator",
"content": "<div><article><p></p><h2>openanimator</h2><a target=\"_blank\" href=\"https://github.com/sdan/openanimator#openanimator\"></a><p></p>\n<p>generate videos like 3blue1brown with ✨ai✨</p>\n<details>\n <summary>\n <span>CalculusInMotion.mp4</span>\n <span></span>\n </summary>\n <video src=\"https://private-user-images.githubusercontent.com/22898443/327262921-332eef0b-0e1d-4c86-bf10-ed4d4355e980.mp4?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzQ4NTg1NDEsIm5iZiI6MTczNDg1ODI0MSwicGF0aCI6Ii8yMjg5ODQ0My8zMjcyNjI5MjEtMzMyZWVmMGItMGUxZC00Yzg2LWJmMTAtZWQ0ZDQzNTVlOTgwLm1wND9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDEyMjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQxMjIyVDA5MDQwMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYzMjc3NWU0MGRlOWFkZGE5ZDRjMDBiNTBlZmM1MWIwNmU2NDM1OGFiNTk2MWRiZDFlNzgzODZhODc1NWIzYzgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.IwpiZHp0-DGv9M6f8tLHoUxImWLUQRqsVGcw5f5lbvg\" controls=\"controls\" muted=\"muted\">\n </video>\n</details>\n<p></p><h2>how it works:</h2><a target=\"_blank\" href=\"https://github.com/sdan/openanimator#how-it-works\"></a><p></p>\n<p>frontend runs ai sdk, two function calls: generate manim code, render manim code. generate manim code uses few-shot examples to use the user's request and turn that into manim code. render manim code then is called and takes that code, cleans and santizes(lightly) and sends it to rendering engine, which simply runs that manim code and hosts it on a simple flask server</p>\n<p></p><h3>specs:</h3><a target=\"_blank\" href=\"https://github.com/sdan/openanimator#specs\"></a><p></p>\n<p>client is a nextjs ai sdk frontend, reqs: auth0 auth, server runs independently on a dedicated machine (railway)</p>\n<p>server is a python server that takes manim code and renders it, reqs: public endpoint</p>\n<p></p><h2>how to run</h2><a target=\"_blank\" href=\"https://github.com/sdan/openanimator#how-to-run\"></a><p></p>\n<p>frontend: cd client, vc dev (need to add .env and various \nbackend: cd server, python main.py, railway up (no configs needed)</p>\n<p></p><h3>improvements:</h3><a target=\"_blank\" href=\"https://github.com/sdan/openanimator#improvements\"></a><p></p>\n<p>use claude, move rendering engine into a cf worker, use improved tool calling with ai sdk</p>\n</article></div>",
"author": "",
"favicon": "https://github.githubassets.com/favicons/favicon.svg",
"source": "github.com",
"published": "",
"ttr": 30,
"type": "object"
}