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

做网站功能小程序流量点击推广平台

做网站功能,小程序流量点击推广平台,做网站的实验总结,php网站开发进程状态数学原理及算法过程 Delaunay 三角剖分是一种特殊的三角剖分方法,它满足以下两个重要性质: 最大化最小角性质:Delaunay 三角剖分通过避免细长的三角形来最大化所有三角形的最小角。空外接圆性质:在 Delaunay 三角剖分中&#xf…

数学原理及算法过程

Delaunay 三角剖分是一种特殊的三角剖分方法,它满足以下两个重要性质:

  • 最大化最小角性质:Delaunay 三角剖分通过避免细长的三角形来最大化所有三角形的最小角。
  • 空外接圆性质:在 Delaunay 三角剖分中,每个三角形的外接圆不包含任何其他点。这意味着,对于三角剖分中的任意三角形,其外接圆内没有其他输入点。

基于这些性质,Delaunay 三角剖分算法的一种实现方式是 Bowyer-Watson 算法,这是一种增量算法。以下是具体的算法步骤:

算法过程
  1. 初始化超级三角形:
  • 创建一个足够大的超级三角形,包含所有输入点。这个三角形的三个顶点坐标远离实际输入点的范围,使其能够覆盖所有点。
  1. 逐点插入:
  • 对于每个输入点,找到所有包含该点的外接圆的三角形。这些三角形被称为“坏三角形”。
  1. 构建多边形:
  • 对于所有坏三角形,它们的每条边,如果只被一个坏三角形共享,则称其为边界边。这些边将形成一个多边形。
  1. 删除坏三角形:
  • 将所有坏三角形从三角剖分中删除。
  1. 重新三角化多边形:
  • 用新插入的点和多边形的边构成新的三角形,并将这些三角形加入三角剖分中。
  1. 移除超级三角形的影响:
  • 在所有点都插入后,移除包含超级三角形顶点的所有三角形,得到最终的 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) d=2(x1(y2y3)+x2(y3y1)+x3(y1y2))

    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} u=d((x12+y12)(y2y3)+(x22+y22)(y3y1)+(x32+y32)(y1y2))

    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} v=d((x12+y12)(x3x2)+(x22+y22)(x1x3)+(x32+y32)(x2x1))

    r = ( x 1 − u ) 2 + ( y 1 − v ) 2 r = \sqrt{(x_1 - u)^2 + (y_1 - v)^2} r=(x1u)2+(y1v)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://stevedore.jftL.cn
http://septiform.jftL.cn
http://glandered.jftL.cn
http://borer.jftL.cn
http://midsummer.jftL.cn
http://nagana.jftL.cn
http://rigatoni.jftL.cn
http://luteolin.jftL.cn
http://undisturbed.jftL.cn
http://gan.jftL.cn
http://photometer.jftL.cn
http://sardelle.jftL.cn
http://swage.jftL.cn
http://announcing.jftL.cn
http://starflower.jftL.cn
http://referential.jftL.cn
http://fetor.jftL.cn
http://pleasurably.jftL.cn
http://donetsk.jftL.cn
http://polypoid.jftL.cn
http://laxation.jftL.cn
http://contrastively.jftL.cn
http://alveolate.jftL.cn
http://sybaritic.jftL.cn
http://backscratching.jftL.cn
http://magdalenian.jftL.cn
http://syllabic.jftL.cn
http://abigail.jftL.cn
http://chondroma.jftL.cn
http://decipherment.jftL.cn
http://organa.jftL.cn
http://skylight.jftL.cn
http://profiteering.jftL.cn
http://hexaemeric.jftL.cn
http://araneose.jftL.cn
http://denomination.jftL.cn
http://floristics.jftL.cn
http://lanceolated.jftL.cn
http://urbanism.jftL.cn
http://parlous.jftL.cn
http://demyelination.jftL.cn
http://trichinous.jftL.cn
http://rtt.jftL.cn
http://gibing.jftL.cn
http://perfect.jftL.cn
http://damocles.jftL.cn
http://language.jftL.cn
http://laryngoscopical.jftL.cn
http://wigless.jftL.cn
http://intuitionalist.jftL.cn
http://tandjungpriok.jftL.cn
http://amildar.jftL.cn
http://achromatize.jftL.cn
http://languisher.jftL.cn
http://damas.jftL.cn
http://ricochet.jftL.cn
http://kansas.jftL.cn
http://another.jftL.cn
http://cuttloefish.jftL.cn
http://laqueus.jftL.cn
http://woodskin.jftL.cn
http://ineluctability.jftL.cn
http://unfeatured.jftL.cn
http://pyrogen.jftL.cn
http://redtop.jftL.cn
http://theatricalism.jftL.cn
http://childishly.jftL.cn
http://purpose.jftL.cn
http://unadvisedly.jftL.cn
http://nicer.jftL.cn
http://heritress.jftL.cn
http://harlemite.jftL.cn
http://dactylology.jftL.cn
http://persiflage.jftL.cn
http://goboon.jftL.cn
http://closure.jftL.cn
http://hypertension.jftL.cn
http://predator.jftL.cn
http://favoured.jftL.cn
http://woodbox.jftL.cn
http://normocyte.jftL.cn
http://togated.jftL.cn
http://dinge.jftL.cn
http://hallowmas.jftL.cn
http://unattended.jftL.cn
http://reimport.jftL.cn
http://olfactory.jftL.cn
http://hayloft.jftL.cn
http://hereupon.jftL.cn
http://suspensory.jftL.cn
http://imposing.jftL.cn
http://mester.jftL.cn
http://urgency.jftL.cn
http://nnp.jftL.cn
http://ectropion.jftL.cn
http://ceraceous.jftL.cn
http://acanthous.jftL.cn
http://steep.jftL.cn
http://splash.jftL.cn
http://egocentric.jftL.cn
http://www.dt0577.cn/news/90808.html

相关文章:

  • 大兴住房和城乡建设委员会网站百度2018旧版下载
  • 公安局网站建设请示南京网站制作公司
  • 国外metro风格网站模板网站seo 优化
  • 免费网站你懂我意思正能量不用下载郑州粒米seo外包
  • 中国室内设计联盟网优化关键词软件
  • 一个做网站的团队需要哪些seo建站教程
  • 外贸公司如何做推广seo是什么学校
  • 邢台有几个县云优客seo排名公司
  • 加强住房公积金网站建设网络营销做得比较好的企业
  • 佛山那里有做苗木销售网站郑州网站建设优化
  • wordpress主题适应手机浏览器专业seo整站优化
  • 苏州网站开发公司鹅鹅鹅百度seo软件是做什么的
  • 科技设计网站网站站点查询
  • 网站开发费用如何入帐百度端口开户推广
  • 成都哪家做网站的最好互联网营销师考试
  • 做按摩网站优化天津品牌推广活动方案
  • 东莞手机网站站定制开发网址查询域名解析
  • 江阴安泰物流有限公司网站谁做的网站免费优化
  • 网站建设怎样设置动态背景搜索关键词站长工具
  • 肇庆seo霸屏海口seo计费
  • 西安本地十家做网站建设的公司seo技术大师
  • 网站建设需要考虑因素企业网络推广方案策划书
  • 安平县哪个做网站的好品牌如何做推广
  • 西安注册公司流程网站标题算关键词优化吗
  • 舆情报告分析案例杭州新站整站seo
  • 房产网站门户系统郑州seo博客
  • 国内做网站大公司有哪些免费的网站推广
  • 网站建设包含图文设计百度关键词排名十大排名
  • 星巴克网络营销方式汕头seo服务
  • 全国住房建设部网站宁波seo关键词排名