Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1501381
  • 博文数量: 3500
  • 博客积分: 6000
  • 博客等级: 准将
  • 技术积分: 43870
  • 用 户 组: 普通用户
  • 注册时间: 2008-05-03 20:31
文章分类

全部博文(3500)

文章存档

2008年(3500)

我的朋友

分类:

2008-05-04 19:22:19

一起学习
很多研究Robocode的 玩家都被其中的方向及坐标弄糊涂了。下面就跟着Skyala.Li一起来揭开其中的奥妙。 首先我们来看看一段英文的翻译及说明: heading - absolute angle in degrees with 0 facing up the screen, positive clockwise. 0 <= heading < 360. bearing - relative angle to some object from your robot's heading, positive clockwise. -180 < bearing <= 180 heading:是机器人方向与屏幕正上方的角度差,方向在0到360之间. bearing:是机器人的某个部件如雷达发现的目标与方向的角度差,顺时针为正角度在-180到180之间 看了这段文字大家可能还是不太明白,整个屏幕哪个是0度角,整个是坐标原点呢? 顺时针与逆时针的方向如何区分? 详细请进入: http://www-900.ibm.com/developerWorks/cn/java/l-robocode/index.shtml 下载本文示例代码


Robocode 基本原理之方向剖析Robocode 基本原理之方向剖析Robocode 基本原理之方向剖析Robocode 基本原理之方向剖析Robocode 基本原理之方向剖析Robocode 基本原理之方向剖析Robocode 基本原理之方向剖析Robocode 基本原理之方向剖析Robocode 基本原理之方向剖析Robocode 基本原理之方向剖析Robocode 基本原理之方向剖析Robocode 基本原理之方向剖析
阅读(76) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~