计算几何课堂:DCEL(双向边链表)

本篇内容详细介绍了DCEL(双向边链表)在计算几何中的应用,包括其基本概念、操作示例,如边的合并和角度计算。此外,还提供了Vertex、Half-edge和Face的API详情,以及相关拓展阅读资源,如向量运算和几何求交问题。附带的项目代码涵盖了Vertex、Half-edge和Face的主要操作方法,帮助读者深入理解并实践DCEL数据结构。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

这里为单独介绍DCEL数据结构的讲解视频,这个数据结构隶属于几何寻路项目之中,关于其他算法,有兴趣的童鞋可以参考这个系列视频:计算几何课堂:几何寻路之旅

1. 视频章节:DCEL(双向边链表)

6.1 DCEl是什么?

6.2 例子:DCEL

6.3 基本操作

6.4 如何合并边

6.5 如何计算两边夹角

2. 拓展阅读

  1. 向量复习(一):定义、求解、四则运算、点积和叉积
  2. 超详细!红黑树详解文章汇总(含代码)
  3. 几何求交(一):直线和直线的交点
  4. 几何求交(二):直线和圆的交点

3. 附录:项目代码

个人作业项目代码:Algorithm

2.3.1.1 Vertex

DescriptionEntry File
Get all incident edges of the vertexpublic List<HalfEdge> allIncidentEdges()
Find the first ClockWise Edge with two vertices destination and originHalfEdge firstClockWiseEdge( Vertex origin )
Find the first CounterClockWise Edge with two vertices destination and originHalfEdge firstCounterClockWiseEdge( Vertex destination )
Connect two vertices by adding new half-edgesFace connect( Vertex v )
Re-connect half-edges incident to this vertex.(Duality Implementation)void connect( List<HalfEdge> E )

2.3.1.2 Half-edge

DescriptionEntry File
Walk around all halfEdges connected to this one, and get vertices incident to them.List<Vertex> walkAroundVertex()
Walk around and get all halfEdges connected to this one.List<HalfEdge> walkAroundEdge()
Split the edge into two partsVertex split( Vertex split )
Get all inner faces bounded by this half-edge, but not including holes.Collection<HalfEdge> getInners()
Sort half-edges in clock wise order with the point i as the center.List<HalfEdge> sortInClockWise( List<HalfEdge> E, Vector i )

2.3.1.3 Face

DescriptionEntry File
Walk around all halfEdges, starting at this face and get visited halfEdges.List<HalfEdge> walkAroundEdge()
Walk around all halfEdges, starting at this face and get visited vertices.List<Vertex> walkAroundVertex()
Is the point inside this convex hull? but excluding the boundary.boolean isInsideConvexHull( Vector p )
Is the point on this convex hull? including the boundary.boolean isOnConvexHull( Vector p )
Is the point inside This Polygon?boolean isInsidePolygon( Vector p )
Is the point On This Polygon?boolean isOnPolygon( Vector p )

4. 参考资料

  1. 计算几何 | Computational Geometry
  2. Computational Geometry: Algorithms and Applications
  3. Simple Stupid Funnel Algorithm

5. 免责声明

※ 本文之中如有错误和不准确的地方,欢迎大家指正哒~
※ 此项目仅用于学习交流,请不要用于任何形式的商用用途,谢谢呢;


在这里插入图片描述

评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值