Drafting Sheets · a film
Lighting the sheet…
Sixteen Rings
A San He luopan drawn from its own TikZ, ring by ring
A feng shui compass that draws itself and then turns its rings back into place. It opens on that moment, sixteen rings turning and locking from the rim inward, and winds back to an empty sheet. Then an orange spark reads a TikZ listing and drafts the lines of a sixteen-ring San He luopan from it, ring by ring: the pool and the Former Heaven trigrams, the Dragon Killers and the Yellow Springs, the nine stars, the Earth plate's twenty-four mountains, seventy-two dragons and hundred and twenty golds, the Man plate, the sixty dragons and the Heaven plate (the Man and Heaven plates half a mountain either side of the Earth), the three-harmony elements, the twenty-eight lunar lodges in the Kaixi degrees, the solar terms and a full circle of degrees. Its 720 characters are set from the same numbers and appear cell by cell behind the pen. When the last ring is down every ring spins and locks back into place, the needle settles, and two red lines cross the dial and turn to read the sitting and facing. Every frame is rendered live in your browser, and the score is code that reads the same plan.
- Tempo
- 96 BPM · 38 bars
- Picture
- The drafting engine, WebGL
- Program
- One TikZ listing, 112 lines
- Dial
- 16 rings, 720 characters
- Sound
- Original score, synthesised from the plan
Chapters8
The listing71 statements
The film is this TikZ, the same listing as Sanhe Luopan, drawn by the same engine as the other Drafting Sheets; the characters on the dial are set beside it from the same numbers and appear cell by cell behind the pen. Copied with one \tikzsetline for the sheet’s own keys, it compiles in any LaTeX document that loads TikZ.
% title: 三合盘 · 十六层% 方位角自子起顺时针;纸上上南下北,角 = 270 - 方位角\begin{tikzpicture}% 盘照 1 cm 一单位排,整个缩到纸上\begin{scope}[scale=0.45] % 第 1 层 天池:海底线,北端两点\draw[compass] (0,0) circle (1);\draw[signal, thick] (0,-0.9) -- (0,0.9);\foreach \x in {-.13,.13} \fill[signal] (\x,-0.72) circle (.035); % 八宫:八条界线,每宫 45°\foreach \b in {22.5,67.5,...,337.5} \draw[help lines, dashed] ({270-\b}:1) -- ({270-\b}:11.76); % 第 2 层 先天八卦\draw (0,0) circle (2);\foreach \b in {22.5,67.5,...,337.5} \draw ({270-\b}:1) -- ({270-\b}:2);\foreach \a/\r/\g in {0/1.2/0,0/1.37/0,0/1.54/0,45/1.2/0,45/1.37/0,45/1.54/0.05,90/1.2/0,90/1.37/0.05,90/1.54/0,135/1.2/0,135/1.37/0.05,135/1.54/0.05,-45/1.2/0.05,-45/1.37/0,-45/1.54/0,-90/1.2/0.05,-90/1.37/0,-90/1.54/0.05,-135/1.2/0.05,-135/1.37/0.05,-135/1.54/0,180/1.2/0.05,180/1.37/0.05,180/1.54/0.05} \draw[thick, rotate=\a] (-.2,\r) -- (-\g,\r) (\g,\r) -- (.2,\r); % 第 3 层 龙上八煞\draw (0,0) circle (2.5);\foreach \b in {22.5,67.5,...,337.5} \draw ({270-\b}:2) -- ({270-\b}:2.5); % 第 4 层 八路黄泉\draw (0,0) circle (3.12);\foreach \b in {7.5,22.5,...,352.5} \draw ({270-\b}:2.5) -- ({270-\b}:3.12); % 第 5 层 坐山九星\draw (0,0) circle (3.84);\foreach \b in {7.5,22.5,...,352.5} \draw ({270-\b}:3.12) -- ({270-\b}:3.84); % 第 6 层 地盘正针二十四山\draw[thick] (0,0) circle (4.72);\foreach \b in {7.5,22.5,...,352.5} \draw[semithick] ({270-\b}:3.84) -- ({270-\b}:4.72); % 第 7 层 穿山七十二龙\draw (0,0) circle (5.5);\foreach \b in {2.5,7.5,...,357.5} \draw ({270-\b}:4.72) -- ({270-\b}:5.5); % 第 8 层 正针一百二十分金\draw (0,0) circle (6.22);\foreach \b in {1.5,4.5,...,358.5} \draw ({270-\b}:5.5) -- ({270-\b}:6.22); % 第 9 层 人盘中针二十四山\draw (0,0) circle (6.78);\foreach \b in {0,15,...,345} \draw ({270-\b}:6.22) -- ({270-\b}:6.78);\draw[help lines, <->] (270:6.5) arc (270:277.5:6.5) node[midway, below right, font=\scriptsize] {$7.5^\circ$}; % 第 10 层 透地六十龙\draw (0,0) circle (7.56);\foreach \b in {1.5,7.5,...,355.5} \draw ({270-\b}:6.78) -- ({270-\b}:7.56); % 第 11 层 天盘缝针二十四山\draw (0,0) circle (8.12);\foreach \b in {0,15,...,345} \draw ({270-\b}:7.56) -- ({270-\b}:8.12);\draw[help lines, <->] (270:7.84) arc (270:262.5:7.84) node[midway, below left, font=\scriptsize] {$7.5^\circ$}; % 第 12 层 双山三合五行\draw (0,0) circle (8.54);\foreach \b in {15,45,...,345} \draw ({270-\b}:8.12) -- ({270-\b}:8.54); % 第 13 层 缝针一百二十分金\draw (0,0) circle (9.26);\foreach \b in {0,3,...,357} \draw ({270-\b}:8.54) -- ({270-\b}:9.26); % 第 14 层 周天二十八宿\draw (0,0) circle (9.98);\foreach \b in {0,9.117,19.959,26.858,49.281,58.645,76.386,82.3,87.967,103.984,113.593,126.16,144.641,164.6,182.094,188.747,202.053,204.517,234.333,243.696,244.189,260.452,271.294,286.324,298.891,316.632,326.242,344.23} \draw ({270-\b}:9.26) -- ({270-\b}:9.98);\foreach \d in {1,...,15} \draw[very thin] ({270+\d*0.986}:9.26) -- ({270+\d*0.986}:9.36); % 危 16 度\foreach \d in {1,...,18} \draw[very thin] ({285.77+\d*0.986}:9.26) -- ({285.77+\d*0.986}:9.36); % 室 18 度少\foreach \d in {1,...,9} \draw[very thin] ({303.758+\d*0.986}:9.26) -- ({303.758+\d*0.986}:9.36); % 壁 9 度太\foreach \d in {1,...,17} \draw[very thin] ({313.368+\d*0.986}:9.26) -- ({313.368+\d*0.986}:9.36); % 奎 18 度\foreach \d in {1,...,12} \draw[very thin] ({331.109+\d*0.986}:9.26) -- ({331.109+\d*0.986}:9.36); % 娄 12 度太\foreach \d in {1,...,15} \draw[very thin] ({343.676+\d*0.986}:9.26) -- ({343.676+\d*0.986}:9.36); % 胃 15 度少\foreach \d in {1,...,10} \draw[very thin] ({358.706+\d*0.986}:9.26) -- ({358.706+\d*0.986}:9.36); % 昴 11 度\foreach \d in {1,...,16} \draw[very thin] ({369.548+\d*0.986}:9.26) -- ({369.548+\d*0.986}:9.36); % 毕 16 度半\foreach \d in {1,...,9} \draw[very thin] ({386.304+\d*0.986}:9.26) -- ({386.304+\d*0.986}:9.36); % 参 9 度半\foreach \d in {1,...,30} \draw[very thin] ({395.667+\d*0.986}:9.26) -- ({395.667+\d*0.986}:9.36); % 井 30 度少\foreach \d in {1,...,2} \draw[very thin] ({425.483+\d*0.986}:9.26) -- ({425.483+\d*0.986}:9.36); % 鬼 2 度半\foreach \d in {1,...,13} \draw[very thin] ({427.947+\d*0.986}:9.26) -- ({427.947+\d*0.986}:9.36); % 柳 13 度半\foreach \d in {1,...,6} \draw[very thin] ({441.253+\d*0.986}:9.26) -- ({441.253+\d*0.986}:9.36); % 星 6 度太\foreach \d in {1,...,17} \draw[very thin] ({447.906+\d*0.986}:9.26) -- ({447.906+\d*0.986}:9.36); % 张 17 度太\foreach \d in {1,...,20} \draw[very thin] ({465.4+\d*0.986}:9.26) -- ({465.4+\d*0.986}:9.36); % 翼 20 度少\foreach \d in {1,...,18} \draw[very thin] ({485.359+\d*0.986}:9.26) -- ({485.359+\d*0.986}:9.36); % 轸 18 度太\foreach \d in {1,...,12} \draw[very thin] ({503.84+\d*0.986}:9.26) -- ({503.84+\d*0.986}:9.36); % 角 12 度太\foreach \d in {1,...,9} \draw[very thin] ({516.407+\d*0.986}:9.26) -- ({516.407+\d*0.986}:9.36); % 亢 9 度太\foreach \d in {1,...,16} \draw[very thin] ({526.016+\d*0.986}:9.26) -- ({526.016+\d*0.986}:9.36); % 氐 16 度少\foreach \d in {1,...,5} \draw[very thin] ({542.033+\d*0.986}:9.26) -- ({542.033+\d*0.986}:9.36); % 房 5 度太\foreach \d in {1,...,5} \draw[very thin] ({547.7+\d*0.986}:9.26) -- ({547.7+\d*0.986}:9.36); % 心 6 度\foreach \d in {1,...,17} \draw[very thin] ({553.614+\d*0.986}:9.26) -- ({553.614+\d*0.986}:9.36); % 尾 18 度\foreach \d in {1,...,9} \draw[very thin] ({571.355+\d*0.986}:9.26) -- ({571.355+\d*0.986}:9.36); % 箕 9 度半\foreach \d in {1,...,22} \draw[very thin] ({580.719+\d*0.986}:9.26) -- ({580.719+\d*0.986}:9.36); % 斗 22 度太\foreach \d in {1,...,6} \draw[very thin] ({603.142+\d*0.986}:9.26) -- ({603.142+\d*0.986}:9.36); % 牛 7 度\foreach \d in {1,...,10} \draw[very thin] ({610.041+\d*0.986}:9.26) -- ({610.041+\d*0.986}:9.36); % 女 11 度\foreach \d in {1,...,9} \draw[very thin] ({620.883+\d*0.986}:9.26) -- ({620.883+\d*0.986}:9.36); % 虚 9 度少 % 第 15 层 二十四节气\draw (0,0) circle (10.72);\foreach \b in {7.5,22.5,...,352.5} \draw ({270-\b}:9.98) -- ({270-\b}:10.72); % 第 16 层 周天三百六十度\draw[thick] (0,0) circle (11.46);\foreach \b in {0,1,...,359} \draw[very thin] ({270-\b}:11.34) -- ({270-\b}:11.46);\foreach \b in {0,5,...,355} \draw ({270-\b}:11.26) -- ({270-\b}:11.46);\foreach \b in {0,10,...,350} \draw ({270-\b}:11.16) -- ({270-\b}:11.46);\end{scope} % 盘边:直径(纸上的长度)\draw[|<->|] (-5.157,-5.457) -- (5.157,-5.457) node[midway, below] {$10.314$}; \end{tikzpicture}