I am trying to make a sunflower. The seeds in a flower grow in a spiral. Whenever I add an array spiral and make it follow the curve, it doesn't seem to look quite right. This is because it doesn't follow a Fibonacci sequence. How can I fix this to look more like the real thing? How can I make my array follow a Fibonacci spiral without running into spacing issues?
My current pattern with the array modifier following the spiral curve:
The pattern I am trying to create:
Pasting the following code will create vertices in the distinct pattern, however it will not place any specific objects instead of those vertices. How would I go about modifying the script so it will place down an object instead of a vertex?
import bpy
import bmesh
import math
n = 1000 # number of points
c = 0.1 # scale factor
mesh = bpy.data.meshes.new(name="Spiral")
bm = bmesh.new()
for i in range(0, n):
theta = i * math.radians(137.5)
r = c * math.sqrt(i)
bm.verts.new((math.cos(theta) * r, math.sin(theta) * r, 0.0))
bm.to_mesh(mesh)
mesh.update()
from bpy_extras import object_utils
object_utils.object_data_add(bpy.context, mesh)