ACADEMIC YEAR

2024 / 2025

Solar System

Simulate a small solar system with multiple planets orbiting a star — Verlet integration, gravitational forces, and a little data visualisation on the side. Integrating a system of coupled ODEs is always a bit tricky, and many students struggled in interesting ways.

  • Verlet integration
  • Gravitational forces
  • Data visualisation

→ github.com/aaleta/2025_1_solar_system

Particle-detection looking simulation
Quasar-like trajectories
Wrong sign — planets repelling
Helix — beautiful by accident

So many wrong things happening — quasar simulator, wrong sign, a helix that ended up rather beautiful.

Then, in the exam, we asked them to add small modifications so they could divert an asteroid heading for Earth (Armageddon style). Let’s just say we need to find better pilots for our future space missions.

Missile veering off
Missile, take two
Wrong aim
Verlet integration gone wrong

Asteroid-diversion attempts from the exam.

Rumba

A small 2D videogame, written in C against the SDL3 library, where a robot vacuum (a Rumba) tries to clean the first floor of the Faculty of Science. Random walk, collision detection, and just enough videogame physics that students could see their code in action.

  • Random walk
  • Monte Carlo
  • Collision detection
  • Videogame physics (SDL3)

→ github.com/aaleta/2025_2_rumba

Once the battery went below a certain threshold, the Rumba had to return to its charging dock to recharge and resume cleaning.

In the exam we asked one short question, and let them use any resources they wanted (internet, ChatGPT, books, classmates): "What Rumba should we buy? Justify your answer." Let’s just say they weren’t ready for such a difficult question.

ACADEMIC YEAR

2023 / 2024

Harmonic Oscillator

The first assignment of the redesigned course — implement Euler and Verlet integration to simulate a harmonic oscillator, and compare their accuracy. In the exam, students were asked to add small modifications to their code, such as a slightly different potential.

  • Euler method
  • Verlet integration

→ github.com/aaleta/2024_1_oscilador

Position of the harmonic oscillator over time

Position of the harmonic oscillator over time.

Brownian Motion

Simulate a student who may have had a few too many drinks moving across a 2D grid, dodging buildings, and trying to make it to class on time. Random number generation, Monte Carlo, and a bit of collision detection.

  • Random number generation
  • Monte Carlo
  • Collision detection

→ github.com/aaleta/2024_2_brownian

Completely wasted students trying to get to class.

But good students always know how to find their way, even if drunk (hint: Metropolis algorithm).

§ — Notes

Other resources.

  • ES · 2018/19
    Los malditos punteros

    Notes on how pointers actually work in C — from the 2018/19 cohort at the University of Zaragoza.

    PDF ↗

I am also the 3rd-year academic advisor for the Physics B.Sc. See the advising page →