File:Seven-sixfold-spirals-stroked.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(SVG file, nominally 662 × 600 pixels, file size: 16 KB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary[edit]

Description Seven connected Archimedean six-fold spirals (stroked version)
Date
Source

Converted from the following self-authored PostScript vector source 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 110 def  % width separating successive turnings of spiral
                 % (half this if double spiral is selected)
/incrm 30 def    % insert a curve point after this number of degrees
% /sweeps        % number of 360 degree turnings to show
/double 1 def    % change to 0 to display single spiral
/triple 1 def    % change to 0 to for non-triple inner spiral
%%%  Procedures:
/pi 3.1415926535898 def/radians 57.295779513082 def
/sepwid sepwid pi div 2 div def
gsave centerx centery translate rotf rotate
/aspiral{/first 1 def
    lower incrm sweeps 360 mul{8{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
        0 eq phase 90 eq phase 270 eq or and{/slope 999999999 def}{/slope
        sinth thcosth add costh thsinth sub div def}ifelse
        sinth 0 gt sinth 0 eq costh -1 eq and or{/flag -1 def}{/flag 1
            def}ifelse
        /A exch def phase 0 eq phase 180 eq or {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}if
            phase 120 eq phase 300 eq or{A 10 lt A 80 gt A 100 lt and
            or{/flag flag neg def}if}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{0 0 moveto/prevbezx phase cos nextdist mul def/prevbezy
            phase sin nextdist mul def/first 0 def}{first 1 eq{x y
            moveto/first 0 def}{prevbezx prevbezy x 1 flag mul
            normaliz div prevdist mul sub y slope flag mul normaliz
            div prevdist mul sub x y curveto}ifelse
        /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
%%% If different sweeps parameter for other spirals, define here:
X grestore
%%%%%%%%%%%%%%%%
}def
.8 dup scale
%-4.12 rotate
%-382.5 -495 translate
9.16666667 setlinewidth
/X{
/sweeps 1.26 def/phase 0 def aspiral
double 0 ne{/sweeps 1.09 def/phase 180 def aspiral}if
triple 0 ne{/sweeps 1.26 def/phase 120 def aspiral
double 0 ne{/sweeps 1.09 def/phase 300 def aspiral}if
            /sweeps 1.26 def/phase 240 def aspiral
double 0 ne{/sweeps 1.09 def/phase 60 def aspiral}if} if}def
/lower 0 def
/centerx 382.5 def/centery 495 def/rotf 0 def
archimdouble
/centerx 382.5 def/centery 495 def/rotf 60 def
archimdouble
/X{
/sweeps 1.1 def/phase 0 def aspiral
double 0 ne{/sweeps 1.29 def/phase 180 def aspiral}if
triple 0 ne{/sweeps 1.45 def/phase 120 def aspiral
double 0 ne{/sweeps 1.09 def/phase 300 def aspiral}if
            /sweeps 1.26 def/phase 240 def aspiral
double 0 ne{/sweeps .95 def/phase 60 def aspiral}if} if}def
/centerx 382.5 def/centery 751.667 def/rotf 300 def
archimdouble
/centerx 160.219858 def/centery 366.666 def/rotf 60 def
archimdouble
/centerx 604.780142 def/centery 366.666 def/rotf 180 def
archimdouble
/X{
/sweeps 1.26 def/phase 0 def aspiral
double 0 ne{/sweeps .95 def/phase 180 def aspiral}if
triple 0 ne{/sweeps 1.1 def/phase 120 def aspiral
double 0 ne{/sweeps 1.29 def/phase 300 def aspiral}if
            /sweeps 1.45 def/phase 240 def aspiral
double 0 ne{/sweeps 1.09 def/phase 60 def aspiral}if} if}def

/centerx 382.5 def/centery 238.333 def/rotf 0 def
archimdouble
/centerx 160.219858 def/centery 623.334 def/rotf 240 def
archimdouble
/centerx 604.780142 def/centery 623.334 def/rotf 120 def
archimdouble
showpage
%EOF
Author AnonMoos
Permission
(Reusing this file)
Public domain I, the copyright holder of this work, release this work into the public domain. This applies worldwide.
In some countries this may not be legally possible; if so:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.
Other versions

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current01:26, 5 September 2022Thumbnail for version as of 01:26, 5 September 2022662 × 600 (16 KB)Smasongarrison (talk | contribs)slimmed down with svgomg // Editing SVG source code using c:User:Rillke/SVGedit.js
22:51, 10 April 2021Thumbnail for version as of 22:51, 10 April 2021662 × 600 (25 KB)AnonMoos (talk | contribs){{Information |Description=Seven connected Archimedean six-fold spirals (stroked version) |Source=Converted from the following self-authored PostScript vector source code: <pre>%! /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...

Metadata