<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[计算两点之间距离的运算积木]]></title><description><![CDATA[<p dir="auto"> </p>
<h2><a class="anchor-offset" name="先修科目"></a>先修科目</h2>
<ul>
<li><a href="/topic/461/%E7%BB%84%E8%A3%85%E7%A7%AF%E6%9C%A8">组装积木</a></li>
</ul>
<p dir="auto"> </p>
<h2><a class="anchor-offset" name="什么是-直线距离-什么是-曼哈顿距离"></a>什么是“直线距离”？什么是“曼哈顿距离”？</h2>
<p dir="auto"><img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/9cfb1ba7-631f-40f0-8ae9-c181e07d7a13.png" width="700" /></p>
<p dir="auto">假如你在上方地图的起点，你想走到终点。如果你沿直线行走，路线的长度就是这两点的直线距离。在地图上用黄线来表示。</p>
<p dir="auto">不过，在很多情况下你无法走直线。比如说，街区之间有房屋和建筑物，就像曼哈顿市一样。在这种情况下，你必须沿着横向街道和纵向街道行走。这些线的总长度就是这两点的“曼哈顿距离”。</p>
<p dir="auto">起点与终点之间的直线距离和曼哈顿距离，下方还有几个例子：<br />
 <br />
<strong>示例1：</strong><br />
<img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/e75f5035-cbcb-4b0c-9615-f4f80125daad.png" width="700" /><br />
 </p>
<p dir="auto"><strong>示例2：</strong><br />
<img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/53d43656-c5d5-4a0d-8740-0742b616ed89.png" width="700" /><br />
 <br />
<strong>示例3：</strong><br />
<img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/a569df42-68a1-4709-840f-4caef8147cf9.png" width="700" /><br />
 <br />
 </p>
<h2><a class="anchor-offset" name="积木"></a>积木</h2>
<p dir="auto">积木“计算距离x( ) y( ) 到 x( ) y( ) 方法(直线距离/曼哈顿距离)”是<strong>运算类别</strong>的<strong>报表积木</strong>。</p>
<p dir="auto"><img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/5fcb59dc-c022-4024-a026-f524f2fe3499.png" width="850" /><br />
 </p>
<h2><a class="anchor-offset" name="这个积木怎么用"></a>这个积木怎么用？</h2>
<p dir="auto">这个积木会<strong>显示两个指定点的距离</strong>。</p>
<p dir="auto">在创益编程中，“点”、“角色的位置”都是用<strong>x坐标</strong>、<strong>y坐标</strong>来定义的。<br />
<img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/51a9d9b3-9ebf-4311-a5b5-7fe4879cd77a.png" width="600" /></p>
<p dir="auto"> <br />
需要在积木中输入两个点的坐标值，并点击下拉菜单选择“直线距离”或“曼哈顿距离”。<br />
<img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/dde55fbb-0948-401a-bef8-4f08e570055f.png" width="600" /></p>
<p dir="auto">用法如下：</p>
<p dir="auto"><img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/15d54b9b-0a02-4d2a-bbe1-149fc82c133e.gif" width="700" style="border-radius:5px;border:1px solid #29622d" /><br />
 </p>
]]></description><link>https://forum.creaticode.com/topic/709/计算两点之间距离的运算积木</link><generator>RSS for Node</generator><lastBuildDate>Tue, 12 May 2026 08:53:10 GMT</lastBuildDate><atom:link href="https://forum.creaticode.com/topic/709.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 20 Oct 2022 14:27:51 GMT</pubDate><ttl>60</ttl></channel></rss>