Change implicit function with distance function. Rewrite intersection method to use sphere tracin algorithm for distance functions. Add built in implementtions for sqrt derivatives.