海螺不能和什么一起吃| 夺魁是什么意思| kimi什么意思| 向内求什么意思| 血常规能检查出什么| lotus是什么牌子| 宫颈囊肿有什么症状表现| 氨甲环酸又叫什么名| 帛书是什么意思| 0什么意思| 梦见马是什么意思| 收官是什么意思| 辣眼睛是什么意思| 站姐是什么职业| 被毒蛇咬了有什么症状| 内退是什么意思| 阴虚火旺吃什么水果| 洗涤心灵是什么意思| 红房子是什么| 最近发胖过快什么原因| 尿血是什么症状| 为什么老是打喷嚏| 低分化腺癌是什么意思| 六畜兴旺是什么生肖| 孕妇贫血吃什么药| 繁字五行属什么| 霍乱是什么| 肥胖纹长什么样| 什么工作赚钱最快| 孕妇甲减是什么原因引起的| 日本为什么要侵略中国| 什么病可以办低保| 睾丸扭转有什么症状| 属兔和什么属相最配| 氟哌酸是什么药| 国药准字h代表什么| 长期口臭吃什么药| 景泰蓝是什么| 梦见别人拉屎是什么意思| 什么茶有助于睡眠| 指甲有白点是缺什么| 独一无二是什么生肖| 割包皮有什么好处| 对虾是什么虾| 胆管炎是什么原因引起的| 人授和试管有什么区别| 洁颜油是干什么用的| ala是什么氨基酸| 眼睛疼吃什么药| 金银花和什么搭配喝好| 黑色素通过什么排出来| 什么古迹| 瞳孔放大意味着什么| 晒伤涂什么药膏| 化学性肝损伤是什么意思| 胃不好吃什么蔬菜| 痔疮吃什么药好得快| 胃大肚子大是什么原因| 甲亢的早期症状是什么| 下嘴唇发麻什么病兆| 10月9号是什么星座| 去迪拜打工需要什么条件| 郑和是什么族| 头发油性大是什么原因| 宰相是现在的什么官| 来月经能吃什么水果| 胃老是恶心想吐是什么原因| 痛风打什么针| 每天做梦是什么原因引起| 大小脸是什么原因造成的| 缺锌吃什么食物和水果| 空调漏水是什么原因| 非萎缩性胃炎伴糜烂是什么意思| ssg是什么意思| 什么是超声检查| 眉毛长白毛是什么征兆| 司令是什么军衔| 吃益生菌有什么好处| 茶油有什么功效| 情愫是什么意思| 518是什么星座| 饺子都有什么馅| 什么生活| 11月17日是什么星座| 干邑是什么意思| 恃宠而骄什么意思| 柳树像什么| 止咳化痰吃什么好| 1956年属什么| 毫不犹豫的意思是什么| 什么运动可以让孩子长高| 什么牌子洗发水好| 皮蛋和什么不能一起吃| 口若悬河什么意思| 多囊卵巢综合症吃什么药| 什么样的西瓜| 体育精神是什么| 一毛三是什么军衔| 七岁属什么生肖| 老年人心跳过快是什么原因| 2004年是什么年| 坐久了脚肿是什么原因| 黑曜石是什么| 美丽的邂逅是什么意思| 吃什么可以止咳化痰| 地三鲜是什么菜| 西兰花是什么季节的蔬菜| 中国中铁是做什么的| 什么是diy| 1949属什么生肖| 轴重是什么意思| hcg值低是什么原因| 金箔是什么| 梦见生男孩是什么征兆| 为什么叫985大学| 孢子粉是什么| 计算机科学与技术是学什么的| 上海最高楼叫什么大厦有多少米高| 卉是什么意思| 腰间盘突出压迫神经腿疼吃什么药| 什么运动能长高| 吃什么会变白| 肝内胆管结石有什么症状表现| 712什么星座| 1940年出生属什么生肖| 砚字五行属什么| hev是什么意思| 饭后放屁多是什么原因| 酸奶坏了是什么味道| 吃什么最补血| ph什么意思| 猫藓用什么药| 大姨妈期间吃什么好| 51号元素是什么意思| 睡觉食管反流什么原因| 俊五行属性是什么| 糖耐量异常是什么意思| 什么风云| 印第安老斑鸠什么意思| 反差萌是什么意思| 什么的流动| 病假需要什么医院证明| apm是什么| 吃牛油果有什么好处和坏处| 九什么一毛| 为什么会突然吐血| 羊水栓塞是什么意思| 酱油色尿是什么原因| 身体出虚汗是什么原因| 急性肠炎吃什么食物好| 看腋臭挂什么科| 珍馐是什么意思| 龙跟什么生肖最配| 什么犹如什么造句| 孕酮低跟什么有关系| 梅雨季节是什么时候| 分数值是什么意思| 花心大萝卜是什么意思| 蜥蜴人是什么| 陇是什么意思| 心什么如什么的成语| 松鼠代表什么生肖| 外人是什么意思| 小孩吃榴莲有什么好处| 咽喉肿痛吃什么药| 庸人什么意思| 睡觉口苦是什么原因| 7月15是什么节日| 巨大的什么| 磷脂是什么东西| 最近有什么病毒| 五个月的宝宝能吃什么辅食| 悬雍垂发炎吃什么药| 750金是什么金| 培土什么意思| 脲是什么意思| 医院医务科是干什么的| 做梦烧纸钱什么意思| 呼吸胸口疼是什么原因| 清炖鸡汤放什么调料| 正月十八是什么星座| 1979年是什么命| homie是什么意思| 小麦是什么粮食| 梦见酒是什么意思| 余的部首是什么| 荷尔蒙爆发是什么意思| 什么叫处方药| 去拉萨需要准备什么| 异淋是什么意思| 孕妇梦到老公出轨什么意思| 两腿抽筋是什么原因| 什么是文科什么是理科| 男人更年期在什么年龄| 更年期什么时候开始| 什么水果是凉性的| 地中海贫血有什么症状| 肚脐眼疼是什么原因| 礼部尚书是什么官| 蛊是什么| 身份证拍照穿什么衣服| kitty什么意思| bq是什么意思啊| 鱼肝油有什么功效| 互卦是什么意思| 婆婆过生日送什么礼物好| 四大才子中状元是什么生肖| 失眠多梦吃什么药效果最好| 腱鞘炎看什么科| 蔻驰香水属于什么档次| 血糖高对身体有什么危害| 血清碱性磷酸酶高是什么意思| 六月二十九日是什么星座| 人绒毛膜促性腺激素是查什么的| 英文为什么怎么写| xl什么牌子| 禅意是什么意思| 房间里放什么阳气旺| 錾是什么意思| mrd是什么| 年兽叫什么| 梦见对象出轨什么征兆| 长期戴耳机有什么危害| 舌头尖疼吃什么药| 为什么要努力读书| 补牙是什么意思| 杀阴虱用什么药最快| 可拉明又叫什么| 低钾吃什么药| 什么奶茶最贵| 男孩取什么名字好| 什么药可以缩阴紧致| 大肠炒什么菜好吃| 经行是什么意思| 什么原因导致胎停| 富豪是什么意思| 发改委是干什么的| 血糖高不能吃什么水果| 斑秃用什么药| rads是什么意思| 速度是70迈心情是自由自在什么歌| sars是什么病毒| 为什么今年这么热| 本是同根生相煎何太急是什么意思| 什么是拓扑| 男人身体怕冷是什么原因如何调理| legrand是什么牌子| 蝉是什么生肖| 吃什么可以增强硬度| 黄精和什么煲汤好| 什么护肤产品补水最好| 踏雪寻梅什么意思| 什么的葡萄| 冥王星是什么星| 咬指甲是什么心理疾病| 女人右手中指有痣代表什么| 内能与什么有关| hpv弱阳性是什么意思| 榴莲吃起来口感像什么| 往来账是什么意思| 面红耳赤是什么生肖| 脊髓灰质炎是什么病| 吃什么长头发又密又多| 怀孕做梦梦到蛇是什么意思| 百度Jump to content

洋溢着什么样的笑容

From Wikipedia, the free encyclopedia
A fractal landscape being rendered using the painter's algorithm on an Amiga
百度 凝心聚力,攻坚克难,需要一个汇集各方面、各领域优秀人才,体现全国各族人民大团结大联合,有利于凝聚起中华儿女万众一心、团结奋斗强大力量的领导集体。

The painter's algorithm (also depth-sort algorithm and priority fill) is an algorithm for visible surface determination in 3D computer graphics that works on a polygon-by-polygon basis rather than a pixel-by-pixel, row by row, or area by area basis of other hidden-surface determination algorithms.[1][2][3] The painter's algorithm creates images by sorting the polygons within the image by their depth and placing each polygon in order from the farthest to the closest object.[4][5]

The painter's algorithm was initially proposed as a basic method to address the hidden-surface determination problem by Martin Newell, Richard Newell, and Tom Sancha in 1972, while all three were working at CADCentre.[4] The name "painter's algorithm" refers to the technique employed by many painters where they begin by painting distant parts of a scene before parts that are nearer, thereby covering some areas of distant parts.[6][7] Similarly, the painter's algorithm sorts all the polygons in a scene by their depth and then paints them in this order, farthest to closest.[8] It will paint over the parts that are normally not visible — thus solving the visibility problem — at the cost of having painted invisible areas of distant objects.[9] The ordering used by the algorithm is called a 'depth order' and does not have to respect the numerical distances to the parts of the scene: the essential property of this ordering is, rather, that if one object obscures part of another, then the first object is painted after the object that it obscures.[9] Thus, a valid ordering can be described as a topological ordering of a directed acyclic graph representing occlusions between objects.[10]

