📄 3.3 图元输出与输出属性.htm
字号:
</FONT></SPAN><FONT face=楷体_GB2312 size=4><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">定义当前位置</SPAN><SPAN
lang=EN-US>(Current Position)</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">为</SPAN><SPAN
lang=EN-US>x,y</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">。当初始化启动图形软件后,当前位置自动定义为</SPAN><SPAN
lang=EN-US>(0</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">,</SPAN><SPAN
lang=EN-US>0)</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">。用户须用此命令将当前位置移到作图的起始点。</SPAN></FONT></P>
<P class=MsoNormal
style="MARGIN: 1px 0px; TEXT-INDENT: 0px; LINE-HEIGHT: 200%"><SPAN lang=EN-US
style="mso-spacerun: yes"><FONT face=楷体_GB2312 size=4>
</FONT></SPAN><FONT face=楷体_GB2312 size=4><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">二、</SPAN><SPAN
lang=EN-US>line(x,y)</SPAN></FONT></P>
<P class=MsoNormal
style="MARGIN: 1px 0px; TEXT-INDENT: 0px; LINE-HEIGHT: 200%"><SPAN lang=EN-US
style="mso-spacerun: yes"><FONT face=楷体_GB2312 size=4>
</FONT></SPAN><FONT face=楷体_GB2312 size=4><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">以当前位置为起点,</SPAN><SPAN
lang=EN-US>x,y</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">为终点,画一条直线段。当</SPAN><SPAN
lang=EN-US>(x,y)</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">等于当前位置时,此命令实现了画点功能。</SPAN></FONT></P>
<P class=MsoNormal
style="MARGIN: 1px 0px; TEXT-INDENT: 0px; LINE-HEIGHT: 200%"><SPAN lang=EN-US
style="mso-spacerun: yes"><FONT face=楷体_GB2312 size=4>
</FONT></SPAN><FONT face=楷体_GB2312 size=4><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">三、</SPAN><SPAN
lang=EN-US>polyline(n,x_array, y_array)</SPAN></FONT></P>
<P class=MsoNormal
style="MARGIN: 1px 0px; TEXT-INDENT: 0px; LINE-HEIGHT: 200%"><SPAN lang=EN-US
style="mso-spacerun: yes"><FONT face=楷体_GB2312 size=4>
</FONT></SPAN><FONT face=楷体_GB2312 size=4><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">参数中的</SPAN><SPAN
lang=EN-US>x_array</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">和</SPAN><SPAN
lang=EN-US>y_array</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">是两个一维数组,每个数组的长度为</SPAN><SPAN
lang=EN-US>n</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">。本命令画一条有</SPAN><SPAN
lang=EN-US>n</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">+1个顶点</SPAN><SPAN
lang=EN-US>(</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">包括两个端点</SPAN><SPAN
lang=EN-US>)</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">的折线。每一个顶点在当前位置,其余</SPAN><SPAN
lang=EN-US>n</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">个项点位置由</SPAN><SPAN
lang=EN-US>x_array</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">和</SPAN><SPAN
lang=EN-US>y_array</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">中的值</SPAN><SPAN
lang=EN-US>(</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">分别代表顶点的</SPAN><SPAN
lang=EN-US>x,y</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">坐标</SPAN><SPAN
lang=EN-US>)</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">决定。</SPAN></FONT></P>
<P class=MsoNormal
style="MARGIN: 1px 0px; TEXT-INDENT: 0px; LINE-HEIGHT: 200%"><SPAN lang=EN-US
style="mso-spacerun: yes"><FONT face=楷体_GB2312 size=4>
</FONT></SPAN><FONT face=楷体_GB2312 size=4><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">例</SPAN><SPAN
lang=EN-US>1<SPAN style="mso-spacerun: yes"> </SPAN></SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">设有两个数组内容如下:</SPAN></FONT></P>
<P class=MsoNormal
style="MARGIN: 1px 0px; TEXT-INDENT: 0px; LINE-HEIGHT: 200%"><SPAN
lang=EN-US><SPAN style="mso-spacerun: yes"><FONT face=楷体_GB2312
size=4> </FONT></SPAN><FONT face=楷体_GB2312
size=4>xlist</FONT></SPAN><FONT face=楷体_GB2312 size=4><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">={</SPAN><SPAN
lang=EN-US>3</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">,</SPAN><SPAN
lang=EN-US>5</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">,</SPAN><SPAN
lang=EN-US>5</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">,</SPAN><SPAN
lang=EN-US>2</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">,</SPAN><SPAN
lang=EN-US>2</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">,</SPAN><SPAN
lang=EN-US>5</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">}</SPAN></FONT></P>
<P class=MsoNormal
style="MARGIN: 1px 0px; TEXT-INDENT: 0px; LINE-HEIGHT: 200%"><SPAN
lang=EN-US><SPAN style="mso-spacerun: yes"><FONT face=楷体_GB2312
size=4> </FONT></SPAN><FONT face=楷体_GB2312
size=4>ylist</FONT></SPAN><FONT face=楷体_GB2312 size=4><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">={</SPAN><SPAN
lang=EN-US>2</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">,</SPAN><SPAN
lang=EN-US>2</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">,</SPAN><SPAN
lang=EN-US>5</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">,</SPAN><SPAN
lang=EN-US>5</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">,</SPAN><SPAN
lang=EN-US>7</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">,</SPAN><SPAN
lang=EN-US>7</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">}</SPAN></FONT></P>
<P class=MsoNormal
style="MARGIN: 1px 0px; TEXT-INDENT: 0px; LINE-HEIGHT: 200%"><FONT
face=楷体_GB2312 size=4><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">下面两条命令画出图</SPAN><SPAN
lang=EN-US>3.25</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">中的“</SPAN><SPAN
lang=EN-US>5</SPAN><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">”字:</SPAN></FONT></P>
<P class=MsoNormal
style="MARGIN: 1px 0px; TEXT-INDENT: 0px; LINE-HEIGHT: 200%"><SPAN
lang=EN-US><FONT face=楷体_GB2312 size=4>move(2,3);</FONT></SPAN></P>
<P class=MsoNormal
style="MARGIN: 1px 0px; TEXT-INDENT: 0px; LINE-HEIGHT: 200%"><SPAN
lang=EN-US><FONT face=楷体_GB2312
size=4>polyline(6,xlist,ylist);</FONT></SPAN></P>
<P class=MsoNormal
style="MARGIN: 1px 0px; TEXT-INDENT: 0px; LINE-HEIGHT: 200%"><FONT
face=楷体_GB2312 size=4><IMG height=159 src="3.3 图元输出与输出属性.files/image002.gif"
width=180 border=0></FONT></P>
<P class=MsoNormal
style="MARGIN: 1px 0px; TEXT-INDENT: 0px; LINE-HEIGHT: 200%"><FONT
face=楷体_GB2312 size=4><SPAN
style="mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">图</SPAN><SPAN
lang=EN-US>3.25</SPAN></FONT><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"></SPAN></P></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -