Sierpinski Gaskets continued...
So far we have
- the ability to manually create a Sierpinski gasket of arbitrary depth.
- we have built the visitor framework for natural numbers
Now we want to automate the building process to build a gasket of arbitrary
size:
- Write an natural number visitor NVisitor to make the n levels of growing:
- Base case: create a full-sized base case gasket.
- Inductive case: grow (once) the recursive result.
- Can we abstract this more --> searching for factories.
- Another way of doing all this? Functional style vs. object style.
Today's code: lec28.scm
Helper code: sierpinski.scm
©2002 Stephen Wong