Q6 解答A
@ -5,7 +5,7 @@ BorderColor="#616161"
|
|||||||
ColorMap:r="#FF7043"
|
ColorMap:r="#FF7043"
|
||||||
ColorMap:b="#29B6F6"
|
ColorMap:b="#29B6F6"
|
||||||
Xaxis="right"
|
Xaxis="right"
|
||||||
Yaxis="Down"
|
Yaxis="down"
|
||||||
---
|
---
|
||||||
6
|
6
|
||||||
1 -1 b
|
1 -1 b
|
||||||
|
@ -5,7 +5,7 @@ BorderColor="#616161"
|
|||||||
ColorMap:r="#FF7043"
|
ColorMap:r="#FF7043"
|
||||||
ColorMap:b="#29B6F6"
|
ColorMap:b="#29B6F6"
|
||||||
Xaxis="right"
|
Xaxis="right"
|
||||||
Yaxis="Down"
|
Yaxis="down"
|
||||||
---
|
---
|
||||||
6
|
6
|
||||||
1 -1 b
|
1 -1 b
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
<path style="fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:0.7;" d="M 115.282 115.282 L 78.7175 78.7175 "/>
|
<path style="fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:0.7;" d="M 115.282 115.282 L 78.7175 78.7175 "/>
|
||||||
<path style="fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:0.7;" d="M 28.7175 115.282 L 65.2825 78.7175 "/>
|
<path style="fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:0.7;" d="M 28.7175 115.282 L 65.2825 78.7175 "/>
|
||||||
<path style="fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:0.7;" d="M 115.282 28.7175 L 78.7175 65.2825 "/>
|
<path style="fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:0.7;" d="M 115.282 28.7175 L 78.7175 65.2825 "/>
|
||||||
<text font-family="Ubuntu Mono" fill="white" font-size="10.000000" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="22.000004" y="21.999979">A</tspan></text>
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="10.000000" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="22.000004" y="21.999979">A</tspan></text>
|
||||||
<text font-family="Ubuntu Mono" fill="white" font-size="10.000000" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="122.000000" y="121.999977">B</tspan></text>
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="10.000000" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="122.000000" y="121.999977">B</tspan></text>
|
||||||
<text font-family="Ubuntu Mono" fill="white" font-size="10.000000" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="22.000004" y="121.999977">C</tspan></text>
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="10.000000" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="22.000004" y="121.999977">C</tspan></text>
|
||||||
<text font-family="Ubuntu Mono" fill="white" font-size="10.000000" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="122.000000" y="21.999979">D</tspan></text>
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="10.000000" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="122.000000" y="21.999979">D</tspan></text>
|
||||||
<text font-family="Ubuntu Mono" fill="white" font-size="10.000000" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="72.000000" y="71.999977">E</tspan></text>
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="10.000000" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="72.000000" y="71.999977">E</tspan></text>
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
@ -6,9 +6,9 @@ ColorMap:r="#FF7043"
|
|||||||
ColorMap:b="#29B6F6"
|
ColorMap:b="#29B6F6"
|
||||||
ColorMap:g="#212121"
|
ColorMap:g="#212121"
|
||||||
FontColor="white"
|
FontColor="white"
|
||||||
FontFamily="Ubuntu Mono"
|
FontFamily="Atkinson Hyperlegible"
|
||||||
Xaxis="right"
|
Xaxis="right"
|
||||||
Yaxis="Down"
|
Yaxis="down"
|
||||||
Label="A"
|
Label="A"
|
||||||
---
|
---
|
||||||
5
|
5
|
||||||
|
13
assets/p7-pentagon.svg
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="230.527679" height="230.527649" viewBox="0 0 230.527679 230.527649" version="1.1">
|
||||||
|
<circle style="fill-rule:evenodd;fill:#29B6F6;fill-opacity:1;stroke-width:1.515150;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.060605;" cx="65.263840" cy="192.205902" r="15.151501"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#29B6F6;fill-opacity:1;stroke-width:1.515150;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.060605;" cx="165.263840" cy="192.205902" r="15.151501"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#29B6F6;fill-opacity:1;stroke-width:1.515150;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.060605;" cx="196.165527" cy="97.100250" r="15.151501"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#29B6F6;fill-opacity:1;stroke-width:1.515150;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.060605;" cx="115.263840" cy="38.321732" r="15.151501"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#29B6F6;fill-opacity:1;stroke-width:1.515150;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.060605;" cx="34.362141" cy="97.100250" r="15.151501"/>
|
||||||
|
<path style="fill:none;stroke-width:1.515150;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.060605;" d="M 79.657768 192.205902 L 150.869919 192.205902 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.515150;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.060605;" d="M 169.711807 178.516464 L 191.717560 110.789688 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.515150;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.060605;" d="M 184.520599 88.639709 L 126.908768 46.782269 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.515150;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.060605;" d="M 103.618912 46.782269 L 46.007072 88.639717 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.515150;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.060605;" d="M 38.810108 110.789688 L 60.815872 178.516464 "/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.2 KiB |
22
assets/p7-pentagon.txt
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
OutputFile="p7-pentagon.svg"
|
||||||
|
R=.151515
|
||||||
|
Thickness=.0151515
|
||||||
|
BorderColor="#616161"
|
||||||
|
ColorMap:b="#29B6F6"
|
||||||
|
Xaxis="right"
|
||||||
|
Yaxis="up"
|
||||||
|
OutputShape="square"
|
||||||
|
---
|
||||||
|
5
|
||||||
|
1 1 b
|
||||||
|
2 1 b
|
||||||
|
2.309017 1.95105652 b
|
||||||
|
1.5 2.53884177 b
|
||||||
|
0.690983 1.95105652 b
|
||||||
|
|
||||||
|
5
|
||||||
|
1 2
|
||||||
|
2 3
|
||||||
|
3 4
|
||||||
|
4 5
|
||||||
|
5 1
|
39
assets/p7-solA-hexagon.svg
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="284.000000" height="284.000000" viewBox="0 0 284.000000 284.000000" version="1.1">
|
||||||
|
<circle style="fill-rule:evenodd;fill:#29B6F6;fill-opacity:1;stroke-width:1.833333;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" cx="92.000000" cy="228.602539" r="18.333334"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#29B6F6;fill-opacity:1;stroke-width:1.833333;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" cx="192.000000" cy="228.602539" r="18.333334"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#29B6F6;fill-opacity:1;stroke-width:1.833333;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" cx="242.000000" cy="142.000046" r="18.333334"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#29B6F6;fill-opacity:1;stroke-width:1.833333;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" cx="192.000000" cy="55.397552" r="18.333334"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#29B6F6;fill-opacity:1;stroke-width:1.833333;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" cx="92.000000" cy="55.397461" r="18.333334"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#29B6F6;fill-opacity:1;stroke-width:1.833333;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" cx="42.000000" cy="142.000046" r="18.333334"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#FF7043;fill-opacity:1;stroke-width:1.833333;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" cx="92.000000" cy="128.602539" r="18.333334"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#FF7043;fill-opacity:1;stroke-width:1.833333;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" cx="105.397453" cy="178.602539" r="18.333334"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#FF7043;fill-opacity:1;stroke-width:1.833333;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" cx="155.397461" cy="192.000046" r="18.333334"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#FF7043;fill-opacity:1;stroke-width:1.833333;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" cx="192.000000" cy="155.397461" r="18.333334"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#FF7043;fill-opacity:1;stroke-width:1.833333;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" cx="178.602539" cy="105.397446" r="18.333334"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#FF7043;fill-opacity:1;stroke-width:1.833333;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" cx="128.602539" cy="92.000000" r="18.333334"/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 109.416672 228.602539 L 174.583328 228.602539 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 200.708344 213.519272 L 233.291656 157.083313 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 233.291656 126.916771 L 200.708344 70.480827 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 174.583328 55.397537 L 109.416672 55.397476 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 83.291672 70.480743 L 50.708332 126.916763 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 83.291664 213.519272 L 50.708336 157.083313 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 96.507767 145.425751 L 100.889687 161.779327 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 122.220657 183.110321 L 138.574249 187.492264 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 167.712891 179.684601 L 179.684570 167.712906 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 187.492233 138.574249 L 183.110306 122.220657 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 161.779327 100.889687 L 145.425751 96.507759 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 116.287094 104.315445 L 104.315445 116.287094 "/>
|
||||||
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="18.333334" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="92.000000" y="228.602539">1</tspan></text>
|
||||||
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="18.333334" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="192.000000" y="228.602539">2</tspan></text>
|
||||||
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="18.333334" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="242.000000" y="142.000046">3</tspan></text>
|
||||||
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="18.333334" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="192.000000" y="55.397552">4</tspan></text>
|
||||||
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="18.333334" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="92.000000" y="55.397461">5</tspan></text>
|
||||||
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="18.333334" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="42.000000" y="142.000046">6</tspan></text>
|
||||||
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="18.333334" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="92.000000" y="128.602539">1</tspan></text>
|
||||||
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="18.333334" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="105.397453" y="178.602539">2</tspan></text>
|
||||||
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="18.333334" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="155.397461" y="192.000046">3</tspan></text>
|
||||||
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="18.333334" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="192.000000" y="155.397461">4</tspan></text>
|
||||||
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="18.333334" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="178.602539" y="105.397446">5</tspan></text>
|
||||||
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="18.333334" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="128.602539" y="92.000000">6</tspan></text>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 7.1 KiB |
44
assets/p7-solA-hexagon.txt
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
OutputFile="p7-solA-hexagon.svg"
|
||||||
|
R=.18333333
|
||||||
|
Thickness=.01833333
|
||||||
|
BorderColor="#616161"
|
||||||
|
ColorMap:r="#FF7043"
|
||||||
|
ColorMap:b="#29B6F6"
|
||||||
|
Xaxis="right"
|
||||||
|
Yaxis="up"
|
||||||
|
Label="1"
|
||||||
|
LabelMap:7="1"
|
||||||
|
LabelMap:8="2"
|
||||||
|
LabelMap:9="3"
|
||||||
|
LabelMap:10="4"
|
||||||
|
LabelMap:11="5"
|
||||||
|
LabelMap:12="6"
|
||||||
|
OutputShape="square"
|
||||||
|
---
|
||||||
|
12
|
||||||
|
1 1 b
|
||||||
|
2 1 b
|
||||||
|
2.5 1.866025 b
|
||||||
|
2 2.73205 b
|
||||||
|
1 2.7320508 b
|
||||||
|
.5 1.866025 b
|
||||||
|
1 2 r
|
||||||
|
1.1339746 1.5 r
|
||||||
|
1.6339746 1.366025 r
|
||||||
|
2 1.7320508 r
|
||||||
|
1.8660254 2.2320508 r
|
||||||
|
1.3660254 2.3660254 r
|
||||||
|
|
||||||
|
12
|
||||||
|
1 2
|
||||||
|
2 3
|
||||||
|
3 4
|
||||||
|
4 5
|
||||||
|
5 6
|
||||||
|
1 6
|
||||||
|
7 8
|
||||||
|
8 9
|
||||||
|
9 10
|
||||||
|
10 11
|
||||||
|
11 12
|
||||||
|
12 7
|
44
assets/p7-solA-hexagon2.svg
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="264.000000" height="264.000000" viewBox="0 0 264.000000 264.000000" version="1.1">
|
||||||
|
<circle style="fill-rule:evenodd;fill:#29B6F6;fill-opacity:1;stroke-width:1.833333;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" cx="82.000000" cy="218.602539" r="10.000000"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#29B6F6;fill-opacity:1;stroke-width:1.833333;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" cx="182.000000" cy="218.602539" r="10.000000"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#29B6F6;fill-opacity:1;stroke-width:1.833333;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" cx="232.000000" cy="132.000046" r="10.000000"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#29B6F6;fill-opacity:1;stroke-width:1.833333;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" cx="182.000000" cy="45.397552" r="10.000000"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#29B6F6;fill-opacity:1;stroke-width:1.833333;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" cx="82.000000" cy="45.397461" r="10.000000"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#29B6F6;fill-opacity:1;stroke-width:1.833333;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" cx="32.000000" cy="132.000046" r="10.000000"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#FF7043;fill-opacity:1;stroke-width:1.833333;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" cx="82.000000" cy="118.602539" r="10.000000"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#FF7043;fill-opacity:1;stroke-width:1.833333;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" cx="95.397453" cy="168.602539" r="10.000000"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#FF7043;fill-opacity:1;stroke-width:1.833333;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" cx="145.397461" cy="182.000046" r="10.000000"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#FF7043;fill-opacity:1;stroke-width:1.833333;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" cx="182.000000" cy="145.397461" r="10.000000"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#FF7043;fill-opacity:1;stroke-width:1.833333;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" cx="168.602539" cy="95.397446" r="10.000000"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#FF7043;fill-opacity:1;stroke-width:1.833333;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" cx="118.602539" cy="82.000000" r="10.000000"/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 91.083336 218.602539 L 172.916672 218.602539 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 186.541672 210.736145 L 227.458328 139.866440 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 227.458328 124.133652 L 186.541672 53.263950 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 172.916672 45.397545 L 91.083336 45.397469 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 77.458336 53.263859 L 36.541664 124.133644 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 77.458328 210.736145 L 36.541668 139.866440 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 84.350937 127.376366 L 93.046516 159.828705 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 104.171280 170.953491 L 136.623642 179.649094 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 151.820343 175.577148 L 175.577118 151.820358 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 179.649063 136.623627 L 170.953476 104.171272 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 159.828705 93.046509 L 127.376366 84.350937 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 112.179649 88.422890 L 88.422890 112.179649 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 82.000000 209.519211 L 82.000000 127.685875 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 174.133606 214.060867 L 103.263855 173.144211 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 224.133606 136.541718 L 153.263855 177.458374 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 84.350937 209.828705 L 93.046516 177.376373 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.833333;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:1.283333;" d="M 175.577103 212.179657 L 151.820358 188.422928 "/>
|
||||||
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="10.000000" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="82.000000" y="218.602539">1</tspan></text>
|
||||||
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="10.000000" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="182.000000" y="218.602539">2</tspan></text>
|
||||||
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="10.000000" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="232.000000" y="132.000046">3</tspan></text>
|
||||||
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="10.000000" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="182.000000" y="45.397552">4</tspan></text>
|
||||||
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="10.000000" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="82.000000" y="45.397461">5</tspan></text>
|
||||||
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="10.000000" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="32.000000" y="132.000046">6</tspan></text>
|
||||||
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="10.000000" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="82.000000" y="118.602539">1</tspan></text>
|
||||||
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="10.000000" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="95.397453" y="168.602539">2</tspan></text>
|
||||||
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="10.000000" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="145.397461" y="182.000046">3</tspan></text>
|
||||||
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="10.000000" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="182.000000" y="145.397461">4</tspan></text>
|
||||||
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="10.000000" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="168.602539" y="95.397446">5</tspan></text>
|
||||||
|
<text font-family="Atkinson Hyperlegible" fill="white" font-size="10.000000" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="118.602539" y="82.000000">6</tspan></text>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 8.0 KiB |
49
assets/p7-solA-hexagon2.txt
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
OutputFile="p7-solA-hexagon2.svg"
|
||||||
|
R=.1
|
||||||
|
Thickness=.01833333
|
||||||
|
BorderColor="#616161"
|
||||||
|
ColorMap:r="#FF7043"
|
||||||
|
ColorMap:b="#29B6F6"
|
||||||
|
Xaxis="right"
|
||||||
|
Yaxis="up"
|
||||||
|
Label="1"
|
||||||
|
LabelMap:7="1"
|
||||||
|
LabelMap:8="2"
|
||||||
|
LabelMap:9="3"
|
||||||
|
LabelMap:10="4"
|
||||||
|
LabelMap:11="5"
|
||||||
|
LabelMap:12="6"
|
||||||
|
OutputShape="square"
|
||||||
|
---
|
||||||
|
12
|
||||||
|
1 1 b
|
||||||
|
2 1 b
|
||||||
|
2.5 1.866025 b
|
||||||
|
2 2.73205 b
|
||||||
|
1 2.7320508 b
|
||||||
|
.5 1.866025 b
|
||||||
|
1 2 r
|
||||||
|
1.1339746 1.5 r
|
||||||
|
1.6339746 1.366025 r
|
||||||
|
2 1.7320508 r
|
||||||
|
1.8660254 2.2320508 r
|
||||||
|
1.3660254 2.3660254 r
|
||||||
|
|
||||||
|
17
|
||||||
|
1 2
|
||||||
|
2 3
|
||||||
|
3 4
|
||||||
|
4 5
|
||||||
|
5 6
|
||||||
|
1 6
|
||||||
|
7 8
|
||||||
|
8 9
|
||||||
|
9 10
|
||||||
|
10 11
|
||||||
|
11 12
|
||||||
|
12 7
|
||||||
|
1 7
|
||||||
|
2 8
|
||||||
|
3 9
|
||||||
|
1 8
|
||||||
|
2 9
|
11
assets/p7-square.svg
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="144.000000" height="144.000000" viewBox="0 0 144.000000 144.000000" version="1.1">
|
||||||
|
<circle style="fill-rule:evenodd;fill:#29B6F6;fill-opacity:1;stroke-width:1.000000;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:0.700000;" cx="22.000000" cy="122.000000" r="10.000000"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#29B6F6;fill-opacity:1;stroke-width:1.000000;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:0.700000;" cx="122.000000" cy="122.000000" r="10.000000"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#29B6F6;fill-opacity:1;stroke-width:1.000000;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:0.700000;" cx="122.000000" cy="22.000000" r="10.000000"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#29B6F6;fill-opacity:1;stroke-width:1.000000;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:0.700000;" cx="22.000000" cy="22.000000" r="10.000000"/>
|
||||||
|
<path style="fill:none;stroke-width:1.000000;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:0.700000;" d="M 31.500000 122.000000 L 112.500000 122.000000 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.000000;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:0.700000;" d="M 122.000000 112.500000 L 122.000000 31.500000 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.000000;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:0.700000;" d="M 112.500000 22.000000 L 31.500000 22.000000 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.000000;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:0.700000;" d="M 22.000000 31.500000 L 22.000000 112.500000 "/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.8 KiB |
19
assets/p7-square.txt
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
OutputFile="p7-squre.svg"
|
||||||
|
R=.1
|
||||||
|
Thickness=.01
|
||||||
|
BorderColor="#616161"
|
||||||
|
ColorMap:b="#29B6F6"
|
||||||
|
Xaxis="right"
|
||||||
|
Yaxis="up"
|
||||||
|
---
|
||||||
|
4
|
||||||
|
0 0 b
|
||||||
|
1 0 b
|
||||||
|
1 1 b
|
||||||
|
0 1 b
|
||||||
|
|
||||||
|
4
|
||||||
|
1 2
|
||||||
|
2 3
|
||||||
|
3 4
|
||||||
|
4 1
|
9
assets/p7-triangle.svg
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="144.000000" height="144.000000" viewBox="0 0 144.000000 144.000000" version="1.1">
|
||||||
|
<circle style="fill-rule:evenodd;fill:#29B6F6;fill-opacity:1;stroke-width:1.000000;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:0.700000;" cx="22.000000" cy="115.301270" r="10.000000"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#29B6F6;fill-opacity:1;stroke-width:1.000000;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:0.700000;" cx="122.000000" cy="115.301270" r="10.000000"/>
|
||||||
|
<circle style="fill-rule:evenodd;fill:#29B6F6;fill-opacity:1;stroke-width:1.000000;stroke-linecap:square;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:0.700000;" cx="72.000000" cy="28.698730" r="10.000000"/>
|
||||||
|
<path style="fill:none;stroke-width:1.000000;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:0.700000;" d="M 31.500000 115.301270 L 112.500000 115.301270 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.000000;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:0.700000;" d="M 117.250000 107.074028 L 76.750000 36.925972 "/>
|
||||||
|
<path style="fill:none;stroke-width:1.000000;stroke-linecap:butt;stroke-linejoin:miter;stroke:#616161;stroke-miterlimit:0.700000;" d="M 67.250000 36.925972 L 26.750000 107.074028 "/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
18
assets/p7-triangle.txt
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
OutputFile="p7-triangle.svg"
|
||||||
|
R=.1
|
||||||
|
Thickness=.01
|
||||||
|
BorderColor="#616161"
|
||||||
|
ColorMap:b="#29B6F6"
|
||||||
|
Xaxis="right"
|
||||||
|
Yaxis="up"
|
||||||
|
OutputShape="square"
|
||||||
|
---
|
||||||
|
3
|
||||||
|
0 0 b
|
||||||
|
1 0 b
|
||||||
|
.5 .8660254038 b
|
||||||
|
|
||||||
|
3
|
||||||
|
1 2
|
||||||
|
2 3
|
||||||
|
3 1
|
17
lib.typ
@ -1,18 +1,14 @@
|
|||||||
#import "template.typ": *
|
#import "template.typ": *
|
||||||
|
|
||||||
#let pagebreak_until_odd() = {
|
#let pagebreak_until_odd() = {
|
||||||
|
// TODO: Issue #939 (https://github.com/typst/typst/issues/939)
|
||||||
pagebreak()
|
pagebreak()
|
||||||
locate(loc => if calc.even(thispage_number(loc)) {
|
|
||||||
skip_footer.update(true)
|
|
||||||
pagebreak()
|
|
||||||
skip_footer.update(false)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#let italic(body) = text(style: "italic", body)
|
#let italic(body) = text(style: "italic", body)
|
||||||
|
|
||||||
#let type_icon(name, color) = square(size: 45pt, fill: rgb(color))[
|
#let type_icon(name, color) = square(size: 40pt, fill: rgb(color))[
|
||||||
#set text(22pt, white, font: "Arial", weight: "regular")
|
#set text(20pt, white, font: labelfont, weight: "regular")
|
||||||
#set align(center + horizon)
|
#set align(center + horizon)
|
||||||
#name
|
#name
|
||||||
]
|
]
|
||||||
@ -26,7 +22,7 @@
|
|||||||
|
|
||||||
#let bf(x) = {$upright(bold(#x))$}
|
#let bf(x) = {$upright(bold(#x))$}
|
||||||
|
|
||||||
#let hypergeometric-func(ax, bx, x) = {$upright(F)lr((mat(delim: #none, ax;bx)#h(5pt)#line(angle: 90deg, length: 40pt)#h(5pt)#x))$}
|
#let hypergeometric-func(ax, bx, x) = {$upright(F)lr((lr(mat(delim: #none, ax;bx)|)#x))$}
|
||||||
|
|
||||||
#let transpose = {$upright(sans(T))$}
|
#let transpose = {$upright(sans(T))$}
|
||||||
|
|
||||||
@ -45,4 +41,7 @@
|
|||||||
body
|
body
|
||||||
}
|
}
|
||||||
|
|
||||||
#let inprod(a,b) = {$angle.l #a,#b angle.r$}
|
#let inprod(a,b) = {$angle.l #a,#b angle.r$}
|
||||||
|
#let trig = sym.triangle.stroked.t
|
||||||
|
|
||||||
|
#let mtext(body) = text(font: cnmainfont, weight: "regular", body)
|
120
main.typ
@ -45,22 +45,21 @@ block(width: 100%)[
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
#set text(weight: "light", font: cnfont)
|
#set text(font: cnfont)
|
||||||
#block[
|
#block[
|
||||||
#set text(2em)
|
#set text(weight: "extralight", 40pt)
|
||||||
\##problem_id.display("1")
|
\##problem_id.display("1")
|
||||||
]
|
]
|
||||||
#block(fill: rgb("B3E5FC"))[
|
#block(stroke: (bottom: 15pt + rgb("B3E5FC"),), inset: -2pt)[
|
||||||
#set text(1.5em)
|
#set text(weight: "light", 30pt)
|
||||||
#h(.3em)
|
#h(10pt)
|
||||||
#it.body
|
#it.body
|
||||||
]
|
]
|
||||||
#v(25pt)
|
#v(20pt)
|
||||||
]}
|
]}
|
||||||
|
|
||||||
<MainStarted>
|
|
||||||
|
|
||||||
#pagebreak_until_odd()
|
#pagebreak_until_odd()
|
||||||
|
#[] <MainStarted>
|
||||||
#problem_type.update((combinatorics_icon,))
|
#problem_type.update((combinatorics_icon,))
|
||||||
= 随机游走的左端点
|
= 随机游走的左端点
|
||||||
|
|
||||||
@ -507,7 +506,7 @@ $ 2>=bf(E)(abs(X))=sum_(v in V)bf(P)(v in X)=sum_(v in V)1/(n-dd(v))>=n/(n-2m sl
|
|||||||
|
|
||||||
红蓝各 1 个点的情况的情况是平凡的,下面均假设 $n>=2$。
|
红蓝各 1 个点的情况的情况是平凡的,下面均假设 $n>=2$。
|
||||||
|
|
||||||
(反证法)假设不存在一种合法的配对方案。从全部配对可能的方案中选出连接的线段长度之和最短的一种方案之一,根据反证假设一定存在两条线段相交。如图,设相交的两条线段的红色端点分别为点 $A$ 和点 $B$,蓝色端点分别为点 $C$ 和点 $D$,$A$ 和 $C$ 配对,$B$ 和 $D$ 配对,$A C$ 和 $B D$ 的交点为 $E$。
|
(反证法,无穷递降法)假设不存在一种合法的配对方案。从全部配对可能的方案中选出连接的线段长度之和最短的一种方案之一,根据反证假设一定存在两条线段相交。如图,设相交的两条线段的红色端点分别为点 $A$ 和点 $B$,蓝色端点分别为点 $C$ 和点 $D$,$A$ 和 $C$ 配对,$B$ 和 $D$ 配对,$A C$ 和 $B D$ 的交点为 $E$。
|
||||||
|
|
||||||
#figure(image(
|
#figure(image(
|
||||||
"./assets/p5-intersect.svg",
|
"./assets/p5-intersect.svg",
|
||||||
@ -607,3 +606,106 @@ $ dim bb(Z)_8^2=dimrange A^transpose+dimnull A^transpose $
|
|||||||
$ 3=dimrange B<=dimrange A^transpose<=2 $
|
$ 3=dimrange B<=dimrange A^transpose<=2 $
|
||||||
|
|
||||||
这给出了 $3<=2$ 这样的错误的结果,故假设不成立,原命题得证。
|
这给出了 $3<=2$ 这样的错误的结果,故假设不成立,原命题得证。
|
||||||
|
|
||||||
|
#pagebreak_until_odd()
|
||||||
|
#problem_type.update((geometry_icon,number_thoery_icon,algebra_icon))
|
||||||
|
= 格点正多边形
|
||||||
|
|
||||||
|
求证:如果一个正多边形的每个顶点的横纵坐标均为整数,那么它一定是一个正方形。
|
||||||
|
|
||||||
|
== 提示
|
||||||
|
|
||||||
|
每个顶点的横纵坐标均为整数的多边形常常被称为“格点多边形”。
|
||||||
|
|
||||||
|
这里所说的正 $k(k>=3)$ 边形是指一个有恰好 $k$ 条边(以及 $k$ 个顶点)的凸多边形,使得每一条边的长度都相等。一般而言,我们把正三边形叫做“等边三角形”,把正四边形叫做“正方形”。
|
||||||
|
|
||||||
|
#align(center,
|
||||||
|
stack(dir: ltr,
|
||||||
|
figure(image(
|
||||||
|
"./assets/p7-triangle.svg",
|
||||||
|
width: 30%,
|
||||||
|
), caption: [等边三角形]),
|
||||||
|
figure(image(
|
||||||
|
"./assets/p7-square.svg",
|
||||||
|
width: 30%
|
||||||
|
), caption: [正方形]),
|
||||||
|
figure(image(
|
||||||
|
"./assets/p7-pentagon.svg",
|
||||||
|
width: 30%
|
||||||
|
), caption: [正五边形])
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
事实上,题目中的整数也可以换成有理数,因为一个每个顶点的横纵坐标均为有理数的图形只要恰当放大一个比例就一定可以得到一个每个顶点的横纵坐标均为整数的图形。
|
||||||
|
|
||||||
|
显然存在许多正方形,满足每个顶点的横纵坐标均为整数。
|
||||||
|
|
||||||
|
#pagebreak()
|
||||||
|
== 解答 A
|
||||||
|
|
||||||
|
我们将给出两种不同的解答,在这个解答里,我们会使用“无穷递降法”来说明这个问题。
|
||||||
|
|
||||||
|
下面首先分类讨论对于等边三角形的情况,不妨设等边三角形的三个顶点分别为 $A(0,0)$、$B(b_1,b_2)$ 和 $C(c_1,c_2)$。于是根据勾股定理,有
|
||||||
|
|
||||||
|
$ cases(b_1^2+b_2^2=c_1^2+c_2^2,b_1^2+b_2^2=(c_1-b_1)^2+(c_2-b_2)^2) $
|
||||||
|
|
||||||
|
把 $b_1$ 和 $b_2$ 看做常数,$c_1$ 和 $c_2$ 看做未知数,这组方程解得
|
||||||
|
|
||||||
|
$ cases(c_1=1/2 (b_1 - sqrt(3) b_2),c_2=1/2 (sqrt(3) b_1+b_2)) #tab #mtext("或") #tab cases(c_1=1/2 (b_1 + sqrt(3) b_2),c_2=1/2 (-sqrt(3) b_1+b_2)) $
|
||||||
|
|
||||||
|
由于 $sqrt(3)$ 是无理数,当 $b_1$ 和 $b_2$ 均为整数时,$c_1$ 和 $c_2$ 必定都是无理数,也即不是整数。因此,每个顶点的横纵坐标均为整数的等边三角形不存在。
|
||||||
|
|
||||||
|
在说明一般情况之前,我们首先要引入如下引理:
|
||||||
|
|
||||||
|
*引理* 一个横纵坐标均为整数的点绕着另一个横纵坐标均为整数的点旋转 $90 degree$ 后得到的点仍然是一个横纵坐标均为整数的点。
|
||||||
|
|
||||||
|
算出旋转后的点的坐标即可,读者自行验证该引理。
|
||||||
|
|
||||||
|
下面说明一般情况,(反证法,无穷递降法)假设存在格点正 $k(k>=5)$ 边形。从所有的格点正 $k$ 边形中找出面积最小的一个,设它的顶点按逆时针顺序依次为 $P_1,dots,P_k$。对于每个顶点 $P_i$,把它绕点 $P_(i-1)$(特别地,点 $P_1$ 绕点 $P_k$)逆时针旋转 $90 deg$,得到点 $Q_i$(如图 @P7fig1)。
|
||||||
|
|
||||||
|
#align(center, stack(dir: ltr, spacing: 5%,
|
||||||
|
[#figure(image(
|
||||||
|
"./assets/p7-solA-hexagon.svg",
|
||||||
|
width: 40%,
|
||||||
|
), caption: [旋转后的得到的点]) <P7fig1>],
|
||||||
|
|
||||||
|
[#figure(image(
|
||||||
|
"./assets/p7-solA-hexagon2.svg",
|
||||||
|
width: 40%,
|
||||||
|
), caption: [连接辅助线]) <P7fig2>]
|
||||||
|
))
|
||||||
|
|
||||||
|
下面我们证明 $Q_1 dots.c Q_k $ 也是一个正 $k$ 边形(为了方便描述,我们给出 $Q_1 Q_2=Q_2 Q_3$ 的证明,其它的边之间的相等关系是同理可证的)。如图 @P7fig2,连接 $P_1 Q_1$、$P_1 Q_2$、$P_2 Q_2$、$P_2 Q_3$ 以及 $P_3 Q_3$ 五条线段。由于正多边的每个内角和每条边都相等,在 $trig P_1 P_2 Q_2$ 和 $trig P_2 P_3 Q_3$ 中,我们有
|
||||||
|
|
||||||
|
$ cases(P_1 P_2=P_2 P_3,angle P_1 P_2 Q_2=angle P_2 P_3 Q_3,P_2 Q_2=P_3 Q_3) $
|
||||||
|
|
||||||
|
所以 $trig P_1 P_2 Q_2 tilde.eqq trig P_2 P_3 Q_3$(SAS),于是 $P_1 Q_2=P_2 Q_3$ 以及 $angle Q_2 P_1 Q_1=angle Q_3 P_2 Q_2$。类似的,在 $trig Q_2 P_1 Q_1$ 和 $trig Q_3 P_2 Q_2$ 中,
|
||||||
|
|
||||||
|
$ cases(P_1 Q_2=P_2 Q_3,angle Q_2 P_1 Q_1=angle Q_3 P_2 Q_2,P_1 Q_1=P_2 Q_2) $
|
||||||
|
|
||||||
|
所以 $trig Q_2 P_1 Q_1 tilde.eqq trig Q_3 P_2 Q_2$(SAS),这说明 $Q_1 Q_2=Q_2 Q_3$,于是 $Q_1 dots.c Q_k$ 也是一个正 $k$ 边形。因为 $k>=5$,正 $k$ 边形的每个内角均大于 $90 degree$,故点 $Q_1,dots,Q_k$ 均在多边形 $P_1 dots.c P_k$ 的内部,即多边形 $Q_1 dots.c Q_k$ 的面积小于多边形 $P_1 dots.c P_k$ 的面积,矛盾,故假设不成立。
|
||||||
|
|
||||||
|
综上所述,不存在格点等边三角形,也不存在格点正 $k$ 边形(其中 $k>=5$),故只可能存在格点正方形,原命题得证。
|
||||||
|
|
||||||
|
== 解答 B
|
||||||
|
|
||||||
|
设格点三角形的三个顶点分别为 $A(0,0)$、$B(b_1,b_2)$ 和 $C(c_1,c_2)$。通过平行四边形割补,不难得出 $trig A B C$ 的面积
|
||||||
|
|
||||||
|
#[
|
||||||
|
#show: math_numbering
|
||||||
|
$ S_(trig A B C)=1/2 abs(b_1 c_2 - b_2 c_1) $ <P7solBeq1>
|
||||||
|
]
|
||||||
|
|
||||||
|
是一个有理数,而任意格点多边形都可以划分为若干个不相交的格点三角形。于是我们得出了这样一个引理:任意一个格点多边形的面积均为有理数。
|
||||||
|
|
||||||
|
另一方面,我们知道正多边形的面积公式是
|
||||||
|
|
||||||
|
$ S=(k a^2)/(4 tan pi/k) $
|
||||||
|
|
||||||
|
其中 $k$ 表示该正多边形的边数,$a$ 表示正多边形的边长。若该正多边形至少有一条边的两个端点的横纵坐标均为整数,则 $a^2$ 一定是一个有理数,故正多边形的面积 $S$ 是有理数当且仅当 $tan pi/k$ 是有理数。
|
||||||
|
|
||||||
|
另一方面,由@P7solBeq1 我们知道,一个格点多边形的面积一定是一个有理数,因此我们只需说明“对于任意整数 $k>=3$,只有当 $k=4$ 时 $tan pi/k$ 才是有理数”,即可完成对原命题的论证。下面给出两个证明,其中第二个证明需要较多的代数知识。
|
||||||
|
|
||||||
|
=== 证明 a
|
||||||
|
|
||||||
|
// TODO
|
@ -1,14 +0,0 @@
|
|||||||
<svg width="550" height="356" viewBox="0 0 550 356" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<rect width="550" height="356" fill="white"/>
|
|
||||||
<path d="M19.7071 18.2929C19.3166 17.9024 18.6834 17.9024 18.2929 18.2929L11.9289 24.6569C11.5384 25.0474 11.5384 25.6805 11.9289 26.0711C12.3194 26.4616 12.9526 26.4616 13.3431 26.0711L19 20.4142L24.6568 26.0711C25.0474 26.4616 25.6805 26.4616 26.0711 26.0711C26.4616 25.6805 26.4616 25.0474 26.0711 24.6569L19.7071 18.2929ZM20 336L20 19L18 19L18 336L20 336Z" fill="black"/>
|
|
||||||
<path d="M525.707 336.707C526.098 336.317 526.098 335.683 525.707 335.293L519.343 328.929C518.953 328.538 518.319 328.538 517.929 328.929C517.538 329.319 517.538 329.953 517.929 330.343L523.586 336L517.929 341.657C517.538 342.047 517.538 342.681 517.929 343.071C518.319 343.462 518.953 343.462 519.343 343.071L525.707 336.707ZM19 337H525V335H19V337Z" fill="black"/>
|
|
||||||
<text fill="black" font-family="Stupid, Inria Serif" font-size="24" letter-spacing="0em"><tspan x="34.0469" y="43.9274">Height</tspan></text>
|
|
||||||
<text fill="black" font-family="Stupid, Inria Serif" font-size="24" font-style="italic" letter-spacing="0em"><tspan x="34.0469" y="72.9274">Height</tspan></text>
|
|
||||||
<text fill="black" font-family="Stupid, Inria Serif" font-size="24" font-weight="bold" letter-spacing="0em"><tspan x="34.0469" y="101.927">Height</tspan></text>
|
|
||||||
<text fill="black" font-family="Stupid, Inria Serif" font-size="24" font-style="italic" font-weight="bold" letter-spacing="0em"><tspan x="34.0469" y="130.927">Height</tspan></text>
|
|
||||||
<text fill="black" font-size="22" font-weight="bold" letter-spacing="0em"><tspan x="99.0469" y="278.783">Without family</tspan></text>
|
|
||||||
<text fill="black" font-family="Inter" font-size="22" font-style="italic" letter-spacing="0em"><tspan x="58.0469" y="315">With non-existing family</tspan></text>
|
|
||||||
<text fill="black" font-family="Roboto" font-size="24" letter-spacing="0em" text-decoration="underline"><tspan x="466" y="310.703">Time</tspan></text>
|
|
||||||
<path d="M20 335C20 335 59.8833 265.479 102 241C143.386 216.945 162.368 211.763 210 207C270 201 321.161 208.851 374 178C398.284 163.821 431 134 431 134L518 65" stroke="#2B80FF" stroke-width="2"/>
|
|
||||||
<text transform="translate(428.859 89.5114) rotate(-38.8045)" fill="#2B80FF" xml:space="preserve" style="white-space: pre" font-family="DejaVu Sans Mono" font-size="24" font-weight="bold" letter-spacing="0em"><tspan x="0" y="22.3086">Curve</tspan></text>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 2.4 KiB |
184
scripts/g2s.cpp
@ -4,31 +4,125 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
float XL=0.1;
|
||||||
|
float XR=0.1;
|
||||||
|
float YL=0.1;
|
||||||
|
float YR=0.1;
|
||||||
|
float vertex_R=.1;
|
||||||
|
float border_width=.01;
|
||||||
|
float output_scale = 100;
|
||||||
|
string border_color="#616161";
|
||||||
|
string label = "none";
|
||||||
|
string font_family = "Atkinson Hyperlegible";
|
||||||
|
string font_color = "white";
|
||||||
|
string Xdir="right";
|
||||||
|
string Ydir="down";
|
||||||
|
string output_file="g2s_output.svg";
|
||||||
|
string output_shape="default";
|
||||||
|
map<string,string> mp;
|
||||||
|
|
||||||
|
const map<string,float*> float_map{
|
||||||
|
{"OutputScale",&output_scale}, //输出比例
|
||||||
|
{"XL",&XL}, //左边框留白比例
|
||||||
|
{"XR",&XR}, //右边框留白比例
|
||||||
|
{"YL",&YL}, //上边框留白比例
|
||||||
|
{"YR",&YR}, //下边框留白比例
|
||||||
|
{"R",&vertex_R}, //点的半径
|
||||||
|
{"Thickness",&border_width} //点的边框粗细
|
||||||
|
};
|
||||||
|
const map<string,string*> string_map{
|
||||||
|
{"BorderColor",&border_color}, //点的边框和边的颜色
|
||||||
|
{"Label",&label}, // 标签格式
|
||||||
|
{"FontFamily",&font_family}, // 标签字体
|
||||||
|
{"FontColor",&font_color}, // 标签颜色
|
||||||
|
{"Xaxis",&Xdir}, //x轴正方向
|
||||||
|
{"Yaxis",&Ydir}, //y轴正方向
|
||||||
|
{"OutputFile",&output_file}, //输出文件名
|
||||||
|
{"OutputShape",&output_shape} //输出形状
|
||||||
|
};
|
||||||
|
const map<string,vector<string>> string_configuration{
|
||||||
|
{"Label",{"a","A","1","none"}},
|
||||||
|
{"Xaxis",{"left","right"}},
|
||||||
|
{"Yaxis",{"up","down"}},
|
||||||
|
{"OutputShape",{"default","square"}}
|
||||||
|
};
|
||||||
|
//ColorMap: 颜色映射表
|
||||||
|
|
||||||
|
void getstring(string &s)
|
||||||
|
{
|
||||||
|
getchar();
|
||||||
|
s.clear();
|
||||||
|
char ch=getchar();
|
||||||
|
while(ch!='\"') s+=ch,ch=getchar();
|
||||||
|
}
|
||||||
|
|
||||||
|
void init()
|
||||||
|
{
|
||||||
|
for(int line=1;;line++)
|
||||||
|
{
|
||||||
|
char ch=getchar();
|
||||||
|
while(ch!='-'&&!isalpha(ch)) ch=getchar();
|
||||||
|
if(ch=='-')
|
||||||
|
{
|
||||||
|
while(ch=='-') ch=getchar();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
string s;
|
||||||
|
while(isalpha(ch)) s+=ch,ch=getchar();
|
||||||
|
|
||||||
|
if(float_map.find(s)!=float_map.end()) cin>>*(float_map.at(s));
|
||||||
|
else if(string_map.find(s)!=string_map.end())
|
||||||
|
{
|
||||||
|
getstring(*(string_map.at(s)));
|
||||||
|
if(string_configuration.find(s)!=string_configuration.end())
|
||||||
|
{
|
||||||
|
bool bel=0;
|
||||||
|
auto vec=string_configuration.at(s);
|
||||||
|
s=*string_map.at(s);
|
||||||
|
for(string t:vec) bel|=(s==t);
|
||||||
|
if(!bel)
|
||||||
|
{
|
||||||
|
fprintf(stderr,R"(Error: Line %d.
|
||||||
|
Expected = "%s")",line,vec[0].c_str());
|
||||||
|
for(size_t i=1;i+1<vec.size();i++)
|
||||||
|
fprintf(stderr,R"(, "%s")",vec[i].c_str());
|
||||||
|
if(vec.size()>1)
|
||||||
|
fprintf(stderr,R"( or "%s")",vec.back().c_str());
|
||||||
|
fprintf(stderr,".\n");
|
||||||
|
fprintf(stderr,R"(found = "%s".)",s.c_str());
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(s=="ColorMap")
|
||||||
|
{
|
||||||
|
s.clear();
|
||||||
|
ch=getchar();
|
||||||
|
while(ch!='=') s+=ch,ch=getchar();
|
||||||
|
getstring(mp[s]);
|
||||||
|
}
|
||||||
|
else if(s=="LabelMap")
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
} else {
|
||||||
|
fprintf(stderr,R"(Error: Line %d. "%s" is not a valid option.)",line,s.c_str());
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
struct vec
|
struct vec
|
||||||
{
|
{
|
||||||
float x,y;
|
float x,y;
|
||||||
void operator += (const vec &a) {x+=a.x,y+=a.y;}
|
void operator += (vec a) {x+=a.x,y+=a.y;}
|
||||||
void operator -= (const vec &a) {x-=a.x,y-=a.y;}
|
void operator -= (vec a) {x-=a.x,y-=a.y;}
|
||||||
void operator *= (float a) {x*=a,y*=a;}
|
void operator *= (float a) {x*=a,y*=a;}
|
||||||
vec operator + (const vec &a) const {vec b=(*this);b+=a;return b;}
|
vec operator + (vec a) const {vec b=(*this);b+=a;return b;}
|
||||||
vec operator - (const vec &a) const {vec b=(*this);b-=a;return b;}
|
vec operator - (vec a) const {vec b=(*this);b-=a;return b;}
|
||||||
vec operator * (float a) const {vec b=(*this);b*=a;return b;}
|
vec operator * (float a) const {vec b=(*this);b*=a;return b;}
|
||||||
float norm(){return sqrt(x*x+y*y);}
|
float norm() const {return sqrt(x*x+y*y);}
|
||||||
}p[N];
|
}p[N];
|
||||||
|
|
||||||
const float XL=0.1; //左边框留白比例
|
|
||||||
const float XR=0.1; //右边框留白比例
|
|
||||||
const float YL=0.1; //上边框留白比例
|
|
||||||
const float YR=0.1; //下边框留白比例
|
|
||||||
const float vertex_R=.1; //点的半径
|
|
||||||
const float border_width=.01; //点的边框粗细
|
|
||||||
const string border_color="#616161"; //点的边框和边的颜色
|
|
||||||
const map<string,string> mp{{"b","#29B6F6"},{"r","#FF7043"}}; //颜色映射表
|
|
||||||
const string label = "A"; // 标签格式
|
|
||||||
const string font_family = "Ubuntu Mono"; // 字体
|
|
||||||
const string font_color = "white"; // 标签颜色
|
|
||||||
const float output_scale = 100;
|
|
||||||
|
|
||||||
vec calc(vec a,vec b)
|
vec calc(vec a,vec b)
|
||||||
{
|
{
|
||||||
vec c=b-a;
|
vec c=b-a;
|
||||||
@ -40,32 +134,47 @@ int n,m;
|
|||||||
float minX,minY,maxX,maxY;
|
float minX,minY,maxX,maxY;
|
||||||
string pc[N];
|
string pc[N];
|
||||||
|
|
||||||
void printhelp(const char* name)
|
void printhelp(char* name)
|
||||||
{
|
{
|
||||||
printf(
|
printf(
|
||||||
"g2s the 6east svg graph generator, built on %s.\n"
|
"g2s the 6east svg graph generator, built on %s.\n"
|
||||||
"Usage: %s <inputfile> <outputfile>\n"
|
"Usage: %s <inputfile>\n"
|
||||||
,__DATE__,name);
|
,__DATE__,name);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc,char** argv)
|
int main(int argc,char** argv)
|
||||||
{
|
{
|
||||||
if(argc!=3) printhelp(argv[0]);
|
if(argc!=2) printhelp(argv[0]);
|
||||||
freopen(argv[1],"r",stdin);
|
freopen(argv[1],"r",stdin);
|
||||||
freopen(argv[2],"w",stdout);
|
|
||||||
|
init();
|
||||||
|
freopen(output_file.c_str(),"w",stdout);
|
||||||
|
vertex_R*=output_scale;
|
||||||
|
border_width*=output_scale;
|
||||||
|
|
||||||
cin>>n; //输入点数(int)
|
cin>>n; //输入点数(int)
|
||||||
for(int i=1;i<=n;i++)
|
for(int i=1;i<=n;i++)
|
||||||
{
|
{
|
||||||
cin>>p[i].x>>p[i].y>>pc[i];
|
cin>>p[i].x>>p[i].y>>pc[i];
|
||||||
//输入第i个点的横坐标(float)、纵坐标(float)、半径(float)和颜色(string)
|
//输入第i个点的横坐标(float)、纵坐标(float)、半径(float)和颜色(string)
|
||||||
|
p[i].x*=output_scale,p[i].y*=output_scale;
|
||||||
|
if(Xdir=="left") p[i].x=-p[i].x;
|
||||||
|
if(Ydir=="up") p[i].y=-p[i].y;
|
||||||
if(mp.find(pc[i])!=mp.end()) pc[i]=mp.find(pc[i])->second;
|
if(mp.find(pc[i])!=mp.end()) pc[i]=mp.find(pc[i])->second;
|
||||||
|
|
||||||
if(i==1) minX=maxX=p[i].x,minY=maxY=p[i].y;
|
if(i==1) minX=maxX=p[i].x,minY=maxY=p[i].y;
|
||||||
if(p[i].x<minX) minX=p[i].x;
|
if(p[i].x<minX) minX=p[i].x;
|
||||||
else if(p[i].x>maxX) maxX=p[i].x;
|
else if(p[i].x>maxX) maxX=p[i].x;
|
||||||
if(p[i].y<minY) minY=p[i].y;
|
if(p[i].y<minY) minY=p[i].y;
|
||||||
else if(p[i].y>maxY) maxY=p[i].y;
|
else if(p[i].y>maxY) maxY=p[i].y;
|
||||||
}
|
}
|
||||||
|
if(output_shape=="square")
|
||||||
|
{
|
||||||
|
float delta=((maxX-minX)-(maxY-minY))*0.5;
|
||||||
|
if(delta>0) minY-=delta,maxY+=delta;
|
||||||
|
else delta=-delta,minX-=delta,maxX+=delta;
|
||||||
|
}
|
||||||
minX-=vertex_R,minY-=vertex_R;
|
minX-=vertex_R,minY-=vertex_R;
|
||||||
maxX+=vertex_R,maxY+=vertex_R;
|
maxX+=vertex_R,maxY+=vertex_R;
|
||||||
float X=minX-(maxX-minX)*XL;
|
float X=minX-(maxX-minX)*XL;
|
||||||
@ -73,18 +182,17 @@ int main(int argc,char** argv)
|
|||||||
for(int i=1;i<=n;i++) p[i].x-=X,p[i].y-=Y;
|
for(int i=1;i<=n;i++) p[i].x-=X,p[i].y-=Y;
|
||||||
X=(maxX-X)+(maxX-minX)*XR;
|
X=(maxX-X)+(maxX-minX)*XR;
|
||||||
Y=(maxY-Y)+(maxY-minY)*YR;
|
Y=(maxY-Y)+(maxY-minY)*YR;
|
||||||
|
|
||||||
printf(R"(<?xml version="1.0" encoding="UTF-8"?>
|
printf(R"(<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="%f" height="%f" viewBox="0 0 %f %f" version="1.1">)",
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="%f" height="%f" viewBox="0 0 %f %f" version="1.1">
|
||||||
X * output_scale, Y * output_scale, X * output_scale, Y * output_scale);
|
)", X, Y, X, Y);
|
||||||
|
|
||||||
for(int i=1;i<=n;i++)
|
for(int i=1;i<=n;i++)
|
||||||
{
|
{
|
||||||
cout<<"<circle style=\"fill-rule:evenodd;fill:"<<pc[i]<<
|
printf(R"(<circle style="fill-rule:evenodd;fill:%s;fill-opacity:1;stroke-width:%f;stroke-linecap:square;stroke-linejoin:miter;stroke:%s;stroke-miterlimit:%f;" cx="%f" cy="%f" r="%f"/>
|
||||||
";fill-opacity:1;stroke-width:"<<border_width*output_scale<<
|
)",pc[i].c_str(),border_width,border_color.c_str(),border_width*0.7,p[i].x,p[i].y,vertex_R);
|
||||||
";stroke-linecap:square;stroke-linejoin:miter;stroke:"<<border_color<<
|
|
||||||
";stroke-miterlimit:"<<border_width*0.7*output_scale<<
|
|
||||||
";\" cx=\""<<p[i].x*output_scale<<"\" cy=\""<<p[i].y*output_scale<<"\" r=\""<<vertex_R*output_scale<<"\"/>"<<endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cin>>m; //输入边数(int)
|
cin>>m; //输入边数(int)
|
||||||
for(int i=1;i<=m;i++)
|
for(int i=1;i<=m;i++)
|
||||||
{
|
{
|
||||||
@ -92,17 +200,23 @@ int main(int argc,char** argv)
|
|||||||
cin>>a>>b; //输入端点编号(int[1,n])
|
cin>>a>>b; //输入端点编号(int[1,n])
|
||||||
vec A=calc(p[a],p[b]);
|
vec A=calc(p[a],p[b]);
|
||||||
vec B=calc(p[b],p[a]);
|
vec B=calc(p[b],p[a]);
|
||||||
cout<<"<path style=\"fill:none;stroke-width:"<<border_width*output_scale<<
|
printf(R"(<path style="fill:none;stroke-width:%f;stroke-linecap:butt;stroke-linejoin:miter;stroke:%s;stroke-miterlimit:%f;" d="M %f %f L %f %f "/>
|
||||||
";stroke-linecap:butt;stroke-linejoin:miter;stroke:"<<border_color<<
|
)",border_width,border_color.c_str(),border_width*0.7,A.x,A.y,B.x,B.y);
|
||||||
";stroke-miterlimit:"<<border_width*0.7*output_scale<<
|
|
||||||
";\" d=\"M "<<A.x*output_scale<<" "<<A.y*output_scale<<" L "<<B.x*output_scale<<" "<<B.y*output_scale<<" \"/>"<<endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (label == "A" || label == "a") {
|
if (label == "A" || label == "a") {
|
||||||
for (int i = 1; i <= n; ++i) {
|
for (int i = 1; i <= n; ++i) {
|
||||||
printf(R"(<text font-family="%s" fill="%s" font-size="%f" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="%f" y="%f">%c</tspan></text>
|
printf(R"(<text font-family="%s" fill="%s" font-size="%f" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="%f" y="%f">%c</tspan></text>
|
||||||
)", font_family.c_str(), font_color.c_str(), vertex_R * output_scale, p[i].x * output_scale, p[i].y * output_scale, i + label[0] - 1);
|
)", font_family.c_str(), font_color.c_str(), vertex_R, p[i].x, p[i].y, i + label[0] - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cout<<"</svg>"<<endl;
|
else if(label=="1")
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= n; ++i) {
|
||||||
|
printf(R"(<text font-family="%s" fill="%s" font-size="%f" style="text-anchor: middle;dominant-baseline: middle;"><tspan x="%f" y="%f">%d</tspan></text>
|
||||||
|
)", font_family.c_str(), font_color.c_str(), vertex_R, p[i].x, p[i].y, i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
puts("</svg>");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
40
template.typ
@ -1,7 +1,6 @@
|
|||||||
#let cnfont = ("Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans CN")
|
#let cnfont = ("Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans CN")
|
||||||
#let cnmainfont = ("Noto Serif CJK SC", "Source Han Serif CN")
|
#let cnmainfont = ("Noto Serif CJK SC", "Source Han Serif CN")
|
||||||
|
#let labelfont = ("Atkinson Hyperlegible")
|
||||||
#let mtext(body) = text(font: cnmainfont, weight: "regular", body)
|
|
||||||
|
|
||||||
#let tab = h(2em)
|
#let tab = h(2em)
|
||||||
#let halftab = h(1em)
|
#let halftab = h(1em)
|
||||||
@ -10,12 +9,7 @@
|
|||||||
#let skip_footer = state("skip_footer", false)
|
#let skip_footer = state("skip_footer", false)
|
||||||
|
|
||||||
#let thispage_number(loc) = {
|
#let thispage_number(loc) = {
|
||||||
let numberstarter = query(<PageNumberingStated>, before: loc)
|
counter(page).at(loc).first()
|
||||||
if numberstarter == () {
|
|
||||||
none
|
|
||||||
} else {
|
|
||||||
loc.page() - numberstarter.first().location().page() + 1
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#let problem_id = counter("pid")
|
#let problem_id = counter("pid")
|
||||||
@ -24,9 +18,10 @@
|
|||||||
set document(title: title)
|
set document(title: title)
|
||||||
set text(font: cnmainfont, lang: "zh")
|
set text(font: cnmainfont, lang: "zh")
|
||||||
set page(
|
set page(
|
||||||
width: 195mm,
|
// width: 195mm,
|
||||||
height: 270mm,
|
// height: 270mm,
|
||||||
margin: (top: 20mm)
|
// margin: (top: 20mm)
|
||||||
|
paper: "iso-b5"
|
||||||
)
|
)
|
||||||
|
|
||||||
show par: set block(above: 1.2em, below: 1.2em)
|
show par: set block(above: 1.2em, below: 1.2em)
|
||||||
@ -35,8 +30,10 @@
|
|||||||
set ref(supplement: it => {
|
set ref(supplement: it => {
|
||||||
if it.func() == math.equation {
|
if it.func() == math.equation {
|
||||||
"式"
|
"式"
|
||||||
|
} else if it.func() == figure {
|
||||||
|
""
|
||||||
} else {
|
} else {
|
||||||
auto
|
"Typset Error!"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -56,32 +53,35 @@
|
|||||||
|
|
||||||
outline(depth: 1)
|
outline(depth: 1)
|
||||||
[
|
[
|
||||||
#counter(page).update(1)
|
|
||||||
<PageNumberingStated>
|
|
||||||
#set page(footer: locate(loc => {
|
#set page(footer: locate(loc => {
|
||||||
if skip_footer.at(loc) {
|
if skip_footer.at(loc) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let thispage = thispage_number(loc)
|
let thispage = thispage_number(loc)
|
||||||
let is_mainpart = query(<MainStarted>, before: loc) != ()
|
let is_mainpart = query(selector(<MainStarted>).before(loc), loc) != ()
|
||||||
let is_mainpart = true
|
|
||||||
let footer_content = if is_mainpart {
|
let footer_content = if is_mainpart {
|
||||||
[\##problem_id.at(loc).first() #footer_title.at(loc)]
|
[\##problem_id.at(loc).first() #footer_title.at(loc)]
|
||||||
|
} else {
|
||||||
|
none
|
||||||
}
|
}
|
||||||
|
|
||||||
let isleft = calc.even(thispage)
|
let isleft = calc.even(thispage)
|
||||||
set align(left) if isleft
|
set align(left) if isleft
|
||||||
set align(right) if not isleft
|
set align(right) if not isleft
|
||||||
if isleft { [#thispage] }
|
set text(font: cnmainfont)
|
||||||
[ #halftab #underline(offset: 2pt, footer_content) #halftab ]
|
stack(dir: if isleft { ltr } else { rtl },
|
||||||
if not isleft { [#thispage] }
|
spacing: 1em,
|
||||||
|
str(thispage),
|
||||||
|
[#underline(offset: 2pt, footer_content)]
|
||||||
|
)
|
||||||
}))
|
}))
|
||||||
|
|
||||||
// Main body.
|
// Main body.
|
||||||
#set par(justify: true)
|
#set par(justify: true)
|
||||||
#set text(15pt)
|
#set text(13pt)
|
||||||
|
|
||||||
|
#counter(page).update(1)
|
||||||
#body
|
#body
|
||||||
]
|
]
|
||||||
}
|
}
|