You should look at the Morph hierarchy. In the Pharo Collaborative and Pharo By Examples books there are chapters worth reading. You may also want to learn from DrGeo sour code but it is a hudge beast and probably not the easier path.
Hilaire -- Dr. Geo http://drgeo.eu
