Connor Fitch and Taylor Meredith
Here is the final result
Our goal was to design a logo for the REU and build a code that could animate a random walk of scattered points that would converge to our logo design.
We start from a black and white image of our logo:
Each white pixel of the image is assigned a zero, while each black pixel is assigned a one. We want our animation to start from uniformly distributed black points, each following the path of a Markov chain that would bring all the points to the black pixel locations (i.e. our logo). Once the a point hits the logo, it says near it.
First we created a distance function d(x,y)
We then constructed a Markov chain based on the distance function. In this Markov chain, the probability of moving to a neighboring pixel location is biased towards the set of black pixels. The transition function is
p(x,y) = \frac{\displaystyle e^{- \beta d(x,y)}}{\displaystyle e^{- \beta d(x’+1,y’)}+e^{- \beta d(x’,y’+1)}+e^{- \beta d(x’-1,y’)}+e^{- \beta d(x’,y’-1)}}
where (x,y)
The value of \beta
The code was written in R and the animation was done with Plotly. Here is the raw animation:
For this logo animation, we took inspiration from Jan Krepl who built a similar animation for logos using a Markov Chain Monte Carlo method. You can check out the website here: https://jankrepl.github.io/creating-animations-with-MCMC/
Krepl designed his code to drop points over time, which is different from our code which starts with all the points scattered. Starting with this logo:
Finally, here is an implementation of Krepl’s code to our logo: