计算机与数字工程2024,Vol.52Issue(7) :1981-1985,2029.DOI:10.3969/j.issn.1672-9722.2024.07.014

一种凸多面体的背部元素消隐算法

A Hidden Algorithm for Back Elements of Convex Polyhedron

王秋娇 谢志杰
计算机与数字工程2024,Vol.52Issue(7) :1981-1985,2029.DOI:10.3969/j.issn.1672-9722.2024.07.014
✕

一种凸多面体的背部元素消隐算法

A Hidden Algorithm for Back Elements of Convex Polyhedron

王秋娇 1谢志杰2
扫码查看

作者信息

  • 1. 西南交通大学希望学院基础部 成都 610400;成都市交通+旅游大数据应用技术研究基地 成都 610400
  • 2. 上海钛闻软件技术有限公司成都办公区 成都 610000
  • 折叠

摘要

为了在图形显示时,不渲染凸面体被隐藏的点线面等元素,论文从顶点着手,提出一种更直观的背部元素判定方法,首先对顶点编号,然后分别对边线和面与顶点建立索引关系,计算所有不可见顶点,然后根据索引关系即可直接得到背部边线和背部面.使用Python语言和OpenGL库实现了该算法,实验及分析表明,该算法以凸面体顶点数量为基,具有O(n2/2)的算法复杂度,执行效率较高.该算法程序及验证程序开源于https://github.com/wanzhuxie/GraphicBlanking/tree/Com-puter-&-Digital-Engineering.

Abstract

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(n2/2)and high execution efficiency.The algorithm program and verification program are open sourced at https://github.com/wanzhuxie/Graph-icBlanking.

关键词

凸多面体/消隐/OpenGL/开源

Key words

convex polyhedron/hidden/OpenGL/open source

引用本文复制引用

基金项目

成都市哲学社会科学重点研究基地项目(20231003)

出版年

2024
计算机与数字工程
中国船舶重工集团公司第七0九研究所

计算机与数字工程

CSTPCD
影响因子:0.355
ISSN:1672-9722
段落导航相关论文