Skip to main content
Kris Hunt
Legend
December 23, 2013
Question

Sunflower dot pattern

  • December 23, 2013
  • 12 replies
  • 31739 views

Anyone know how to go about creating a mathematically precise sunflower pattern of dots in Illustrator? It looks like the basic idea is to create a spiral arm of dots and then rotate copies around a central point, but I'm not sure how far apart to space the dots and how much to rotate each arm to make the dots equally spaced.

    This topic has been closed for replies.

    12 replies

    S_Sanchez
    Participant
    May 16, 2019

    Hi everyone,

    I have read through all of your suggestions to Kris' question on how to create a sunflower dot pattern. And they appear to be exceedingly more complex to create for what I thought would be a simple pattern. I too would like to know how to create a sunflower pattern in Illustrator, but with all of the dots being the same size -(SEE BLK/WHT EXAMPLE BELOW). I have created some nice dotted radial patterns with the transform tool, but the dots get smaller in size as they move to the center (ATTACHED COLOR EXAMPLE BELOW). Can someone suggest a way to create this pattern in Illustrator/photoshop using the existing tools and effects that come with the software? I am not an advanced user with these tools and I really dont want to purchase any plug ins or use any other software packages that I am not familiar with to do this.

    Thanks,

    Sharon

    Monika Gause
    Community Expert
    Community Expert
    May 16, 2019

    You can expand the effect and then use the script "Set all the things" to equalize the size.

    www.wundes.com has the script.

    fruityth1ng
    Inspiring
    April 24, 2015

    I compiled some math lying around on the web with these amazing scripts and puzzled a version together that also rotates the object in question.

    I'm confident someone can shave multiple lines off the script, but for now this works for me:

    [code]

    var docSel=app.activeDocument;

    var docSelSel=app.activeDocument.selection[0];

    //translate([deltaX],[deltaY]);

    selhorcent = docSelSel.left + (0.5*docSelSel.width);

    selvercent = docSelSel.top - (0.5*docSelSel.height);

    var scalex = 100;

    var scaley = 100;

    scalefactor = 1.02;

    for (var i=1; i<600;i++)

    {

        var r=10*Math.sqrt(i);

        var t=137.5*Math.PI/180*i;

        var newSel=docSelSel.duplicate(docSelSel);

        newSel.translate(r*Math.cos(t),r*Math.sin(t));

        newselhorcent = newSel.left + (0.5*newSel.width);

        newselvercent = newSel.top - (0.5*newSel.height);

    var p1 = {

      x: newselhorcent,

      y: newselvercent

        };

    var p2 = {

      x: selhorcent,

      y: selvercent

        };

    // angle in radians

    var angleRadians = Math.atan2(p2.y - p1.y, p2.x - p1.x);

    // angle in degrees

    var angleDeg = Math.atan2(p2.y - p1.y, p2.x - p1.x) / Math.PI * 180;

    //assuming top-pointing "seed"

    newSel.rotate(angleDeg-90);

    //newSel.resize(scalex,scaley);

    //scalex = scalex * scalefactor;

    //scaley = scaley * scalefactor;

    }

    docSelSel.remove();

    [/code]

    markerline
    Inspiring
    April 24, 2015

    That's great that you were able to spin each individual leaf automatically with the script!  It's nice how we can build off one another's contributions (and for the most part I am only a partial contributor in these forums.  I have many times received more help than given it but I hope one day I can give more than I receive.)

    Wunderbar!

    herman@squla.com
    Participant
    May 11, 2015

    Thank you

    I forgot to mention that I would have just went with the other scripts listed here, were it not for their use of scaling to make the next copy not overlap.

    So to clarify: my script does not (natively) scale up the outer copies.

    It's possible, though, by just uncommenting the scale lines.

    markerline
    Inspiring
    January 4, 2014

    The code I posted produces a sunflower in the following way:

    1.  Create a small square using the Rectangle tool

    2.  Open the Script (.js or .jsx extension) that contains the script above and run it.

    3.  You get the resultant picture

    I was able to get this result with a little knowledge of ActionScript and refactoring the code to JavaScript using the JavaScript for Illustrator Reference Manual that is available online.  It was tested using CS6 but I think it will work in CC as well.

    Thanks for the formula greyleaf!

    Monika Gause
    Community Expert
    Community Expert
    January 4, 2014

    It was tested using CS6 but I think it will work in CC as well.

    Works in CC as well. Also works with round dots. Thanks a lot!

    markerline
    Inspiring
    January 4, 2014

    i am no hero in this post.  i just got lucky that greyleaf posted code that i could interpret.  but i am happy that you are able to use it too, Monika.

    markerline
    Inspiring
    January 4, 2014

    Some Code for you (Javascript for Illustrator)

    var docSel=app.activeDocument;

    var docSelSel=app.activeDocument.selection[0];

    //translate([deltaX],[deltaY]);

    for (var i=1; i<400;i++)

    {

            var r=10*Math.sqrt(i);

            var t=137.5*Math.PI/180*i;

            var newSel=docSelSel.duplicate(docSelSel);

            newSel.translate(r*Math.cos(t),r*Math.sin(t));

           

    }

    docSelSel.remove();

    Grant H
    Community Expert
    Community Expert
    December 31, 2013

    you cant just create a spiral (using the illy spiral tool) as your starting point. you need to create an arithmetic spiral (archimedean spiral)...

    here is a quick example, with a brush (dot) ... obviously you can perfect the settings to suit>

    Kris Hunt
    Kris HuntAuthor
    Legend
    December 31, 2013

    Lots of great resources! Grant, how did you go about creating your Archimedean spiral?

    Grant H
    Community Expert
    Community Expert
    December 31, 2013

    i used the polar grid tool with no radial deviders set in options. and 20 concentric deviders.

    then I cut the bottom half, pasted in front selected all, ungrouped everything. selected the bottom half moved one ring increment to the right, selected the segments of the first spiral, joined. did the same with the other.

    /G

    December 31, 2013

    you can try this and this

    http://mathematica.stackexchange.com/questions/20924/spiral-pattern-and-fibonacci-numbers

    and

    function phylo ( N:float,k:int):Vector3{

              //N=numpts  k=currentpt

        var inc =  Mathf.PI  * ( 3 - Mathf.Sqrt ( 5 ) );

        var off = 2 / N;

              var y = k * off - 1 + (off / 2);

              var r = Mathf.Sqrt (Mathf.Abs(y))  ;

              var phi = k * inc;

              return Vector3(Mathf.Cos(phi)*r*10, 0, Mathf.Sin(phi)*r*10);

    };

    i only do the look upt till N/2in the above formula i use N/

    this is perhaps even better:

    function sflo ( N:float,k:int):Vector3{

    var n = k;

    var r=Mathf.Sqrt (n);

    var t=137.5*pi/180*n;

    return Vector3(r*Mathf.Cos(t),0, r*Mathf.Sin(t));

    }

    Participant
    July 30, 2019

    how do you apply that on illustrator?

    John Mensinger
    Community Expert
    Community Expert
    July 30, 2019

    Follow the steps in post #54.

    TREX8905603
    Participating Frequently
    December 24, 2013

    Hello Kris...almost like the other comments but a little different.

    Here’s another way

    Create a circle, stroke with no fill

    Use the type on path tool

    Use font dingbats, weddings etc, to select a box shape and copy and

    paste that shape around the circle, but add a space between the shape/font.

    Type to ‘Create Outlines’

    Delete part of the boxes you do to need, so you get an Arc of boxes

    Then divide 360 by the amount of copies of lines/arc you need e.g. 360 divided by 60 equals 6

    you may need to experiment to the desired size/fit

    Then copy and paste the arc/line around a centred point 60 times

    TREX

    markerline
    Inspiring
    December 24, 2013

    Here's a second attempt, this time using an Arc instead of a Spiral.  The problem I seem to be having is near the origin where items are bunched together as opposed to evenly-spread-out.

    Monika Gause
    Community Expert
    Community Expert
    December 23, 2013

    This is in German, but the screenshot says it.

    http://illustrator.hilfdirselbst.ch/dokuwiki/tutorials/tipps_tricks/florales_muster_mit_dem_transformationseffekt

    It's Effect > Distort and Transform > Transform

    markerline
    Inspiring
    December 24, 2013

    Monika, your method may solve the problem I'm having with the origin.  However I notice a very apparent linear pattern radiating from the center, which is not what the floral pattern does in reality or according to the mathematical depiction that Jacob pointed out in the wiki article.

    markerline
    Inspiring
    December 23, 2013

    That's the image I was trying to create Jacob.  I've done it in Flash before (somewhat closely anyway) But never Illy.

    Here's a poor representation of the steps I took listed in my list above.  Note:  The brush I used was a Pattern Brush, not an Art Brush.