搜索资源列表
point_to_line.rar
- 计算点到直线的距离.输入两点坐标确定一个直线,再输入一个点的坐标,计算该点到直线的距离.,Calculated point to the straight line distance. Enter the coordinates of two points determine a straight line, and then input the coordinates of a point, to calculate the straight-line distance between poi
TrianPPS
- 计算平面点集的Delaunay三角剖分。使用DCEL数据结构。右键点击可以实现平面的直线穿刺。-Calculate the Delaunay triangulation of planar point set
TextWGL(DDA)
- 数值微分法(DDA)直线生成算法,算法实质:用数值方法微分方程,同时对x和y各增加一个小增量来计算下一步的x,y值。-Numerical differentiation (DDA) line generation algorithm, the algorithm in real terms: differential equations with numerical methods, while the x and y each increased by a small increment to
dinjunhui
- 一天,丁俊晖编一整天的程序,突然觉得累了,于是便决定在房间内四处走走。他的房间是矩形的,他从电脑开始随便选了一个角度开始行走。由于职业习惯,丁俊晖走路始终是直线,而且碰到墙以后会反弹,入射角度与出射角度完全相同。丁俊晖会一直行走,直到灵感再次迸发。假设他的行走速度是匀速的,现在,丁俊晖的母亲想知道他一共休息了多长时间以便提醒他继续工作。 丁俊晖想考考他的母亲,于是他记录了自己碰到墙壁的序列并且告诉了她,你有没有办法能够帮助她计算出小丁所走的路程? 输入 输入包括多个测
ser
- 服务转移问题 对于给定的有向直线L,计算在直线L 上增设两处服务机构的最小服务转移费用-The problem of transfer of services given to the straight line L, calculated on the straight line L Minimum Service transfer costs additional two service agencies
MaxPointsonaLine
- Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 分析:首先要注意的是,输入数组中可能有重复的点。由于两点确定一条直线,一个很直观的解法是计算每两个点形成的直线,然后把相同的直线合并,最后包含点最多的直线上点的个数就是本题的解。我们知道表示一条直线可以用斜率和y截距两个浮点数(垂直于x轴的直线斜率为无穷大,截距用x截距),同时还需要保存每