Files

57 lines
6.2 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<svg xmlns="http://www.w3.org/2000/svg" width="1000" height="590" viewBox="0 0 1000 590" 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="1000" height="590" fill="white"/>
<g font-family="Microsoft YaHei, Noto Sans CJK SC, Arial, sans-serif" fill="#193b32" stroke-linecap="round" stroke-linejoin="round">
<rect x="20" y="30" width="450" height="155" rx="0" fill="white" stroke="#417b63" stroke-width="2"/>
<rect x="20" y="30" width="160" height="55" rx="0" fill="#edf5ed" stroke="#417b63" stroke-width="2"/>
<text x="100.0" y="57.5" text-anchor="middle" dominant-baseline="central" font-size="21" fill="#193b32">int main()</text>
<line x1="180" y1="30" x2="180" y2="185" stroke="#417b63" stroke-width="2"/>
<text x="100.0" y="140.0" text-anchor="middle" dominant-baseline="central" font-size="21" fill="#193b32"></text>
<text x="325.0" y="98.9" text-anchor="middle" dominant-baseline="central" font-size="23" fill="#193b32">f(n)</text>
<text x="325.0" y="131.1" text-anchor="middle" dominant-baseline="central" font-size="23" fill="#193b32">3</text>
<rect x="510" y="30" width="450" height="155" rx="0" fill="white" stroke="#417b63" stroke-width="2"/>
<rect x="510" y="30" width="160" height="55" rx="0" fill="#edf5ed" stroke="#417b63" stroke-width="2"/>
<text x="590.0" y="57.5" text-anchor="middle" dominant-baseline="central" font-size="21" fill="#193b32">int f()</text>
<line x1="670" y1="30" x2="670" y2="185" stroke="#417b63" stroke-width="2"/>
<text x="590.0" y="125.3" text-anchor="middle" dominant-baseline="central" font-size="21" fill="#193b32">[x]</text>
<text x="590.0" y="154.7" text-anchor="middle" dominant-baseline="central" font-size="21" fill="#193b32">[2]</text>
<text x="815.0" y="98.9" text-anchor="middle" dominant-baseline="central" font-size="23" fill="#193b32">f(x−1)</text>
<text x="815.0" y="131.1" text-anchor="middle" dominant-baseline="central" font-size="23" fill="#193b32">1</text>
<rect x="190" y="350" width="450" height="155" rx="0" fill="white" stroke="#417b63" stroke-width="2"/>
<rect x="190" y="350" width="160" height="55" rx="0" fill="#edf5ed" stroke="#417b63" stroke-width="2"/>
<text x="270.0" y="377.5" text-anchor="middle" dominant-baseline="central" font-size="21" fill="#193b32">int f()</text>
<line x1="350" y1="350" x2="350" y2="505" stroke="#417b63" stroke-width="2"/>
<text x="270.0" y="445.3" text-anchor="middle" dominant-baseline="central" font-size="21" fill="#193b32">[x]</text>
<text x="270.0" y="474.7" text-anchor="middle" dominant-baseline="central" font-size="21" fill="#193b32">[3]</text>
<text x="495.0" y="418.9" text-anchor="middle" dominant-baseline="central" font-size="23" fill="#193b32">f(x−1)</text>
<text x="495.0" y="451.1" text-anchor="middle" dominant-baseline="central" font-size="23" fill="#193b32">2</text>
<rect x="700" y="350" width="275" height="155" rx="0" fill="white" stroke="#417b63" stroke-width="2"/>
<rect x="700" y="350" width="120" height="55" rx="0" fill="#edf5ed" stroke="#417b63" stroke-width="2"/>
<text x="760.0" y="377.5" text-anchor="middle" dominant-baseline="central" font-size="21" fill="#193b32">int f()</text>
<line x1="820" y1="350" x2="820" y2="505" stroke="#417b63" stroke-width="2"/>
<text x="760.0" y="445.3" text-anchor="middle" dominant-baseline="central" font-size="21" fill="#193b32">[x]</text>
<text x="760.0" y="474.7" text-anchor="middle" dominant-baseline="central" font-size="21" fill="#193b32">[1]</text>
<text x="897.5" y="435.0" text-anchor="middle" dominant-baseline="central" font-size="23" fill="#193b32">1</text>
<path d="M310 160 Q225 220 255 345" fill="none" stroke="#417b63" stroke-width="2" marker-end="url(#arrow)" stroke-dasharray="6 5"/>
<text x="180" y="245.0" text-anchor="middle" dominant-baseline="central" font-size="20" fill="#193b32">① 传参[3]</text>
<path d="M560 425 Q575 260 595 190" fill="none" stroke="#417b63" stroke-width="2" marker-end="url(#arrow)" stroke-dasharray="6 5"/>
<text x="608" y="274.0" text-anchor="middle" dominant-baseline="central" font-size="20" fill="#193b32">② 传参[2]</text>
<path d="M860 165 Q825 260 795 345" fill="none" stroke="#417b63" stroke-width="2" marker-end="url(#arrow)" stroke-dasharray="6 5"/>
<text x="846" y="243.0" text-anchor="middle" dominant-baseline="central" font-size="20" fill="#193b32">③ 传参[1]</text>
<path d="M963 392 Q998 230 930 180" fill="none" stroke="#417b63" stroke-width="2" marker-end="url(#arrow)"/>
<text x="940" y="297.0" text-anchor="middle" dominant-baseline="central" font-size="20" fill="#193b32">④ 返回1</text>
<path d="M715 187 Q735 290 610 350" fill="none" stroke="#417b63" stroke-width="2" marker-end="url(#arrow)"/>
<text x="720" y="316.0" text-anchor="middle" dominant-baseline="central" font-size="20" fill="#193b32">⑤ 返回2</text>
<path d="M620 350 Q650 230 400 160" fill="none" stroke="#417b63" stroke-width="2" marker-end="url(#arrow)"/>
<text x="440" y="215.0" text-anchor="middle" dominant-baseline="central" font-size="20" fill="#193b32">⑥ 返回6</text>
<line x1="30" y1="550" x2="110" y2="550" stroke="#417b63" stroke-width="2" marker-end="url(#arrow)" stroke-dasharray="6 5"/>
<text x="170" y="550.0" text-anchor="middle" dominant-baseline="central" font-size="20" fill="#193b32">传参路径</text>
<line x1="295" y1="550" x2="375" y2="550" stroke="#417b63" stroke-width="2" marker-end="url(#arrow)"/>
<text x="435" y="550.0" text-anchor="middle" dominant-baseline="central" font-size="20" fill="#193b32">返回路径</text>
<rect x="546" y="258" width="124" height="32" rx="0" fill="white" stroke="#417b63" stroke-width="2"/>
<text x="608" y="274.0" text-anchor="middle" dominant-baseline="central" font-size="20" fill="#193b32">② 传参[2]</text>
<rect x="784" y="227" width="124" height="32" rx="0" fill="white" stroke="#417b63" stroke-width="2"/>
<text x="846" y="243.0" text-anchor="middle" dominant-baseline="central" font-size="20" fill="#193b32">③ 传参[1]</text>
</g></svg>