你的问题是不是要用在电脑上 事先画好 机器人的行动路线 然后翻译 发给 机器人呀
这样就好办了
不过说实话 汇编我是一点也不懂
不过我可以用高级语言给出 算法模式 应该可以看懂的
type poi
x as integer
y as integer
end type
'(poi 有两个 属性量 x,y 用于记录 你画的线)
dim t(0 to 3333) as integer'(变量声明 是一个整型变量)
dim p (0 to 9999) as poi '(0 to 9999是你画点的顺序)(至于怎样把图片转化为p的直 就看你了 我写多了 你就不容易看明白了)
dim anp (0 to 2) as poi
function judge (a as poi, b as poi)
if (a.x-b.x)^2+(a.y-b.y)^2 >=25 then '(半径为5 圆内 向量的简化)
judge=1
else
judge=0
end if
end function
sub angle(a , b , c ,t)
'程序略
用正弦定理 和 余弦定理 算出 角 abc来,并 给 t负直
让t 在 (-180,180)的区件内
end sub
=======下面为主程序
for i=0 to 2
anp(i).x=poi(0).x
anp(i).y=poi(0).y
next
for i=0 to 9999
if judge(anp(0),anp(1))=0 then
anp(1).x=poi(i).x
anp(1).y=poi(i).y
anp(2).x=poi(i).x
anp(2).y=poi(i).y
elseif
judge(anp(1),anp(2))=0 then
anp(2).x=poi(i).x
anp(2).y=poi(i).y
else
angle anp(0) , anp(1) , anp(2) , t
anp(0).x=poi(i).x
anp(0).y=poi(i).y
anp(1).x=poi(i).x
anp(1).y=poi(i).y
end if
next
‘然后根据t的直隔一段时间谈机器停下来 转 一个 t 的角度就可以了吧