Progress: Complete

3D wave simulation

Currently, the project consists of a representation of sin and Perlin noise waves along with GUI support from the Dear ImGui library.

As of now there are two ways to draw the sin and Perlin noise wave. The wave can be drawn as points in space connected into polygons using a procedural plane generation, or by individual boxes that change position based on the wave values.

The simulation is currently being processed by the CPU which I hope to later transfer over to GPU handling involving shaders for better performance. The next step, as of now, would be adding lighting to the world so the simulation isn't restricted to only using the wireframe mode.

Representation of Perlin Noise using OpenGL

The simulation has a dynamic light source which applies diffusion and specular light to objects in the world. In short the lighting is being calculated within the fragment shader where the ambient level is the color of the object alone, the diffusion level is the result of the angle that the light hits the object using its normal vector, and the specular light is a result of how close the the cameras position is to the reflection vector from the light source.

I also added the ability to drag and move around the light source, this involved calculating the AABB(Axis-aligned bounding box) of the light and converting the 2D cordinate of the click to a 3D ray in the world. Then all I had to do was use Ray-AABB intersection formulas to calculate if the click intersects with the box.

Github

Dec 2, 2024