Creating a sphere using the points defined by Spherical Fibonacci Mapping. For the most part it is easy to "skin" by using two consecutive fibonacci numbers as steps to loop on the index. And get results similar to
Here is what I have so far
Edges made by stepping thru verts with 8th Fibonacci number 21 and 9th; 34.
The hassle comes around the poles, so I stopped short leaving a leaflike pattern hole.
The select verts in the image are those that have 3 faces and 4 edges.
verts = [ v for v in bm.verts
if len(v.link_faces) == 3
and len(v.link_edges) == 4]
For each of these verts there is a rip. (the two edges with only one face)
split_edges = [q for e in v.linked_edges
for q in e.verts
if len(q.linked_edges) == 2]
# sort by length
split_edges.sort(key=lambda a:-a.calc_length())
The desired result will close that split at the selected vert leaving a "T" 3 edge vert with the caveat of leaving the vertex in place. (As it is a member of SF space).
I was hoping to be able to swap the verts from one BMedge to another, but alas...
What other methods are available other than removing two edges adding one and a face?
The spherical fibonacci code can be found here https://gist.github.com/batFINGER/64db074e95b716f839a71882b7efcc50
The sample mesh in q can be generated using:
scene = context.scene
n = 1024
# create a point mesh
sfmesh = SFBMesh(n)
#sfmesh.edge()
# make mesh using 9th and 10th fibonacci numbers
k = 9
bm = sfmesh.bm
bm.verts.ensure_lookup_table()
for i in [k, k + 1]:
fib = F(i)
print("Fib number ", i, fib)
start = fib - F(i-2)
start = 2
edges = [bm.edges.new([bm.verts[i] for i in [k, (k + fib) % n]]) for k in range(start, n - fib - 2)]
#bmesh.ops.convex_hull(bm, input=verts)
bmesh.ops.contextual_create(bm, geom=bm.edges)
faces = [f for f in bm.faces if len(f.verts) > 4]
bmesh.ops.delete(bm, geom=faces, context=5)
meshdata = sfmesh.mesh
goldie = bpy.data.objects.new("SF", meshdata)
scene.objects.link(goldie)
scene.objects.active = goldie
goldie.select = True
sfmesh.edge()
gives a result something close-ish to (f). $\endgroup$