摘要
为了在图形显示时,不渲染凸面体被隐藏的点线面等元素,论文从顶点着手,提出一种更直观的背部元素判定方法,首先对顶点编号,然后分别对边线和面与顶点建立索引关系,计算所有不可见顶点,然后根据索引关系即可直接得到背部边线和背部面。使用Python语言和OpenGL库实现了该算法,实验及分析表明,该算法以凸面体顶点数量为基,具有O(n^(2)/2)的算法复杂度,执行效率较高。该算法程序及验证程序开源于https://github.com/wanzhuxie/GraphicBlanking/tree/Computer-&-Digital-Engineering。
In order not to render the hidden vertices,edges,and faces of convex polyhedron when displaying graphics,this paper proposes a more intuitive method for hidden elements determination starting from vertices.First,the vertices are numbered,then the relationship between the edge indexes and vertex indexes,and the relationship between the face indexes and vertex index⁃es,are established respectively.All invisible vertices are calculated,and then the back edges and back surfaces can be directly ob⁃tained according to the index relationship.The algorithm has been implemented using Python language and OpenGL library.Experi⁃ments and analysis show that the algorithm is based on the number of convex vertices,with the algorithm complexity of O(n^(2)/2)and high execution efficiency.The algorithm program and verification program are open sourced at https://github.com/wanzhuxie/Graph⁃icBlanking.
作者
王秋娇
谢志杰
WANG Qiujiao;XIE Zhijie(Basic Department,Southwest Jiaotong University Hope College,Chengdu 610400;Chengdu Transportation+Tourism Big Data Application Technology Research Base,Chengdu 610400;Chengdu Office,Shanghai Tecwin Software Technology Co.,Ltd.,Chengdu 610000)
出处
《计算机与数字工程》
2024年第7期1981-1985,2029,共6页
Computer & Digital Engineering
基金
成都市哲学社会科学重点研究基地项目“旅游景区交互式视频播放技术研究”(编号:20231003)资助。