File:Threefold-spirals-triangle.svg
Summary
Description | Four connected Archimedean three-fold spirals which fit within a rounded triangle | ||
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: /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 grestore %%%%%%%%%%%%%%%% }def .8 dup scale /lower 0 def /centerx 382.5 def/centery 495 def/rotf 0 def archimdouble /curvedge{gsave 1 0 0 setrgbcolor centerx centery translate rotf rotate /lower 450 def/phase 120 def/incrm 6.9 def/sweeps 1.28 def aspiral /lower 390 def/phase 180 def/incrm 6.9 def/sweeps 1.11 def aspiral /lower 450 def/phase 300 def/incrm 30 def/sweeps 1.45 def aspiral grestore/lower 0 def}def /centerx 382.5 def/centery 751.667 def/rotf 300 def archimdouble curvedge /centerx 160.219858 def/centery 366.666 def/rotf 60 def archimdouble curvedge /centerx 604.780142 def/centery 366.666 def/rotf 180 def archimdouble curvedge showpage %EOF |
||
Author | AnonMoos | ||
Permission (Reusing this file) |
|