citoreh commited on
Commit
935f622
·
verified ·
1 Parent(s): db16626

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +95 -14
README.md CHANGED
@@ -1,14 +1,95 @@
1
- ---
2
- title: Math
3
- emoji: 📈
4
- colorFrom: green
5
- colorTo: pink
6
- sdk: gradio
7
- sdk_version: 5.42.0
8
- app_file: app.py
9
- pinned: false
10
- license: mit
11
- short_description: 'mathematical equations '
12
- ---
13
-
14
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 📊 Mathematical Equation Visualizer
2
+
3
+ An interactive web application for visualizing mathematical equations with multiple plot types and customization options.
4
+
5
+ ## Features
6
+
7
+ - **Multiple Plot Types:**
8
+ - 2D Functions (y = f(x))
9
+ - Parametric Equations (x = f(t), y = g(t))
10
+ - Polar Equations (r = f(θ))
11
+ - Implicit Equations (F(x,y) = 0)
12
+ - 3D Surface Plots (z = f(x,y))
13
+ - **Customization Options:**
14
+ - Adjustable plot ranges
15
+ - Color selection
16
+ - Line styles
17
+ - Grid toggle
18
+ - Custom titles
19
+ - Multiple color schemes for 3D plots
20
+ - **Built-in Examples:**
21
+ - Pre-loaded examples for each plot type
22
+ - Easy-to-use example selector
23
+
24
+ ## Supported Mathematical Functions
25
+
26
+ - Trigonometric: `sin`, `cos`, `tan`
27
+ - Exponential: `exp`, `log`
28
+ - Power: `sqrt`, `**` (exponentiation)
29
+ - Basic arithmetic: `+`, `-`, `*`, `/`
30
+ - Other: `abs`
31
+
32
+ ## Usage Examples
33
+
34
+ ### 2D Functions
35
+
36
+ - `sin(x)` - Sine wave
37
+ - `x**2 + 2*x + 1` - Parabola
38
+ - `exp(-x**2)` - Gaussian curve
39
+
40
+ ### Parametric Equations
41
+
42
+ - x: `cos(t)`, y: `sin(t)` - Circle
43
+ - x: `t*cos(t)`, y: `t*sin(t)` - Spiral
44
+
45
+ ### Polar Equations
46
+
47
+ - `1 + cos(theta)` - Cardioid
48
+ - `sin(4*theta)` - Four-petaled rose
49
+
50
+ ### Implicit Equations
51
+
52
+ - `x**2 + y**2 - 1` - Circle
53
+ - `x**3 + y**3 - 3*x*y` - Folium of Descartes
54
+
55
+ ### 3D Surfaces
56
+
57
+ - `sin(sqrt(x**2 + y**2))` - Sinc function
58
+ - `x**2 - y**2` - Hyperbolic paraboloid
59
+
60
+ ## How to Use
61
+
62
+ 1. Select a plot type from the dropdown menu
63
+ 1. Enter your mathematical equation using the supported functions
64
+ 1. Adjust the plot ranges as needed
65
+ 1. Customize colors, line styles, and other visual options
66
+ 1. Click “Generate Plot” or let it auto-generate as you type
67
+ 1. Use the examples section to load pre-made equations
68
+
69
+ ## Technical Details
70
+
71
+ - Built with Gradio for the web interface
72
+ - Uses Matplotlib for plotting
73
+ - SymPy for mathematical expression parsing
74
+ - NumPy for numerical computations
75
+
76
+ ## Deployment
77
+
78
+ This application is ready to be deployed on Hugging Face Spaces. Simply:
79
+
80
+ 1. Create a new Space on Hugging Face
81
+ 1. Upload the `app.py` and `requirements.txt` files
82
+ 1. The app will automatically build and deploy
83
+
84
+ ## Error Handling
85
+
86
+ The application includes robust error handling for:
87
+
88
+ - Invalid mathematical expressions
89
+ - Division by zero
90
+ - Complex number results (automatically converted to real)
91
+ - Infinite values (clipped for display)
92
+
93
+ -----
94
+
95
+ **Note:** This application is designed for educational and visualization purposes. For complex mathematical analysis, consider using specialized mathematical software.