Skip to content
← All projects

3D Rendering Engine

I wanted to understand the math behind a 3D renderer by building one. This Java project grew into a way to visualise scalar fields, neural networks, and gradient descent without a graphics library underneath.

2025
JavaMultithreadingLinear algebra
Scalar field editor showing x^2 + y^2 as a paraboloid with gradient descent vectors
Scalar field editor showing x^2 + y^2 as a paraboloid with gradient descent vectors

01

Starting with the math

I built this in Java to work through what happens between a 3D point and a pixel on the screen. Object transformations, projection, and camera movement are implemented directly, without a graphics library doing the linear algebra underneath. That makes the renderer a useful place to experiment: changing a transformation means seeing its effect immediately.

02

Watching gradient descent

On top of the renderer, I added neural-network visualisations and a scalar-field editor. A loss curve shows whether optimisation is improving; the 3D view shows where the model is moving on the surface. The gradient-descent demo connects the update rule to a direction you can actually see.

03

Rendering across threads

Rendering runs across multiple threads, and this was where most of my debugging time went. The project brought linear algebra and concurrency into the same program: the scene has to be mathematically correct, but the work that produces each frame also has to fit together.