#%qtconsole
from IPython.core.display import HTML
def css_styling():
styles = open("styles/custom.css", "r").read()
return HTML(styles)
css_styling()
import json
s = json.load( open("styles/bmh_matplotlibrc.json") )
matplotlib.rcParams.update(s)
from __future__ import division
from matplotlib.lines import Line2D
from matplotlib.patches import Rectangle
def needle_gen(L=0.5):
'''Drops needle on unit square. Return dictionary describing needle position and
orientation. The `cut` key in the dictionary is True when the needle intersects
an edge of the unit square and is False otherwise.
L := length of needle (default = 0.5)
'''
assert 0