54 lines
6.0 KiB
XML
54 lines
6.0 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" width="880" height="740" viewBox="0 0 880 740" role="img" aria-labelledby="title desc">
|
||
<title id="title">距离函数的嵌套调用</title>
|
||
<desc id="desc">根据教材扫描图人工重绘的矢量教学示意图。文字与线条可无损缩放。</desc>
|
||
<defs><marker id="arrow" markerWidth="9" markerHeight="9" refX="8" refY="4.5" orient="auto" markerUnits="userSpaceOnUse"><path d="M0 0 L9 4.5 L0 9 Z" fill="#417b63"/></marker></defs>
|
||
<rect width="880" height="740" fill="white"/>
|
||
<g font-family="Microsoft YaHei, Noto Sans CJK SC, Arial, sans-serif" fill="#193b32" stroke-linecap="round" stroke-linejoin="round">
|
||
<rect x="25" y="20" width="250" height="55" rx="0" fill="#edf5ed" stroke="#417b63" stroke-width="2"/>
|
||
<text x="150.0" y="47.5" text-anchor="middle" dominant-baseline="central" font-size="21" fill="#193b32">double sq()</text>
|
||
<rect x="25" y="75" width="250" height="90" rx="0" fill="#edf5ed" stroke="#417b63" stroke-width="2"/>
|
||
<text x="150.0" y="105.3" text-anchor="middle" dominant-baseline="central" font-size="21" fill="#193b32">[x]</text>
|
||
<text x="150.0" y="134.7" text-anchor="middle" dominant-baseline="central" font-size="21" fill="#193b32">[3]</text>
|
||
<rect x="275" y="20" width="110" height="145" rx="0" fill="#edf5ed" stroke="#417b63" stroke-width="2"/>
|
||
<text x="330.0" y="92.5" text-anchor="middle" dominant-baseline="central" font-size="21" fill="#193b32">x*x</text>
|
||
<rect x="475" y="20" width="250" height="55" rx="0" fill="#edf5ed" stroke="#417b63" stroke-width="2"/>
|
||
<text x="600.0" y="47.5" text-anchor="middle" dominant-baseline="central" font-size="21" fill="#193b32">double sq()</text>
|
||
<rect x="475" y="75" width="250" height="90" rx="0" fill="#edf5ed" stroke="#417b63" stroke-width="2"/>
|
||
<text x="600.0" y="105.3" text-anchor="middle" dominant-baseline="central" font-size="21" fill="#193b32">[x]</text>
|
||
<text x="600.0" y="134.7" text-anchor="middle" dominant-baseline="central" font-size="21" fill="#193b32">[−4]</text>
|
||
<rect x="725" y="20" width="110" height="145" rx="0" fill="#edf5ed" stroke="#417b63" stroke-width="2"/>
|
||
<text x="780.0" y="92.5" text-anchor="middle" dominant-baseline="central" font-size="21" fill="#193b32">x*x</text>
|
||
<rect x="25" y="325" width="810" height="150" rx="0" fill="white" stroke="#417b63" stroke-width="2"/>
|
||
<rect x="25" y="325" width="265" height="55" rx="0" fill="#edf5ed" stroke="#417b63" stroke-width="2"/>
|
||
<text x="157.5" y="352.5" text-anchor="middle" dominant-baseline="central" font-size="21" fill="#193b32">double dist()</text>
|
||
<text x="157" y="409.6" text-anchor="middle" dominant-baseline="central" font-size="22" fill="#193b32">[x1,y1,x2,y2]</text>
|
||
<text x="157" y="440.4" text-anchor="middle" dominant-baseline="central" font-size="22" fill="#193b32">[3,0,0,4]</text>
|
||
<rect x="315" y="352" width="235" height="96" rx="10" fill="white" stroke="#417b63" stroke-width="2" stroke-dasharray="7 5"/>
|
||
<text x="432" y="384.6" text-anchor="middle" dominant-baseline="central" font-size="22" fill="#193b32">sq(x1−x2);</text>
|
||
<text x="432" y="415.4" text-anchor="middle" dominant-baseline="central" font-size="22" fill="#193b32">3−0</text>
|
||
<rect x="570" y="352" width="235" height="96" rx="10" fill="white" stroke="#417b63" stroke-width="2" stroke-dasharray="7 5"/>
|
||
<text x="687" y="384.6" text-anchor="middle" dominant-baseline="central" font-size="22" fill="#193b32">sq(y1−y2);</text>
|
||
<text x="687" y="415.4" text-anchor="middle" dominant-baseline="central" font-size="22" fill="#193b32">0−4</text>
|
||
<rect x="25" y="620" width="810" height="100" rx="0" fill="white" stroke="#417b63" stroke-width="2"/>
|
||
<rect x="25" y="620" width="245" height="50" rx="0" fill="#edf5ed" stroke="#417b63" stroke-width="2"/>
|
||
<text x="147.5" y="645.0" text-anchor="middle" dominant-baseline="central" font-size="21" fill="#193b32">int main()</text>
|
||
<rect x="350" y="632" width="340" height="76" rx="8" fill="white" stroke="#417b63" stroke-width="2" stroke-dasharray="7 5"/>
|
||
<text x="520" y="654.6" text-anchor="middle" dominant-baseline="central" font-size="22" fill="#193b32">dist(x2,y2,x3,y3)</text>
|
||
<text x="520" y="685.4" text-anchor="middle" dominant-baseline="central" font-size="22" fill="#193b32">[3,0,0,4]</text>
|
||
<path d="M315 395 C155 335 150 235 150 169" fill="none" stroke="#417b63" stroke-width="2" marker-end="url(#arrow)" stroke-dasharray="6 5"/>
|
||
<text x="114" y="241.0" text-anchor="middle" dominant-baseline="central" font-size="22" fill="#193b32">传参[3]</text>
|
||
<path d="M330 120 C365 200 410 270 420 345" fill="none" stroke="#417b63" stroke-width="2" marker-end="url(#arrow)"/>
|
||
<text x="367" y="240.0" text-anchor="middle" dominant-baseline="central" font-size="22" fill="#193b32">返回9.0</text>
|
||
<path d="M582 395 C532 310 530 200 530 125" fill="none" stroke="#417b63" stroke-width="2" marker-end="url(#arrow)" stroke-dasharray="6 5"/>
|
||
<text x="605" y="252.0" text-anchor="middle" dominant-baseline="central" font-size="22" fill="#193b32">传参[−4]</text>
|
||
<path d="M787 140 V345" fill="none" stroke="#417b63" stroke-width="2" marker-end="url(#arrow)"/>
|
||
<text x="805" y="260.0" text-anchor="middle" dominant-baseline="central" font-size="19" fill="#193b32">返回16.0</text>
|
||
<path d="M350 658 C195 605 170 540 170 480" fill="none" stroke="#417b63" stroke-width="2" marker-end="url(#arrow)" stroke-dasharray="6 5"/>
|
||
<text x="120" y="552.0" text-anchor="middle" dominant-baseline="central" font-size="20" fill="#193b32">传参[3,0,0,4]</text>
|
||
<path d="M700 452 Q630 550 605 627" fill="none" stroke="#417b63" stroke-width="2" marker-end="url(#arrow)"/>
|
||
<text x="723" y="552.0" text-anchor="middle" dominant-baseline="central" font-size="22" fill="#193b32">返回5.0</text>
|
||
<rect x="304" y="223" width="126" height="34" rx="0" fill="white" stroke="#417b63" stroke-width="2"/>
|
||
<text x="367" y="240.0" text-anchor="middle" dominant-baseline="central" font-size="20" fill="#193b32">返回9.0</text>
|
||
<rect x="742" y="243" width="126" height="34" rx="0" fill="white" stroke="#417b63" stroke-width="2"/>
|
||
<text x="805" y="260.0" text-anchor="middle" dominant-baseline="central" font-size="20" fill="#193b32">返回16.0</text>
|
||
</g></svg> |