# -*- coding: utf-8 -*-
#draws a random distribution of axis ratios.

import numpy as np
import matplotlib.pyplot as plt

def rands():
	rand = np.random.random_sample(2) #randomly generated set of 2 projections
	minAngle = min(rand) #we ensure that the smaller axis gets divided by the larger
	maxAngle = max(rand)
	return (minAngle/maxAngle) 

n = 10000
inclinations = np.empty((n, 1))
for i in range(0, n):
	inclinations[i] = rands()
plt.hist(inclinations, 10, normed=False, histtype='stepfilled')
#plt.savefig('axis_ratios')
plt.show()
