当前位置: 首页 > news >正文

网站怎么进入后台维护北京京东世纪贸易有限公司

网站怎么进入后台维护,北京京东世纪贸易有限公司,flash网站方案,开发什么软件有市场数学原理及算法过程 Delaunay 三角剖分是一种特殊的三角剖分方法#xff0c;它满足以下两个重要性质#xff1a; 最大化最小角性质#xff1a;Delaunay 三角剖分通过避免细长的三角形来最大化所有三角形的最小角。空外接圆性质#xff1a;在 Delaunay 三角剖分中#xf…数学原理及算法过程 Delaunay 三角剖分是一种特殊的三角剖分方法它满足以下两个重要性质 最大化最小角性质Delaunay 三角剖分通过避免细长的三角形来最大化所有三角形的最小角。空外接圆性质在 Delaunay 三角剖分中每个三角形的外接圆不包含任何其他点。这意味着对于三角剖分中的任意三角形其外接圆内没有其他输入点。 基于这些性质Delaunay 三角剖分算法的一种实现方式是 Bowyer-Watson 算法这是一种增量算法。以下是具体的算法步骤 算法过程 初始化超级三角形 创建一个足够大的超级三角形包含所有输入点。这个三角形的三个顶点坐标远离实际输入点的范围使其能够覆盖所有点。 逐点插入 对于每个输入点找到所有包含该点的外接圆的三角形。这些三角形被称为“坏三角形”。 构建多边形 对于所有坏三角形它们的每条边如果只被一个坏三角形共享则称其为边界边。这些边将形成一个多边形。 删除坏三角形 将所有坏三角形从三角剖分中删除。 重新三角化多边形 用新插入的点和多边形的边构成新的三角形并将这些三角形加入三角剖分中。 移除超级三角形的影响 在所有点都插入后移除包含超级三角形顶点的所有三角形得到最终的 Delaunay 三角剖分。 数学原理 外接圆计算 对于每个三角形计算其外接圆。外接圆的圆心外心和半径可以通过三角形顶点的坐标计算。设三角形顶点为 ( x 1 , y 1 ) , ( x 2 , y 2 ) , ( x 3 , y 3 ) (x_1, y_1), (x_2, y_2), (x_3, y_3) (x1​,y1​),(x2​,y2​),(x3​,y3​)。外接圆的圆心 ( u , v ) (u, v) (u,v) 计算如下 d 2 ( x 1 ( y 2 − y 3 ) x 2 ( y 3 − y 1 ) x 3 ( y 1 − y 2 ) ) d 2 \left( x_1(y_2 - y_3) x_2(y_3 - y_1) x_3(y_1 - y_2) \right) d2(x1​(y2​−y3​)x2​(y3​−y1​)x3​(y1​−y2​)) u ( ( x 1 2 y 1 2 ) ( y 2 − y 3 ) ( x 2 2 y 2 2 ) ( y 3 − y 1 ) ( x 3 2 y 3 2 ) ( y 1 − y 2 ) ) d u \frac{((x_1^2 y_1^2)(y_2 - y_3) (x_2^2 y_2^2)(y_3 - y_1) (x_3^2 y_3^2)(y_1 - y_2))}{d} ud((x12​y12​)(y2​−y3​)(x22​y22​)(y3​−y1​)(x32​y32​)(y1​−y2​))​ v ( ( x 1 2 y 1 2 ) ( x 3 − x 2 ) ( x 2 2 y 2 2 ) ( x 1 − x 3 ) ( x 3 2 y 3 2 ) ( x 2 − x 1 ) ) d v \frac{((x_1^2 y_1^2)(x_3 - x_2) (x_2^2 y_2^2)(x_1 - x_3) (x_3^2 y_3^2)(x_2 - x_1))}{d} vd((x12​y12​)(x3​−x2​)(x22​y22​)(x1​−x3​)(x32​y32​)(x2​−x1​))​ r ( x 1 − u ) 2 ( y 1 − v ) 2 r \sqrt{(x_1 - u)^2 (y_1 - v)^2} r(x1​−u)2(y1​−v)2 ​ import matplotlib.pyplot as plt import numpy as npclass Point:def __init__(self, x, y):self.x xself.y yclass Triangle:def __init__(self, p1, p2, p3):self.p1 p1self.p2 p2self.p3 p3self.circumcenter, self.circumradius self.circumcircle()def circumcircle(self):Calculate the circumcenter and circumradius of the triangle.ax, ay self.p1.x, self.p1.ybx, by self.p2.x, self.p2.ycx, cy self.p3.x, self.p3.yd 2 * (ax * (by - cy) bx * (cy - ay) cx * (ay - by))ux ((ax*ax ay*ay) * (by - cy) (bx*bx by*by) * (cy - ay) (cx*cx cy*cy) * (ay - by)) / duy ((ax*ax ay*ay) * (cx - bx) (bx*bx by*by) * (ax - cx) (cx*cx cy*cy) * (bx - ax)) / dcircumcenter Point(ux, uy)circumradius np.sqrt((ax - ux)**2 (ay - uy)**2)return circumcenter, circumradiusdef contains_point(self, p):Check if the point p is inside the circumcircle of the triangle.return np.sqrt((p.x - self.circumcenter.x)**2 (p.y - self.circumcenter.y)**2) self.circumradiusdef delaunay_triangulation(points):Perform Delaunay triangulation on a set of points.super_triangle Triangle(Point(-1e5, -1e5), Point(1e5, -1e5), Point(0, 1e5))triangulation [super_triangle]for p in points:bad_triangles []for tri in triangulation:if tri.contains_point(p):bad_triangles.append(tri)polygon []for tri in bad_triangles:for edge in [(tri.p1, tri.p2), (tri.p2, tri.p3), (tri.p3, tri.p1)]:is_shared Falsefor other in bad_triangles:if other ! tri and (edge in [(other.p1, other.p2), (other.p2, other.p3), (other.p3, other.p1)] or edge[::-1] in [(other.p1, other.p2), (other.p2, other.p3), (other.p3, other.p1)]):is_shared Truebreakif not is_shared:polygon.append(edge)for tri in bad_triangles:triangulation.remove(tri)for edge in polygon:triangulation.append(Triangle(edge[0], edge[1], p))triangulation [tri for tri in triangulation if not (super_triangle.p1 in [tri.p1, tri.p2, tri.p3] or super_triangle.p2 in [tri.p1, tri.p2, tri.p3] or super_triangle.p3 in [tri.p1, tri.p2, tri.p3])]return triangulationdef plot_triangulation(triangles, points):for tri in triangles:plt.plot([tri.p1.x, tri.p2.x], [tri.p1.y, tri.p2.y], b-)plt.plot([tri.p2.x, tri.p3.x], [tri.p2.y, tri.p3.y], b-)plt.plot([tri.p3.x, tri.p1.x], [tri.p3.y, tri.p1.y], b-)for p in points:plt.plot(p.x, p.y, ro)plt.show() # Generate random points in the unit square rectangle_corners [Point(0, 0), Point(1, 0), Point(1, 1), Point(0, 1)] random_points [Point(np.random.rand(), np.random.rand()) for _ in range(20)] points rectangle_corners random_pointstriangles delaunay_triangulation(points) plot_triangulation(triangles, points)
http://www.w-s-a.com/news/675203/

相关文章:

  • 海尔集团企业网站建设分析重庆市建设银行网站
  • 介绍公司的网站有哪些广西壮族自治区
  • 网站做rss wordpress9 1短视频安装软件
  • 网站建设价格西安室内设计网站排行榜前十名知乎
  • 用nas建设服务器网站用vs做音乐网站
  • 天津市武清区住房建设网站网站自适应框架
  • 制作移动网站公司网站开发职业规划
  • 网站头部怎样做有气势wordpress 页面 锚
  • 秦皇岛网站建设系统推荐个人网站免费制作
  • 我做夫人那些年网站登录wordpress 扫码付费
  • 网站关键词代码怎么做公司 网站建设
  • 哈尔滨多语言网站建设wordpress分类链接
  • 购物网站项目介绍软件开发流程的五大步骤
  • 做的网站怎么放在网上2008 iis搭建网站
  • 网站维护服务公司上海兼职网站制作
  • 企业做网站需要多少钱湘潭九华网站
  • 嘉兴建站服务微营销官网
  • 比较好的网页模板网站浦项建设(中国)有限公司网站
  • 有趣的个人网站网页设计与制作的岗位职责
  • 有建设网站的软件吗长沙做网站的公司对比
  • 网站的外链接数中铝长城建设有限公司网站
  • 北京建设网站公司网站建设费用 无形资产
  • 适合seo的建站系统如何建立网页
  • 我想自己建立一个网站给大家分享个永久免费的云服务器
  • 怎样做网站和网站的友情链接官网优化 报价
  • 购买网站空间大小聊城网站空间公司
  • 做像美团淘宝平台网站多少钱开发网站企业
  • 网站建设前期费用二手购物网站策划书
  • dede学校网站百度联盟是什么
  • 献县网站建设网站开发专业定制