Turn your geometry problems into interactive diagrams with AI
SketchMath is a nifty little web app that uses AI to transform written geometry problems into beautiful interactive diagrams. Simply type your problem, click "Generate Diagram," and watch as your geometric challenge comes to life!
Whether you're a student struggling with homework, a teacher preparing visual aids, or just a math enthusiast, SketchMath makes visualizing geometry problems quick and painless.
Try it now: https://sketchmath.onrender.com/
- 💬 Text-to-Diagram Conversion: Describe your geometry problem, and let AI do the drawing
- ⚙️ Code Visibility: Toggle to see the JavaScript code behind your diagram
- 🖌️ Interactive Diagrams: Powered by JSXGraph for smooth, interactive geometry
- Frontend: HTML, CSS, JavaScript
- Backend: Node.js with Express
- AI: Google's Gemini AI
- Diagram Rendering: JSXGraph
- Node.js (v14 or higher recommended)
- A Gemini API key from Google
-
Clone this repository:
git clone https://github.com/dadadadas111/sketchmath.git cd sketchmath -
Install dependencies:
npm install -
Create a
.envfile in the root directory and add your Gemini API key:GEMINI_API_KEY=your_api_key_here -
Start the server:
npm start -
Open your browser and navigate to:
http://localhost:3000
- Type a geometry problem in the text area
- Click "Generate Diagram" and wait for AI to work its magic
- Explore the interactive diagram that appears
- Optionally, click "Show Code" to see the JavaScript behind your diagram
- Use "Clear" to start over with a new problem
Try these examples to see SketchMath in action:
- "Draw a right triangle ABC with angle C = 90°, side AB = 5 units, and side BC = 3 units."
- "Construct a circle with radius 3 and a point P at distance 5 from the center. Draw the tangent lines from P to the circle."
- "Draw a square ABCD with side length 4 and its diagonals."
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
This project is MIT licensed.
- Built with love by dadadadas111
- Powered by Google's Gemini AI
- Visualization courtesy of JSXGraph
Made with ❤️ for math lovers everywhere
