FunctionVisor is a lightweight interactive function plotter built with plain HTML, CSS, and JavaScript. It renders mathematical expressions on a Cartesian plane, supports panning and zooming, and includes a value table for evaluating specific points on the curve.
The current interface is written in Spanish, while the repository documentation is maintained in English.
FunctionVisor is designed as a client-side static web app with no build step and no runtime framework. The project can be opened directly in a browser or served through any minimal static file server.
- Interactive graph rendering on an HTML5 canvas
- Pan with pointer drag
- Zoom with mouse wheel or touch pinch gestures
- Live cursor coordinate display
- Configurable X and Y axis step values
- Value table mode for evaluating custom
xinputs - Automatic centering on selected table values
- Responsive layout for desktop and mobile screens
- No bundler or installation required
Expressions are evaluated in the browser. The app currently supports:
- Variable:
x - Operators:
+,-,*,/,^,(,) - Numeric literals
- Constants:
pi,e - Functions:
sin,cos,tan,asin,acos,atan,sqrt,abs,log,ln,exp,floor,ceil,round,min,max,pow
Examples:
sin(x) * x / 2x^2 - 4sqrt(abs(x))cos(x) + 2
.
├── index.html
├── assets
│ ├── css
│ │ └── styles.css
│ └── js
│ └── app.js
└── .github
Open index.html in a modern browser.
Using Python:
python3 -m http.server 8000Then open http://localhost:8000.
- Enter a function in the input field.
- Click
Visualizar. - Drag on the canvas to move around the graph.
- Use the mouse wheel or touch pinch to zoom.
- Optionally define custom axis steps.
- Enable the value table to evaluate specific
xvalues and mark them on the graph.
This repository currently uses no package manager, no bundler, and no test runner. Development is intentionally simple:
- Edit
index.htmlfor markup changes - Edit
assets/css/styles.cssfor styling - Edit
assets/js/app.jsfor graphing and interaction logic - Reload the page in the browser to validate changes
- The project is fully client-side.
- Function expressions are transformed and evaluated in the browser.
- Input validation exists, but any future expansion of the evaluator should be reviewed carefully from a security perspective.
This repository includes a GitHub Actions workflow for deploying the static site to GitHub Pages.
To enable it:
- Push the repository to GitHub.
- In the repository settings, open
Pages. - Set the source to
GitHub Actions. - Push to
mainto trigger deployment.
Contributions are documented in CONTRIBUTING.md.
If you discover a security issue, follow the reporting process in SECURITY.md.
This project is licensed under the MIT License. See LICENSE.