This Unity project implements concepts from Catlike Coding's tutorial on Mathematical Surfaces. It visualizes mathematical functions dynamically in 3D space, helping explore their behavior interactively.
2024-12-07.21-31-13.mp4
The Graph project visualizes mathematical functions in Unity by creating a grid of points and transforming them using mathematical equations. This project is based on the tutorials provided by Catlike Coding, which aim to teach Unity's scripting and math fundamentals.
This repository can be found at Albatrozx11/Graph.
- Real-time rendering of mathematical functions.
- Animation support to visualize dynamic changes.
- Easily extensible with additional mathematical functions.
- Beginner-friendly Unity and C# code.
- Unity Editor (2021.3 LTS or newer is recommended)
- Basic understanding of Unity and C# scripting.
- Clone the repository:
git clone https://github.com/Albatrozx11/Graph.git
- Open the project in Unity.
- Load the Graph scene to start exploring.
- Play the Scene: Open the Graph scene and press Play to see mathematical functions rendered dynamically.
- Switch Functions: Use the drop-down menu in the Inspector to select different mathematical functions.
- Customize Parameters: Modify settings like grid resolution, animation speed, or function parameters to see their effects in real-time.
This project includes the following mathematical functions:
- Sine Wave: Creates a classic sine wave.
- Multi-Sine Wave: Combines multiple sine waves for intricate patterns.
- Ripple: Generates a circular wave effect.
- Sphere: Transforms points to form a sphere.
- Torus: Creates a toroidal shape.
Feel free to extend this library by adding your own functions in the FunctionsLibrary script.
Graph/
├── Assets/
│ ├── Scripts/
│ │ ├── Graph.cs # Main script for graph generation.
│ │ ├── GraphFunction.cs # Interface for defining functions.
│ │ ├── FunctionsLibrary.cs # Predefined mathematical functions.
│ ├── Scenes/
│ │ ├── Graph.unity # Main scene for visualization.
│ ├── Materials/
│ │ ├── GraphMaterial.mat # Material used for graph points.
│ └── Prefabs/
│ ├── Point.prefab # Prefab for a single graph point.
└── README.md # Project documentation.