Close

Generating 3D Models

A project log for PHYLLO

Or how to create animated flowers with LED and 3D-printing

alexisAlexis 12/10/2019 at 00:370 Comments

TL;DR

Why 3D Models ?

When we first started thinking about the project, we quickly realized we would need to generate 3D models of the sculpture ourselves.

First because we need to have full control on the model, to try various configurations for the future 3D printed sculpture. And second because it will greatly help us visualize all the kinds of animations we are imagining.

Accordingly, Vlaya wrote a script using the blender python API to generate a 3D model, following John Edmark's online explanation.

Phyllotactic Patterns on a Sphere

We place the first point on the "equator". Then to place each following point, we rotate 137.5° and move a little closer to the top of the sphere.

The big question is : how much closer is "a little closer to the top of the sphere" ?

137.5° is the golden angle, derived from the golden ratio. It has the nice mathematical property of being as hard as possible to approximate with rational numbers. This allows it to waste as little space as possible, which is why plants use it. And it looks nicer. You can try the simulation on this page to get a better grasp of this.

A First Attempt

The first thing we tried was to actually place the points on a cylinder, rotating them 137.5° and going up by a fixed amount each time, and then projecting those points onto the sphere :

Projection from the cylinder onto the sphere
The projected points
Connecting the dots

But we soon noticed an annoying discrepancy between what we got, and what John Edmark's Blooms look like :

A Bloom by John Edmark on the left, our attempt on the right

Our petals get more and more squashed as we near the center.

A consequence of that is, if we follow a spiral from the center outwards, at some point we'll realise that what we're following isn't a spiral anymore.

All this doesn't happen with John Edmark's Bloom.

Follow a clockwise spiral from the center outwards and see what happens

The same thing actually happens in sunflowers:

Spirals "breaking up" in a sunflower

But in our case, it happens because the points step too slowly towards the center, whereas in a sunflower, they step too fast.

This paper on phyllotactic spirals gives a good explanation.

A Better Solution

Let's formalise things a bit:

Spherical coordinates

A point on the sphere can be located by two arcs of a circle : parallel arcs ("horizontal") and meridian arcs ("vertical"). To rephrase the previous explanation, we place each following point by moving along a parallel for 137.5°, and then moving up along a meridian for some arc length.

A face formed by intersecting spirals

As we get closer to the top, the parallel arcs of circle become smaller.

The meridian arcs also need to get smaller, otherwise we would overshoot the top.

We want the meridian arc lengths to decrease so that the faces keep roughly the same square shape.
To do that, they need to decrease at the same rate as the parallel arc lengths, to remain in proportion.

A bit of geometry yields this differential equation, where a(x) is the "vertical" angle between point x and the horizontal plane, and k is a coefficient:

a'(x) = k cos(a(x))
a(0) = 0

The solution is:

a(x) = Arctan(sinh(kx))

We had to tweak the value of k a little bit to get nice results.

Here's what it looks like:

3D rendering of our latest design

Flat Circular Phyllotactic Patterns

We can do the same thing with flat circular patterns : place each following point by rotating 137° and moving closer to the center. The question is still "how much closer ?" and the geometry is merely a bit different.

We get this differential equation, where r(x) is the distance of point x from the center, k is a coefficient and R is the radius of the circle:

r'(x) = - k r(x) r(0) = R

The solution is:

r(x) = R exp(-kx)

This gives us flat patterns like that:

Flat phyllotactic pattern

Stay tuned for upcoming 3D animations !

Discussions