Skip to content

DaanyaalSobani/vr-plotter

Repository files navigation

VR Plotter

A webapp that plots multivariable functions into an immersive VR environment. Enter any function of the form f(x, y) and fly around a 3D graph of it in your browser.

Live demo: vr-plotter.dsobani.com


VR Plotter Banner

What it does

Type a mathematical expression in terms of x and y, hit Plot, and the app generates a VR scene populated with spheres at every (x, y, z) point on the surface. Use WASD to fly around and drag the mouse to look.

Usage

Functions are entered using JavaScript's Math object:

Math notation Input
sin(x) Math.sin(x)
e^x Math.exp(x)
Math.pow(x, 2)

Do not include z = — just the right-hand side expression.

Examples

Gaussian Distribution

3*Math.exp(-Math.pow(x,2)-Math.pow(y,2))

Gaussian Distribution


Parabolic Bowl

Math.pow(x,2) + Math.pow(y,2)

Parabolic Bowl


Sin(x) + Cos(y)

Math.sin(x)+Math.cos(y)

Sin plus Cos


Running locally

With Docker (recommended)

docker compose up

Then open http://localhost:8080.

Without Docker

Serve the project from any PHP-enabled web server (Apache, nginx + php-fpm, or php -S localhost:8080).

Built with

  • A-Frame — WebVR framework
  • PHP — server-side expression injection into the scene
  • Bootstrap 4

About

A webapp that plots multi variable functions onto a VR enviroment.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors