- 博客(8)
- 收藏
- 关注
原创 六级词汇
integrity n.诚实,正直,完善,完整 Our intergrity as a nation is threatened by these separatist forces. He is a man of complete integrity. 2.streamline n.流线,流线型 v.使…成流线型,使…合理化 We must streamline our met
2016-02-26 15:49:40
1489
原创 已知线段端点坐标,求线段上等距离的点坐标序列
已知线段上端点坐标,求其上等距离的点坐标序列:def points(m1,m2,n1,n2): q1 = Point(m1,m2) q2 = Point(n1,n2) len12 = ((p1.x-p2.x)**2+(p1.y-p2.y)**2)**0.5 n1 = int(len12/10) t12x = (10*(p2.x-p1.x))/len12
2016-02-21 22:11:54
4134
原创 判断四边形凹凸性及凹点
已知四边形四个点坐标 p1 = (x,y), p2 = (x,y), p3 = (x,y), p4 = (x,y) 判断凹凸性及凹点位置 t1 = (p4.x-p1.x)(p2.y-p1.y)-(p4.y-p1.y)(p2.x-p1.x) t2 = (p1.x-p2.x)(p3.y-p2.y)-(p1.y-p2.y)(p3.x-p2.x) t3 = (p2.x-p3.
2016-02-21 21:41:47
9834
3
原创 已知四边形四个顶点坐标,求面积
def calcArea(m1,m2,n1,n2,j1,j2,k1,k2): q1 = Point(m1,m2) q2 = Point(n1,n2) q3 = Point(j1,j2) q4 = Point(k1,k2) d12 = calcDistance(q1.y, q1.x, q2.y, q2.x) d23 = calcDistanc
2016-02-21 21:13:04
19753
原创 已知两点经纬度坐标,求其直线距离
def calcDistance(Lat_A, Lng_A, Lat_B, Lng_B): ra = 6378.140 # 赤道半径 (km) rb = 6356.755 # 极半径 (km) flatten = (ra - rb) / ra # 地球扁率 rad_lat_A = radians(Lat_A) rad_lng_A = radia
2016-02-21 21:05:35
1736
原创 已知两条直线上各两点坐标,求两条直线交点坐标
def point(x0,y0,x1,y1,x2,y2,x3,y3): a = y1-y0 b = x1*y0-x0*y1 c = x1-x0 d = y3-y2 e = x3*y2-x2*y3 f = x3-x2 y = float(a*e-b*d)/(a*f-c*d) x = float(y*c-b)/a
2016-02-21 20:59:54
9316
3
原创 动态规划-------最长公共子序列
1.最长公共子序列结构设序列X = { x1,x2,x3,……,xm}和序列Y = {y1,y2,y3,…….,yn}的最长公共子序列为序列Z = {z1,z2,…….,zk},则: (1)若xm = yn,则zk = xm = yn,且zk-1是xm-1和yn-1的最长公共子序列; (2)若xm != yn,且zk != xm,则Z是xm-1和yn的最长公共子序列; (3)若xm != yn
2015-10-22 21:30:01
434
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人