Blog

Random Walking on the Surface of a T-Rex

This work is inspired by this video.

The surface distribution is defined by \[p(x) \propto \exp\left(-\frac{1}{10}d(x, \texttt{T-REX})\right),\] where \(d(x, \texttt{T-REX})\) is the Euclidean distance to the surface of the T-REX which is modelled by 1375 points which form 2598 triangles.

The distance is calculated by finding the closest point on each triangle \(\Delta\) by projecting \(x\) onto the plane of \(\Delta\) and then performing a coordinate transform on the basis given by two side vectors of \(\Delta\). The calculation is sped up by only calculating the distance to the 25 closest triangles.

The random walk is obtained by running the Metropolis-Hastings algorithm for one million iterations.

Blog