Monday, June 30, 2014

Day 30: Geometry is hard

Notebook

In order to create a field of equally spaced points to populate our 256x256x256 space, I'm going to work with
tetrahedrons. The code to generate a tetrahedron is below. After I figure out how to generate a field of these,
I can multiply that by the amygdala coordinates to get a subsample of equally spaced amygdala vertices.

In [1]:
%matplotlib inline
%load plot_tetrahedron.py
In [2]:
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

l = 2.

a = 0
b = l/2.
c = l*np.sqrt(3)/2.
d = l*np.sqrt(3)/6.

x = [a, b, l, a, b, b, l, b]
y = [a, c, a, a, d, c, a, d]
z = [a, a, a, a, c, a, a, c]

#ax = plt.axes()
ax = plt.axes(projection='3d')

ax.plot(x, y, z)



plt.show()