It’s the holiday season and many spiritual and cultural practices include trees in their Winter festivities. I’ve set up a traditional yuletide tree in my home in Second Life. However, here I cannot use a real tree but need to settle on a digital one. From a scientist’s point-of-view I wonder how one makes a digital tree. I suspect that mathematics are involved.

I am right… one can model nature using many mathematical methods. See Mandelbrot (1982) and Barnsley (2012). But which ones? How to model a leaf or a twig?

To find out more I consulted with Mitsuko Kytori, nature designer and Hiroshi Seoung, software engineer from Hayabusa Design. They specialize in designing 3D trees, plants and flowers for Second Life.

Beginning with the tree trunk, I asked Mitsuko about the mathematical methods used to model tree trunks, branches and roots.

“We use a classical B-Spline curve system which is able to map an infinity of points. We use the Akima Spline function too, as it is efficient and quick. There is an algorithm to add intermediate points to make the curve more random and more natural.”

Deepy is not a B-spline but she is wearing the Catty Romper from LUXE Paris Fashion House.

The first photo (going from right to left) shows a B-Spline, B-Spline with random points, B-Spline with natural points and B-Spline with both mixed.

“About branches, the system is the same. The branches can change the trunk curve with more or less intensity. In the examples, we did curves on one axis but of course that works in all axes.

Next, what about roots? She explained, “Trunk root flares are considered as trunk no more. We use surface displacement function a lot for this part. First, we assign a percent part on the trunk as root flares area and we use some displacement functions which are mainly fractals to generate noise on the surface. The “heart” of the system is a Brownian surface. This function can to be applied on all surfaces we use. If we need large deep roots like roots going on rock, we use simply ‘branches’.”

See photo two for a tree trunk with root flares at the bottom.

“About the Fibonacci sequence, we use his sequence in setting relationships between branches as it is the basis of the golden spiral (Shown in photo two). One of the reasons we use Finonacci spiral is because this spiral is a homothecy and so that helps a lot to avoid collision. It is more an algorithm which imitates and keeps as a goal the golden ratio. The algorithm uses a lot of parameters such as gravity, attraction, and horizontal tropism.

Now we know about the trunk and branches but what about leaves and flowers?

“Hyperbolic paraboloid is the core of our leaf generator and paraboloid of revolution for the trumpet of a flower mainly. We use Brownian surface too but it is mainly an after work as soon the leaf is modeled.”

Once a 2D surface is generated then it is the artist who draws the particular leaf, be it an oak or a maple. Also, a photo can be used. They are mapped to the 2D grid. See photo three for an example. The leaf on the left has had the Brownian function applied so it has a more random surface and edges than the other leaf.

“As we use hyperbolic paraboloid for leaves there are not a lot of parameters to make variations on the 3D shape, except leaf length/width ratio, curve and symmetry level. The rest is really a texture work.”

“Globally, we consider twigs as branches and petals as leaves. So there is no special function for flowers. Except the trumpet as we developed the paraboloid of surface specifically for trumpet design. Petals are clearly as leaves in our system. For pistils and stamens we use branches. The branch functions are extremely versatile and can be used even to design fruits.”

Fractals are associated with nature. I wondered how they fit in here.

“Fractals are mainly used to avoid repetition and to recreate the diversity of nature. It is mainly a pseudo random generator for curve deviation, surface of branches or leaves.”

“We don’t use a lot of Bezier curves, but mainly Akima curve function. We can say we have a special use of this function as the result of Akima function is under the constraint of Fibonacci sequence. I mean, it is almost impossible to generate something crazy, let’s say not natural. So, all the curves have natural angle and if we stay under some high values for parameters, we have the guarantee  of a good result.”

“We use Murray’s law a lot with some adaptations to phyllotaxy parameters, sky sensitivity, gravity and tropism. It is how we can, by setting parameters, create the main shape of a tree. And always because the use of Murray’s law and fractals we can create thousand of variations of the same species of tree. We can even use this system to generate trees of different ages, different weather, different seasons or different wind effects.”

Photo four shows a whole tree (minus leaves) illustrating the effect of Murray’s law.

After all of Mitsuko’s explanations, I was just amazed at how she and her programmer partner figured out their approach to creating natural objects. She gave me her perspective.

“We are a small team, mainly a computer scientist and a designer. We have external help for render engine. I guess we have original approach because representing nature in 3D can be handled by a lot of ways. The choice and the result were refined mainly by experimentation, and for sure, there were a lot of experiments with mathematical functions and algorithms (Even too much from my modest designer point of view). But, at the end it appeared obvious some solutions were better than others. So, step by step we found the good mix between mathematical functions, choice of variables for these functions, additional deformation functions which can be mathematical or pure algorithms and good artistic work with hands too.”

References

 
Visits:132

About Author

Avatar
Deepy (Deepthinker Oh) is an educational psychologist with a long standing love of journalism and previous experience as the editor of MANIERA magazine. Deepthinker Oh's use of the SLBN logo does not constitute approval by or a representation or endorsement from Linden Lab.

Leave Comment


Back to top