• Remix
  • Share
  • New Entry

on 25 Oct 2022
  • 6
  • 93
  • 0
  • 0
  • 243
% Sunflower Seeds:
% Use fibonacci sequence on a linear scale to make small seeds in the middle
% and bigger seeds on the edge.
% n = 591 is the least spiky pattern where n > 500 and n < 1000
n=591;
o=1:n;
R=o.^2/n^2;
T=4/(1+sqrt(5))*pi*o;
% Create a triangulation in cartesian so we can compute a nice voronoi diagram.
[X,Y]=pol2cart(T,R);
DT=delaunayTriangulation([X;Y]');
[V,r]=voronoiDiagram(DT);
% Convert the vornoi faces into a patch face and colors
F=ones(n,7)*nan;
for q=o
F(q,1:numel(r{q}))=r{q};
end
% Draw
patch(FaceC='f',EdgeC='#070',Faces=F,Verti=V,FaceVertexC=sqrt(o)');
axis equal off
Image
Remix Tree