An Android app for building and animating user-defined 3D mathematical surfaces.
The project lets you enter functions, render them with OpenGL ES 2.0, and animate them over time
when the formula depends on t. It is a personal project intended to become a polished open-source
portfolio piece and a future F-Droid candidate.
- Plots one or more 3D surfaces on the same scene
- Supports time-dependent functions and live animation
- Supports multiple function definition modes:
z(x, y)z(r, phi)r(theta, phi)- parametric surfaces
x(u, v),y(u, v),z(u, v)
- Includes built-in example scenes such as waves, a pulsating sphere, a cylinder, and a Moebius strip
- Stores user-defined functions locally with Room
- Provides a custom math keyboard for entering expressions more easily
- Lets the user control rendering options such as grid visibility, rotation sensitivity, and graph screen orientation
Function3DAnimator is built around a custom expression parser and evaluator that turns user-entered
math into renderable surface data, then generates OpenGL ES 2.0 vertex and normal buffers for
Cartesian, elliptical, spherical, and parametric surfaces. The rendering layer supports
time-dependent formulas through the t variable, so surfaces can be animated without changing the
stored function definition, while Room persistence keeps user functions and built-in examples
available offline. The UI combines the original Android Views flow with an ongoing Kotlin/Jetpack
Compose migration, making the project a compact example of math parsing, real-time 3D rendering,
local data storage, and incremental Android modernization.
Non-parametric:
x*x*cos(t)/3.0
exp(-(x^2+y^2)*(4+cos(t)))
sin(r+phi+t)
1+cos(t)
Parametric:
x(u,v) = (1+0.5*v*cos(0.5*(u+t)))*cos(u+t)
y(u,v) = (1+0.5*v*cos(0.5*u+t))*sin(u+t)
z(u,v) = 0.5*v*sin(0.5*(u+t))
Operators:
+-*/^
Functions:
sqrtexpsincostgctgabsloglnasinacosatgshch
Variables depend on the selected function type:
- Cartesian:
x,y,t - Elliptical:
r,phi,t - Spherical:
theta,phi,t - Parametric:
u,v,t
- Kotlin
- Android Views + Jetpack Compose
- OpenGL ES 2.0
- Room
- Hilt
- Gradle Kotlin DSL
Current Android configuration:
minSdk = 26targetSdk = 36- Java/Kotlin target:
17
- Android Studio with a recent Android SDK installed
- JDK 17
- An Android device or emulator with OpenGL ES 2.0 support
- Open the project in Android Studio.
- Let Gradle sync.
- Run the
appconfiguration on a device or emulator.
.\gradlew.bat assembleDebugTo run unit tests:
.\gradlew.bat testDebugUnitTestapp/src/main/java/io/github/nvlad1/function3danimator/modelcontains the function models, surface generation, and expression evaluation logicapp/src/main/java/io/github/nvlad1/function3danimator/openGLutilscontains the renderer and OpenGL helpersapp/src/main/java/io/github/nvlad1/function3danimator/databasecontains local persistence with Roomapp/src/main/java/io/github/nvlad1/function3danimator/uicontains the app screens and UI logic
This is an actively maintained personal project. The app is fully functional and continues to be improved, with ongoing refinements and documentation updates.
The app allows Android system backups. No data is transmitted by the app itself, but system-level backup services (e.g., Google Drive) may store app data externally.
Vladislav Naboka
This project is licensed under the MIT License - see the LICENSE file for details.