Scale each petal arc directly with the continuity control

This commit is contained in:
2026-12-06 04:16:34 +08:00
parent 110fe7f12b
commit 724f176228
2 changed files with 3 additions and 3 deletions
+3 -3
View File
@@ -72,9 +72,9 @@ def face(d, x, y, z, palette):
# still leave a legible opening between neighbouring lobes. # still leave a legible opening between neighbouring lobes.
half_span = min(np.pi/2, np.pi/d.faces) half_span = min(np.pi/2, np.pi/d.faces)
depth = (1-np.cos(half_span))*d.width depth = (1-np.cos(half_span))*d.width
taper = coverage(delta*min(d.faces,4)/2, d.continuity) local = np.clip(delta/max(d.continuity,1e-8), -np.pi, np.pi)
folded = radius*(np.cos(delta)+np.sin(angle)*1.45*z*np.sin(delta)) folded = radius*(np.cos(local)+np.sin(angle)*1.45*z*np.sin(local))
score = np.where(taper > 0, folded-1+depth*taper, -np.inf) score = folded-1+depth
active = score > best active = score > best
index = np.where(active,sector,index) index = np.where(active,sector,index)
along = np.where(active,np.sin(delta),along) along = np.where(active,np.sin(delta),along)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 103 KiB