The distant mountains are painted first, followed by the closer meadows; finally, the trees, are painted. Although some trees are more distant from the viewpoint than some parts of the meadows, the ordering (mountains, meadows, trees) forms a valid depth order, because no object in the ordering obscures any part of a later object.

Algorithm

[edit]

Conceptually Painter's Algorithm works as follows:

  1. Sort each polygon by depth
  2. Place each polygon from the farthest polygon to the closest polygon

Pseudocode

[edit]
sort polygons by depth
for each polygon p:
    for each pixel that p covers:
        paint p.color on pixel

Time complexity

[edit]

The painter's algorithm's time-complexity depends on the sorting algorithm used to order the polygons. Assuming an optimal sorting algorithm, painter's algorithm has a worst-case complexity of O(n log n + m*n), where n is the number of polygons and m is the number of pixels to be filled.

Space complexity

[edit]

The painter's algorithm's worst-case space-complexity is O(n+m), where n is the number of polygons and m is the number of pixels to be filled.

Advantages

[edit]

There are two primary technical requisites that favor the use of the painter's algorithm.

Basic graphical structure

[edit]

The painter's algorithm is not as complex in structure as its other depth sorting algorithm counterparts.[9][11] Components such as the depth-based rendering order, as employed by the painter's algorithm, are one of the simplest ways to designate the order of graphical production.[8] This simplicity makes it useful in basic computer graphics output scenarios where an unsophisticated render will need to be made with little struggle.[9]

Memory efficiency

[edit]

In the early 70s, when the painter's algorithm was developed, physical memory was relatively small.[12] This required programs to manage memory as efficiently as possible to conduct large tasks without crashing. The painter's algorithm prioritizes the efficient use of memory but at the expense of higher processing power since all parts of all images must be rendered.[9]

Limitations

[edit]
Overlapping polygons can cause the algorithm to fail.

The algorithm can fail in some cases, including cyclic overlap or piercing polygons.

Cyclical overlapping

[edit]

In the case of cyclic overlap, as shown in the figure to the right, Polygons A, B, and C overlap each other in such a way that it is impossible to determine which polygon is above the others. In this case, the offending polygons must be cut to allow sorting.[4]

