update geometry.py for python 3 compatibility
update examples