Generates the convex hull of 2-dimensional Brownian motion. Running convex_hull_2d_bm.py
will generate a plot like the one below.
Fun fact: the boundary of the convex hull of a Brownian motion in the plane after any finite amount of time is almost surely
Running ch2dbm_anim.py
will generate a similar plot to above but will also save the animation conv.mp4
to the same folder as the file is run; this video will show the running process and convex hull, similar to below. It will take longer to run, due to each frame needing to be plotted and saved, so reserve around 10 minutes for the video to be produced. A prerequisite for this is FFmpeg, which is a video saving/conversion tool, and can be found here.
conv.mp4
Running 2d_perim_distn.py
will generate a plot of the perimeter distribution (in blue) and area distribution (in red) of the convex hull. By default, the plots will show Monte Carlo'd distributions over 50 000 samples.
The distribution of this over time is not included, as due to scaling properties of Brownian motion, the distributions of perimeter and area over time are just rescaled versions of each other.
Other properties can be explored in the console after running this. For example:
x0 = T / tSteps
x = np.linspace(x0, T, tSteps)
y = np.zeros(tSteps)
for i in range(tSteps):
y[i] = np.var(A[i])
plt.plot(x, y)
will plot the variance of the area over time.
The distributions of perimeter and area of the convex hull of planar Brownian motion is an open problem. One observation is that log(perim) and log(area) appear symmetric and look bell shaped, but are not Gaussian. The means and variances are however known, even with drift. Namely, if
Stepping up to higher dimensions, running convex_hull_3d_bm.py
will generate a plot like the one below.
And running ch3dbm_anim.py
will generate something like the animation below, saving conv3.mp4
, also requiring FFmpeg. This, the way I've implemented it, seems to take much longer to produce.