This section outlines my academic progression—from foundational undergraduate work in computational geometry and visualization to my current postgraduate research.
This research investigates why spatial navigation that succeeds in one direction can fail in reverse — a question motivated by a simple, informal observation: animals that enter an enclosed space through a small opening (for instance, birds passing through a gap in protective netting) often navigate it with ease, yet struggle considerably to relocate the same opening when trying to leave. Rather than treating this as a failure of memory, the project investigates whether it can instead be explained by egocentric, viewpoint-dependent spatial encoding — the same physical location can present an entirely different perceptual pattern depending on the direction from which it is approached. The problem is formalised as a controlled dynamical system: first as a discrete Markov Decision Process, then as a continuous system governed by ordinary differential equations. Reinforcement learning is used as an empirical tool to train and compare agents of differing memory capacity under systematic changes to viewpoint and landmark configuration, with the resulting trajectories analysed using dynamical-systems theory.
Dynamical Systems Theory and Reinforcement Learning — Mathematical Modelling of Spatial Navigation and Memory
Can viewpoint-dependent (egocentric) spatial encoding — rather than an absence of spatial memory — account for the difficulty in relocating a previously encountered opening when an agent's orientation relative to it is reversed, and can the resulting navigation behaviour be characterised using dynamical-systems tools (equilibria, stability, sensitivity to initial conditions) alongside standard reinforcement-learning performance metrics?
The project proceeds in two mathematical stages. The first formulates navigation as a discrete Markov Decision Process on a grid, with the agent's observations defined egocentrically — relative to its own heading — rather than in absolute coordinates; this is the mechanism through which viewpoint-dependence is introduced. The second reformulates the same problem as a continuous dynamical system, discretised numerically (Euler / Runge–Kutta), in which the trained policy induces a closed-loop vector field analysable with standard dynamical-systems techniques. Environments are implemented first in Python, then extended into an interactive 3D visualisation built with the Ursina library, drawing on the parametric-animation and 3D-kinematics techniques developed in prior undergraduate work (A Python-based Approach to Animate Geometry and Data). Reinforcement-learning agents (Gymnasium environments, PyTorch models) are trained under a canonical landmark configuration and evaluated under controlled perturbations — landmark displacement, removal, and geometric transformation — with performance compared across agents of differing memory capacity using multi-seed statistical testing.
The literature review — animal spatial navigation, viewpoint-dependent recognition, and existing computational approaches to spatial memory — is complete, and the research question and mathematical formalisation have been finalised. The core mechanism, egocentric versus allocentric observation and the role of an asymmetric landmark in producing viewpoint-dependent navigation difficulty, has been designed and validated in a minimal Python prototype. Work is currently focused on building the 3D simulation and visualisation environment using Ursina, extending the parametric-animation techniques developed in prior undergraduate work. Reinforcement-learning training, via Gymnasium and PyTorch, is planned for the following phase and has not yet begun.
This project explores mathematical visualization and computational geometry by transitioning abstract mathematical concepts into dynamic visual models. By implementing custom parametric models and 3D kinematics, the project demonstrates how mathematical motion and geometric properties can be animated and interactively rendered.
A core objective of this work is to showcase how mathematics can be truly visualized—rather than just taught using abstract formulas—helping us see phenomena and making complex concepts crystal clear. The magic behind all of these visualizations lies simply in their parametric equations, making it possible to breathe life into these shapes with just a few lines of code!
International Conference on Scientific Computing and its Applications (SCA-2026)
A Python-Based Approach for Animating Geometric Concepts and Mathematical Motion
March 14-15, 2026
South Asian University, New Delhi (Online)
Current Research in Statistics and Mathematics (Volume - 2)
A Python-Based Approach for Animating Geometric Concepts and Mathematical Motion
Shubham Tiwari
Bright Sky Publications
2026
978-93-6233-258-5
978-93-6233-017-8
Below are key animations generated using Matplotlib and custom geometric engines. The real magic here is that each of these complex structures is generated and animated purely through its mathematical parametric equations using just a few lines of Python code.
Mathematical immersion and rendering of Boy's surface, elegantly driven by complex parametric equations in a 3D environment.
A fundamental 3D rigid body engine demonstrating Euler sequential rotation matrices applied to a discrete vertex array.
Dynamic rotation of a Helicoid. Its continuous minimal surface spiral is generated with just a few lines of trigonometric code.
Visualizing the continuous isometric transformation between a Catenoid and a Helicoid, highlighting their topological relation.
Rotation of Enneper's minimal surface, characterized by self-intersections easily rendered via parametric equations.
Hierarchical kinematics of an articulated human figure, computing simultaneous orbit and rotation purely through matrix algebra.