Academic graphics programming project

Chillet: 2D Graphics & Animation

  • Academic project
  • Completed project
  • Custom linear algebra · Mesh construction · Interactive animation
custom vector and matrix math

Project overview

I created an interactive 2D Chillet model in Unity using custom vector and matrix maths for movement, rotation, and scaling, with position-based colour changes, mouse controls, mesh inspection, and independent tail-wag and head-bob animations.

Context
Academic project
Status
Completed project
Focus
Custom linear algebra · Mesh construction · Interactive animation
  • UnityScene rendering and interaction
  • C#Custom vector, matrix, mesh, and animation code
  • Visual StudioDevelopment environment
  • Git / GitHubVersion control

Supporting detail

The video and image carousel show how custom maths, mesh construction, and input work together in the scene, alongside selected exercises from Workshops 2 to 5.
These details explain the assignment constraints and the additional mesh and animation work behind it.

Assignment brief

Implementing the maths behind the movement.

The assignment required a 2D object made from more than 30 triangles and custom vector and matrix-based transformation functions in Unity and C#.
Movement, rotation, and scaling had to use those functions rather than Unity's built-in transformation methods.
Further tasks introduced two moving objects, position-dependent colour and scale, draggable boundaries, speed controls, and a mesh-inspection mode for checking triangle orientation.

My implementation

From custom maths to an interactive model.

  1. 01

    Using custom vector and matrix classes, I connected the underlying linear algebra to the model's movement, rotation, and scaling.

  2. 02

    I built the Chillet model with subdivided meshes, going beyond the brief with a mesh setup that allowed overlapping vertices.

  3. 03

    I made the scene interactive through movable boundaries and speed controls, with colour and scale changes showing each object's position along its path.

  4. 04

    I added mesh inspection to check the geometry, along with independently controlled tail-wag and head-bob animations to give the character additional movement.

Project focus

The core areas.

  • Custom linear algebra
  • Mesh construction
  • Interactive animation

Reflection

The subdivided-mesh trade-off.

Working with subdivided meshes was the hardest part of this project.
Although subdivision was not required by the brief, I chose a mesh setup that allowed overlapping vertices.
The extra effort in constructing the mesh made smoother animations much easier to create while keeping the character's colours clearly separated.

Supporting evidence

Custom maths made visible.

The first six captures show how I built and tested Chillet's movement, colour, animation, and interaction.
The selected workshop examples that follow cover the vector, matrix, and mesh exercises that supported this work.

  1. Two Chillet models at different positions and rotations between cyan diamond markers, with the scene controls listed in the upper-left corner.
  2. Two rotated Chillet models with curved tails and a control legend for toggling tail-wag and head-bob animations.Animation expresses excitement.
  3. Chillet scene with the upper-right diamond raised above the upper-left diamond and two models between their respective endpoint pairs.Colour and scale follow progress.
  4. The lower-right diamond is white beside the mouse pointer and has been dragged below the cyan lower-left diamond.Changing the path directly.
  5. Both Chillet models appear as green silhouettes in front/back face inspection mode, with cyan path endpoints still visible.Checking face orientation.
  6. A close view of both Chillet models with individual triangles coloured differently and numbered vertex labels across the mesh.A debugging view for the mesh.
  7. A teal spiral winding around a straight purple axis, with varying distances between the spiral and the axis.Workshop 2: Trigonometry in motion.
  8. Unity Scene view showing a cube with some faces removed, alongside the Game view where the remaining faces form the visible cube.Workshop 3: Culling with vectors.
  9. Handwritten calculations showing a matrix transpose, multiplication by a scalar, and row-by-column matrix multiplication.Workshop 4: Working through matrix operations.
  10. Three green mesh objects with different positions, orientations, and sizes in a Unity scene.Workshop 5: Separating the transformations.
  11. Three clock hands of different lengths and widths rotated around a shared pivot in a Unity scene.Workshop 5: Turning time into rotation.
  12. A Sierpinski triangle with repeated triangular subdivisions and grey centre triangles, with a prompt to toggle the secondary submesh using Q.Workshop 5: Subdivision and submeshes.

Evidence 01 / 12

Custom maths in motion.

I built Chillet from 139 triangles and 177 stored vertices, using three submeshes for its main colour, light features, and dark details.
My custom vector and matrix classes scale, rotate, and translate the mesh vertices before passing them to Unity for display.
Interpolation moves each model between two endpoints, reversing at either end while its rotation continues.

Evidence 1 of 12: Custom maths in motion.

Custom maths in motion.

Two Chillet models at different positions and rotations between cyan diamond markers, with the scene controls listed in the upper-left corner.