摘要: 1.圆(2D) 圆的两个关键因素:圆心和半径。 公式: (x–h)2 + (y–k)2 = r2 圆心为(h,k) 半径为r. 举例:圆心为(1,2),半径为2的圆。 计算机中的实现: 定义一个圆 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-... 阅读全文
posted @ 2009-01-14 13:11 HelloCG 阅读(1508) 评论(0) 推荐(1) 编辑
摘要: 抛物线 如果你投掷一个铅球或者踢足球,它们将做一个抛物线运动。因为它们总是受一个垂直于地面的重力加速度g的作用。下图为四个方向上的抛物线。 公式: 垂直轴向上的抛物线:y=a(x–h)2+k, 顶点为(h,k),关于x=h对称. 水平轴向上的抛物线:x=a(y–k)2+h, 顶点为(h,k),关于y=k对称. 举例: 阅读全文
posted @ 2009-01-14 12:49 HelloCG 阅读(5566) 评论(0) 推荐(0) 编辑
摘要: 1.计算两点之间的距离 公式:a2+b2=c2(勾股定理) 2D: 3D: 计算机实现: 2D距离 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->float Distance2D(Point2D p1,Point2D p2) {... 阅读全文
posted @ 2009-01-14 12:28 HelloCG 阅读(1784) 评论(0) 推荐(0) 编辑
摘要: 直线公式: Ax + By = C (A和B不能同时为0) 讨论: A和B不为0:为斜线(不垂直于x轴和y轴); A为0,B不为0:直线为垂直于y轴的直线,且于y轴交与点(0,C/B); A不为0,B为0:直线为垂直于x轴的直线,且于x轴交与点(C/A,0); 例1: 例2: 斜率: 定义斜率: 2D斜率 Code highlighting produced by Actipro Code... 阅读全文
posted @ 2009-01-13 23:18 HelloCG 阅读(1760) 评论(0) 推荐(0) 编辑
摘要: 数学中的坐标系统(笛卡尔坐标系统) 这里A(0,0), B(1,2), C(4,3), D(–1,2), E(–2,–1), F(3,–2). 计算机中的坐标系统(屏幕坐标系统) 注意这里的y轴在两个坐标系统是相反的。在后面将会研究将笛卡尔坐标系统转换为屏幕坐标系统。 在3D的坐标系中,没有一个工业标准,有的采用y轴向上(y-up)的坐标系,有的采用z轴向上(z-up)的坐标系,有的采用右手坐... 阅读全文
posted @ 2009-01-13 17:33 HelloCG 阅读(3988) 评论(0) 推荐(0) 编辑
摘要: 1.构建小球精灵 Ball.as Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->package { import flash.display.Sprite; public class Ball extends Sprite ... 阅读全文
posted @ 2009-01-12 23:39 HelloCG 阅读(318) 评论(0) 推荐(0) 编辑
摘要: 算法实现: ActionScirpt3.0实现: 1.构建小球精灵 Ball.as Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->package { import flash.display.Sprite; public cla... 阅读全文
posted @ 2009-01-10 23:05 HelloCG 阅读(336) 评论(0) 推荐(0) 编辑
摘要: 1.4. Contracts(契约) 在WCF中,所有的服务都暴露契约,契约是一个平台无关(platform-neutral )和描述服务只做什么的标准方法。WCF定义了四种类型的契约。 Service contracts(服务契约) 描述操作能执行服务的客户端。服务契约是下一章的主题。 Data contracts(数据契约) 定义哪种数据类型可以从服务中传递。WCF为固定(built-in) ... 阅读全文
posted @ 2009-01-08 13:27 HelloCG 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 1.3. Addresses(地址) 在WCF,每一个服务关联到一个唯一的地址。地址提供了两个重要的元素:服务地址和传输端点或者传输视图(transport schema)用于和服务通信。本地地址端口指向目标机器的名称、站点或者网络的地址;一个通信端口(port),管道(pipe)或者队列(queue);一个可选的特定的路径或者URI。一个URI是一个通用资源识别符(Universal Resou... 阅读全文
posted @ 2009-01-08 10:25 HelloCG 阅读(455) 评论(0) 推荐(0) 编辑
摘要: 1.构建小球精灵 Ball.as Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->package { import flash.display.Sprite; public class Ball extends Sprite ... 阅读全文
posted @ 2009-01-07 21:42 HelloCG 阅读(220) 评论(0) 推荐(0) 编辑