Piercing polygons

[edit]

The case of piercing polygons arises when one polygon intersects another. Similar to cyclic overlap, this problem may be resolved by cutting the offending polygons.[4]

Efficiency

[edit]

In basic implementations, the painter's algorithm can be inefficient. It forces the system to render each point on every polygon in the visible set, even if that polygon is occluded in the finished scene. This means that, for detailed scenes, the painter's algorithm can overly tax the computer hardware.

Reducing visual errors

[edit]

There are a few ways to reduce the visual errors that can happen with sorting:

Binary Space Partitioning

[edit]

BSP is a method that involves making a BSP tree, and splitting triangles where they intersect. It can be extremely hard to implement, but it fixes most visual errors.

Backface culling

[edit]

Backface culling involves calculations to see if a triangles points will appear clockwise or counter-clockwise once projected to the screen, and doesn't draw triangles that shouldn't be visible anyway. It reduces some visual errors, as well as reducing the total triangles drawn.

Variants

[edit]

Extended painter's algorithm

[edit]

Newell's algorithm, proposed as the extended algorithm to painter's algorithm, provides a method for cutting cyclical and piercing polygons.[4]

Reverse painter's algorithm

[edit]

Another variant of painter's algorithm includes reverse painter's algorithm. Reverse painter's algorithm paints objects nearest to the viewer first — with the rule that paint must never be applied to parts of the image that are already painted (unless they are partially transparent). In a computer graphic system, this can be very efficient since it is not necessary to calculate the colors (using lighting, texturing, and such) for parts of a distant scene that are hidden by nearby objects. However, the reverse algorithm suffers from many of the same problems as the standard version.

Other computer graphics algorithms

[edit]

