Announcement Announcement Module
Collapse
No announcement yet.
Archimedean spirals! Page Title Module
Move Remove Collapse
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Archimedean spirals!

    #1
    I'm looking to create a vector archmidean spiral
    http://en.wikipedia.org/wiki/Archimedean_spiral with 50 to 200 rings. Using the spiral tool in Illustrator, I'm able to get very close to an archmidean spiral using 99.9, or 100.1 decay, which would be close enough, but center of the spiral does not close up.

    Any recommendations on creating one? Or know of a source of one that has already been created?

    Thanks
    Last edited by tanstaafl; 05-22-2007, 09:34 PM. Reason: clarified post

  • #2
    tooo....much.....math.....head.....ex.....ploding

    Comment


    • #3
      The train from Chicago will arrive first.

      Comment


      • #4
        Glossing over all the math, it's basically a spiral where all rings are a set distance from the previous ring.

        Comment


        • #5
          I don't think the illustrator tools can produce a true Archimedean Spiral. If you knew SVG or Postcript, you might be able to write a script to produce one and import it into Illustrator.

          For example, Wikipedia has an SVG version: http://commons.wikimedia.org/wiki/Im...ean_spiral.svg (though the license probably means it's no use to you. Also, if it's not exactly how you want, the maths involved means it would be hard to change).

          If the method you described is producing a spiral that is good enough for your purposes, then to get it to meet in the middle, you need to increase the number of segments.

          Another alternative is the postscript code on this page:

          http://en.wikipedia.org/wiki/Image:T...ral-Symbol.svg

          If you copy that into your favourite text editor, and then save it as a .ps file, you can also open it in illustrator. It's probably more useful than the SVG version, and is public domain, which means you can use it for whatever you want.

          Comment


          • #6
            How'd you get so smart Hewligan? I like your brain.

            Comment


            • #7
              I got a degree or two in physics. That tends to require learning some maths.

              Here, I modified that .ps code to only produce one spiral:

              Code:
              %%!
              /archimdouble{
              %%%%%%%%%%%%%%%%
              % PostScript program to display an Archimedean spiral by approximating
              % it with Bezier curves.  Can display a double spiral (two spirals
              % rotated by 180 degrees with respect to each other).
              %%%  Parameters:
                               % centerx = horizontal coordinate of center of spiral
                               % centery = vertical coordinate of center of spiral
                               % rotf = degrees to rotate
              /sepwid 100 def  % width separating successive turnings of spiral
                               % (half this if double spiral is selected)
              /incrm 5 def    % insert a curve point after this number of degrees
              /sweeps 6 def    % number of 360 degree turnings to show
              /double 0 def    % change to 0 to display single spiral
              /linew 5 def % increase number for thicker line
              %%%  Procedures:
              /pi 3.1415926535898 def/radians 57.295779513082 def
              /sepwid sepwid pi div 2 div def
              gsave centerx centery translate rotf rotate linew setlinewidth
              /aspiral{/prevbezy 0 def 0 0 moveto
                  0 incrm sweeps 360 mul{7{dup}repeat
                      phase add cos/costh exch def
                      phase add sin/sinth exch def
                      costh mul radians div/thcosth exch def
                      sinth mul radians div/thsinth exch def
                      thcosth sepwid mul/x exch def
                      thsinth sepwid mul/y exch def
                      /slope sinth thcosth add costh thsinth sub div def
                      sinth 0 gt sinth 0 eq costh -1 eq and or{/flag -1 def}{/flag 1
                          def}ifelse
                      /A exch def A 49.29348 lt A 180 gt A 196.273450852 lt and A 360
                          gt A 368.8301 lt and A 540 gt A 545.9907 lt and A 720 gt A
                          724.5217 lt and A 900 gt A 903.6281968 lt and or or or or
                          or{/flag flag neg def}if
                      incrm sub 3{dup}repeat phase add cos sepwid mul mul radians div
                          /prevx exch def phase add sin sepwid mul mul radians div
                          /prevy exch def
                      incrm add 3{dup}repeat phase add cos sepwid mul mul radians div
                          /nextx exch def phase add sin sepwid mul mul radians div
                          /nexty exch def
                      /prevdist x prevx sub dup mul y prevy sub dup mul add sqrt pi
                          div def
                      /nextdist x nextx sub dup mul y nexty sub dup mul add sqrt pi
                          div def
                      /normaliz slope slope mul 1 add sqrt def
                      0 eq{/prevbezx phase cos nextdist mul def}{prevbezx prevbezy
                      x 1 flag mul normaliz div prevdist mul sub y slope flag mul
                          normaliz div prevdist mul sub
                      x y curveto
                      /prevbezx x 1 flag mul normaliz div nextdist mul add def
                      /prevbezy y slope flag mul normaliz div nextdist mul add def}
                      ifelse}
                  for stroke}def
              /phase 0 def aspiral
              %%% If different sweeps parameter for second spiral, define here:
              /sweeps 2.67 def
              %%%
              double 0 ne{/phase 180 def aspiral}if grestore
              %%%%%%%%%%%%%%%%
              }def
              gsave
              -9 0 translate
              .4875 dup scale %%% decrease to .47 to fit on A4-size page
              -2 rotate
              /centerx 304 def/centery 550 def/rotf 0 def archimdouble
              
              grestore
              showpage
              %%EOF
              Near the top you'll find the line

              /sweeps 6 def

              This changes the number of times it goes around, so set this to whatever you like.

              The line

              /incrm 5 def

              Controls the number of points it's creating. The lower the number, the more points. So use something low if it looks lumpy, and use something high if your computer slows to a crawl. Should probably be a factor of 360, but I'm not sure if it has to be.

              /linew 5 def controls the stroke width. Probably best to just leave it alone, and change the stroke width to whatever you want in Illy.

              Comment


              • #8
                jesus hewligan, that is mighty impressive

                Comment


                • #9
                  Hewligan .. my head is spinning now ... you rock!

                  Comment


                  • #10
                    ^^^very cool^^^

                    Comment


                    • #11
                      Um... wow.

                      Comment


                      • #12
                        Honestly, it's not as impressive as y'all think.

                        I just took the public domain script I linked above from wikipedia and modified it. It's not like I even know postscript - it's just that once you've learnt a few programming languages, you can pretty well read them all.

                        Well, except Brain****. No one understands that one.

                        Comment


                        • #13
                          I'm going to eat Hewligans brains when he's not looking so I become smart like him.

                          Comment


                          • #14
                            lmaooo Buda

                            ... again with the food!! lol

                            Comment


                            • #15
                              Originally posted by budafist
                              I'm going to eat Hewligans brains when he's not looking so I become smart like him.
                              Sylar? Is that you?

                              Comment

                              Google search Google search Module
                              Collapse
                              Latest Topics Latest Topics Module
                              Collapse
                              All Creative World Network All Creative World Network Module
                              Collapse
                               
                              home | site map | advertising/sponsorships | about us | careers | contact us | help courses | browse jobs | freelancers | events | forums | content | member benefits | reprints & permissions about | terms of use | privacy policy | Copyright © 2013 Mediabistro Inc. Mediabistro Inc. call (212) 389-2000 or email us
                              Working...
                              X