Drawing Graftals:

Let's say you want to draw a tree-leaf graftal at point P on the surface of a sphere. How do we do this? Our final graftal is going to point in the direction of the surface normal, and look like the blue triangle in the left image. We'll need a couple of things first: The normal of the surface at P, and the direction of the view vector from the camera to P.

If we cross the normal with the view vector, we get a vector (which we'll call C) that points "off to the side", relative to the direction of the normal. We can decide how wide the base of the graftal will be (we'll call it GRAF_WIDTH), and find the point that is GRAF_WIDTH units away from P in the direction of C. We also find the symetric point that is GRAF_WIDTH units away in the -C direction. Then we decide how long the graftal will be, and call that number GRAF_LENGTH. Then we find the point that is GRAF_LENGTH units away in the direction of the surface normal. Since we now have three points, we can draw our triangle. For the final image, I tried to approximate the "Dr. Seuss"-like feel of the Brown University images by rotating the third point a small angle around the view vector, giving the leaves a small clock-wise curl.

Just before drawing the graftal, we perform one last check. We compute the dot product of the surface normal and the view vector, which indicates the orientation of the surface as viewed by the camera. Depending on the value of the dot product, we may render the graftal in different ways. For example, for small products (-1.20 < dot < 0), we render a filled triangle, with an outline. For mid-level products (-1.66 < dot < -1.28), we render a single line, equivalent to a GRAF_WIDTH of zero. For larger products (-2.34 < dot < -1.70), we render just the outline. Notice, that since we are drawing the graftals in order of desire, with the greatest desire on the outside of the sphere, the graftals automatically layer themselves in a visually pleasing manner.

Starting with this approach, it would be simple to create "puffy cloud" textures, fur, grass, and virtually any type of leaf. For example, a palm tree leaf could be represented with a large GRAF_LENGTH value, and small GRAF_WIDTH, yielding long, pointing palm fronds. A more complex maple leaf would require several more points, but since the surface normal at P and C define a convenient coordinate frame for the graftal, it would be a simple matter to convert a 2-D, hand-drawn maple leaf to a polygonal graftal similar to our triangle.

The same tree, rendered with a larget GRAF_LENGTH and smaller GRAF_WIDTH. This makes the leaves longer and thinner, resembling something more like a palmtree or cactus.