Implicit surfaces are defined by a real valued function. They can easily be defined and manipulated and have therefore gained
great popularity in computer graphics. This paper presents a purely functional implementation of a well known algorithm to
polygonize implicit surfaces, based on spatial partitioning by means of octrees. While conventional implementations are laden
with practical issues, our implementation in Clean is straightforward, implements the algorithm very concisely and makes essential
use of lazy evaluation.
Further we present two enhancements to this basic algorithm: Introducing a memo function greatly improves time efficiency.
The appearance of a visualized implicit surface can be greatly enhanced by providing normal vector information. For calculating
normal vectors we adopt a lazy implementation of automatic differentiation.