The flaws of painter's algorithm led to the development of Z-buffer techniques, which can be viewed as a development of the painter's algorithm by resolving depth conflicts on a pixel-by-pixel basis, reducing the need for a depth-based rendering order.[13] Even in such systems, a variant of the painter's algorithm is sometimes employed. As Z-buffer implementations generally rely on fixed-precision depth-buffer registers implemented in hardware, there is scope for visibility problems due to rounding error. These are overlaps or gaps at joints between polygons. To avoid this, some graphics engines implement "over-rendering",[citation needed] drawing the affected edges of both polygons in the order given by the painter's algorithm. This means that some pixels are actually drawn twice (as in the full painter's algorithm), but this happens on only small parts of the image and has a negligible performance effect.

References

[edit]
  • Foley, James; Feiner, Steven K.; Hughes, John F. (1990). Computer Graphics: Principles and Practice. Reading, MA, USA: Addison-Wesley. p. 1174. ISBN 0-201-12110-7.
  1. ^ Appel, Arthur (1968). Morrel, A. J. H. (ed.). "On calculating the illusion of reality" (PDF). Information Processing, Proceedings of IFIP Congress 1968, Edinburgh, UK, 5-10 August 1968, Volume 2 - Hardware, Applications: 945–950. Archived (PDF) from the original on 2025-08-04.
  2. ^ Romney, Gordon Wilson (2025-08-04). "Computer Assisted Assembly and Rendering of Solids". Archived from the original on November 2, 2020. {{cite journal}}: Cite journal requires |journal= (help)
  3. ^ Gary Scott Watkins. 1970. "A real time visible surface algorithm. Ph.D. Dissertation." The University of Utah. Order Number: AAI7023061.
  4. ^ a b c d e Newell, M. E.; Newell, R. G.; Sancha, T. L. (2025-08-04). "A solution to the hidden surface problem" (PDF). Proceedings of the ACM annual conference on - ACM'72. ACM '72. Vol. 1. Boston, Massachusetts, USA: Association for Computing Machinery. pp. 443–450. doi:10.1145/800193.569954. ISBN 978-1-4503-7491-0. S2CID 13829930. Archived (PDF) from the original on 2025-08-04.
  5. ^ Bouknight, W. Jack (2025-08-04). "A procedure for generation of three-dimensional half-toned computer graphics presentations". Communications of the ACM. 13 (9): 527–536. doi:10.1145/362736.362739. ISSN 0001-0782. S2CID 15941472.
  6. ^ Berland, Dinah (1995). Historical Painting Techniques, Materials, and Studio Practice (PDF). The Getty Conservation Institute.
  7. ^ Wylie, Chris; Romney, Gordon; Evans, David; Erdahl, Alan (2025-08-04). "Half-tone perspective drawings by computer". Proceedings of the November 14-16, 1967, fall joint computer conference on - AFIPS '67 (Fall). Anaheim, California: Association for Computing Machinery. pp. 49–58. doi:10.1145/1465611.1465619. ISBN 978-1-4503-7896-3. S2CID 3282975.
  8. ^ a b Desai, Apurva (2008). Computer Graphics. PHI Learning Pvt. Ltd. ISBN 9788120335240.
  9. ^ a b c d e de Berg, Mark (2008). Computational Geometry (PDF). Springer. Archived (PDF) from the original on 2025-08-04.
  10. ^ de Berg, Mark (1993). Ray Shooting, Depth Orders and Hidden Surface Removal. Lecture Notes in Computer Science. Vol. 703. Springer. p. 130. ISBN 9783540570202..
  11. ^ Warnock, John E. (2025-08-04). "A Hidden Surface Algorithm for Computer Generated Halftone Pictures". Archived from the original on November 8, 2020. {{cite journal}}: Cite journal requires |journal= (help)
  12. ^ Freiser, M.; Marcus, P. (June 1969). "A survey of some physical limitations on computer elements". IEEE Transactions on Magnetics. 5 (2): 82–90. Bibcode:1969ITM.....5...82F. doi:10.1109/TMAG.1969.1066403. ISSN 1941-0069.
  13. ^ Nyberg, Daniel (2011). Analysis of Two Common Hidden Surface Removal Algorithms, Painter's Algorithm & Z-Buffering.
[edit]
眼睛模糊用什么药 男性前列腺炎有什么症状 治疗幽门螺旋杆菌用什么药 苦瓜汤为什么要放黄豆 医学上是什么意思
胃胀吃什么药 急性肠胃炎可以吃什么食物 什么水果补铁效果最好的 四季豆为什么叫四季豆 感冒流鼻涕吃什么药
便秘和腹泻交替出现是什么意思 奋笔疾书的疾是什么意思 早孕期间吃什么最营养 洽谈是什么意思 梦见吃米饭是什么意思
什么叫桑黄 低血糖什么症状有哪些 早泄是什么意思 游山玩水是什么意思 磁共振平扫检查什么
坐卧针毡是什么生肖beikeqingting.com 脚发麻是什么原因hcv8jop5ns7r.cn 缺铁性贫血吃什么食物hcv8jop9ns7r.cn 横梁是什么hcv9jop2ns8r.cn 遭罪什么意思hcv7jop6ns8r.cn
什么叫数字货币hcv8jop5ns8r.cn 石榴木命是什么意思hcv8jop0ns8r.cn 东莞有什么好玩的地方hcv9jop1ns5r.cn 三餐两点什么意思hcv7jop5ns5r.cn 50岁眼睛模糊吃什么好hcv7jop4ns5r.cn
呼吸内镜检查什么fenrenren.com 降维打击是什么意思hcv9jop4ns0r.cn 小厮是什么意思hcv8jop5ns6r.cn 如火如荼是什么意思hcv8jop4ns3r.cn 柳州有什么大学ff14chat.com
蒲公英可以和什么一起泡水喝hcv7jop9ns8r.cn 哈伦裤配什么上衣hcv7jop6ns6r.cn 疝气吃什么药效果好hcv9jop5ns9r.cn 止痛片吃多了有什么副作用kuyehao.com 什么云见日hcv9jop0ns0r.cn
百度