I have a thing Lotus-like flower on Thingiverse. It's not a Lotus, only looks like a lotus.

It's created by programming so you can tell it the number of petals. It doesn't look like a lotus if you give it fewer petals.

The golden spiral appears in petals settings. That's why it looks like a flower. The golden spiral may be drawn from a golden rectangle. The golden rectangle may be composed of a tiling with squares whose side lengths are successive Fibonacci numbers. I've talked about the Fibonacci numbers in my document Golden spiral.

# More golden spirals

In Golden spiral, I introduced you to how to create a golden spiral. How about creating more golden spirals and rotating them a particular angle?

```
spirals = 5;
function fibonacci(nth) =
nth == 0 || nth == 1 ? nth : (
fibonacci(nth - 1) + fibonacci(nth - 2)
);
module sector(radius, angles, fn = 24) {
r = radius / cos(180 / fn);
step = -360 / fn;
points = concat([[0, 0]],
[for(a = [angles[0] : step : angles[1] - 360])
[r * cos(a), r * sin(a)]
],
[[r * cos(angles[1]), r * sin(angles[1])]]
);
difference() {
circle(radius, $fn = fn);
polygon(points);
}
}
module arc(radius, angles, width = 1, fn = 24) {
difference() {
sector(radius + width, angles, fn);
sector(radius, angles, fn);
}
}
module golden_spiral(from, to, thickness) {
if(from <= to) {
f1 = fibonacci(from);
f2 = fibonacci(from + 1);
arc(f1, [0, 90], thickness, 48);
offset = f2 - f1;
translate([0, -offset, 0]) rotate(90)
golden_spiral(from + 1, to, thickness);
}
}
linear_extrude(1) for(a = [0 : 360 / spirals : 360 - 360 / spirals]) {
rotate(a) golden_spiral(1, 6, 0.5);
}
/*
mirror([0, 1, 0]) linear_extrude(1) for(a = [0 : 360 / spirals : 360 - 360 / spirals]) {
rotate(a) golden_spiral(1, 6, 0.5);
}
*/
```

When generating five golden spirals and rotating each of them 72 degrees, you'll get the following model.

If you disable the comment in the code, it will generate the other five clockwise spirals that intersect with the original spirals.

If you google search “Fibonacci nature” on images.google.com, you will find pictures with similar arrangements, such as the Fibonacci sequences of sunflower.

# Adding petals

Now, let's focus on one spiral. If we place petals on the path of the spiral, what will happen? For simplification, here we only use diamonds, that is `scale([2, 1, 1]) circle(r, $fn = 4)`

, as petals. Our `golden_spiral`

module is modified as below.

```
// omitted...the same as before...
module golden_spiral(from, to, thickness) {
if(from <= to) {
f1 = fibonacci(from);
f2 = fibonacci(from + 1);
offset = f2 - f1;
linear_extrude(thickness, center = true)
scale([2, 1, 1]) circle(offset / 5, $fn = 4);
translate([0, -offset, 0]) rotate(90)
golden_spiral(from + 1, to, thickness);
}
}
golden_spiral(5, 10, 1);
```

We define that the radius required by the `circle`

module is the difference of two successive Fibonacci numbers so the petals will grow from small to big.

Umm, it doesn't look like a flow. Now we increase it to four spirals.

```
spirals = 4;
// omitted...the same as before...
module golden_spiral(from, to, thickness) {
if(from <= to) {
f1 = fibonacci(from);
f2 = fibonacci(from + 1);
offset = f2 - f1;
linear_extrude(thickness, center = true)
scale([2, 1, 1]) circle(offset / 5, $fn = 4);
translate([0, -offset, 0]) rotate(90)
golden_spiral(from + 1, to, thickness);
}
}
for(a = [0 : 360 / spirals : 360 - 360 / spirals]) {
rotate(a) golden_spiral(5, 10, 1);
}
```

We have the model below.

It seems a little close to what we want; however, every petal lays on the plane. Now, make all petals stand up. We need to rotate them.

```
// omitted...the same as before...
module golden_spiral(from, to, thickness) {
if(from <= to) {
f1 = fibonacci(from);
f2 = fibonacci(from + 1);
offset = f2 - f1;
rotate([0, 30, 0]) linear_extrude(thickness, center = true)
scale([2, 1, 1]) circle(offset / 5, $fn = 4);
translate([0, -offset, 0]) rotate(90)
golden_spiral(from + 1, to, thickness);
}
}
// omitted...the same as before...
```

How about it?

More like, however, still too sparse. Try to `translate`

petals and see how about it.

```
// omitted...the same as before...
module golden_spiral(from, to, thickness) {
if(from <= to) {
f1 = fibonacci(from);
f2 = fibonacci(from + 1);
offset = f2 - f1;
translate([5, 0, 0]) rotate([10, 30, 0])
linear_extrude(thickness, center = true)
scale([2, 1, 1]) circle(offset / 5, $fn = 4);
translate([0, -offset, 0]) rotate(90)
golden_spiral(from + 1, to, thickness);
}
}
// omitted...the same as before...
```

It seems closer to the target.

Then, increase the `spirals`

value to 8, and change the name `golden_spiral`

to `golden_petals`

.

```
spirals = 8;
function fibonacci(nth) =
nth == 0 || nth == 1 ? nth : (
fibonacci(nth - 1) + fibonacci(nth - 2)
);
module sector(radius, angles, fn = 24) {
r = radius / cos(180 / fn);
step = -360 / fn;
points = concat([[0, 0]],
[for(a = [angles[0] : step : angles[1] - 360])
[r * cos(a), r * sin(a)]
],
[[r * cos(angles[1]), r * sin(angles[1])]]
);
difference() {
circle(radius, $fn = fn);
polygon(points);
}
}
module arc(radius, angles, width = 1, fn = 24) {
difference() {
sector(radius + width, angles, fn);
sector(radius, angles, fn);
}
}
module golden_petals(from, to, thickness) {
if(from <= to) {
f1 = fibonacci(from);
f2 = fibonacci(from + 1);
offset = f2 - f1;
translate([5, 0, 0]) rotate([10, 30, 0])
linear_extrude(thickness, center = true)
scale([2, 1, 1]) circle(offset / 5, $fn = 4);
translate([0, -offset, 0]) rotate(90)
golden_petals(from + 1, to, thickness);
}
}
for(a = [0 : 360 / spirals : 360 - 360 / spirals]) {
rotate(a) golden_petals(5, 10, 1);
}
```

It looks like a lotus now.

The above process also explains how some flowers arrange their petals. I use diamonds here for simplification. The real petals have curved surface. So how to create such kind of petals? You may take a look at the source code of Lotus-like flower, which uses a simple way to create the petal with a curved surface.