usaco计算几何.doc

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
usaco 计算几何 ? usaco计算几何2010-05-10 09:09Computational Geometry Prerequisites Graph TheoryShortest PathTools This module discusses several algorithms that calculate various geometric properties,mostly based on only two operations described below:cross product and arctangent. Cross Product The cross product of uand vis written as ux v.Computationally,the cross product of two three-dimensional vectors uand vis the vector determinant of the following matrix(where i,j,and kare unit vectors in the x,y,and zdirections respectively):|i jk||ux uy uz||vx vy vz|That equation works out to: (uyvz-vyuz)i+(uzvx-uxvz)j+(uxvy-uyvx)k This definition can be used for vectors in two dimensions by using three-dimensional vectors with az component of 0.The resulting vector will only have az value. The cross product has three properties: The cross product of two vectors is perpendicular to both vectors.The length of the cross product is equal to the product of: the length of u,the length of v,andthe sine of the angle between the vectors.Of the two different directions that are perpendicular to both uand v,the direction the cross product points depends on whether uis``to the rightof vor``to the left. Dot product The dot product of two vectors uand vis ascalar written as u·v.Computationally,it is defined in three dimensions as:uxvx+u yvy+uzv z The dot product is actually equal to the product of: the length of uthe length of vthe cosine of the angle between uand v.Presuming uand vare non-zero,if the dot product if negative,u and vmake an angle greater than 90 degrees.If it is zero,then uand vare perpendicular.If ucdot vis positive,then the two vectors form an acute angle. Arctangent The arctangentfunction calculates the(an)angle whose tangent is its argument and generally returns areal number between-pi/2 and pi/2.An additional function in C,atan2,takes two arguments:a DELTA yvalue and aDELTA xvalue(in that order!).It determines the angle between the given vector and the positive xaxis and retu

文档评论(0)

shujukd + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档