Z 缓冲区(Z-buffer)算法是如何解决隐藏面消除的?
How does the Z-buffer algorithm solve hidden-surface removal?
Z 缓冲区为每个像素保存当前已绘制物体的深度(Z 值),新片元只有在比已存深度更近时才覆盖该像素,从而高效决定哪些表面可见。它把复杂的几何排序转化为逐像素的深度比较,易于在硬件上实现,是现代 GPU 光栅化的基础之一。该思想由卡特莫尔在 1974 年提出。
The Z-buffer keeps the depth (Z value) of the nearest drawn object per pixel; a new fragment overwrites that pixel only if it is closer, efficiently deciding which surfaces are visible. It turns tricky geometric sorting into per-pixel depth comparison and is easy to implement in hardware, forming a basis of modern GPU rasterization. The idea was introduced by Catmull in 1974.
难度 专业 · 适合 高中(15-18)
CC BY 4.0 · 已核验 · Verified 2026-10-04
来源 · Source
Catmull 1974;Foley 等《计算机图形学:原理与实践》
Catmull (1974); Foley et al., Computer Graphics: Principles and Practice
独立核验依据 · Independent verification: 核验依据 1 ISBN 9780201121100 (1990)
#Z缓冲区 #隐藏面消除 #深度缓冲 #光栅化
栅格(位图)图形和矢量图形有什么区别?
What is the difference between raster (bitmap) and vector graphics?
栅格图形以像素网格存储图像(如 PNG、JPEG),放大后会失真或出现锯齿;矢量图形以数学路径(点、线、曲线)描述形状(如 SVG),可任意缩放而保持清晰。栅格适合照片等连续色调内容,矢量适合图标、字体和需无损放大的图形。二者取舍核心在于保真度与文件体积/可编辑性。
Raster graphics store an image as a grid of pixels (e.g., PNG, JPEG) and lose quality or show jaggies when scaled up; vector graphics describe shapes with mathematical paths (points, lines, curves), such as SVG, and stay sharp at any zoom. Raster suits continuous-tone content like photos, while vector suits icons, fonts, and graphics needing lossless scaling. The trade-off centers on fidelity versus file size and editability.
难度 进阶 · 适合 初中(12-15)
CC BY 4.0 · 已核验 · Verified 2026-10-04
来源 · Source
Foley 等《计算机图形学:原理与实践》;Hughes 等《计算机图形学》
Foley et al., Computer Graphics: Principles and Practice; Hughes et al., Computer Graphics
独立核验依据 · Independent verification: 核验依据 1 ISBN 9780201121100 (1990)
#栅格图形 #矢量图形 #SVG #位图
光线追踪(ray tracing)是什么?它为什么能生成逼真的图像?
What is ray tracing, and why does it produce realistic images?
光线追踪从相机向场景投射光线,模拟其与物体、光源的交互(反射、折射、遮挡)来合成图像;因为沿物理光路求解,镜面反射、折射与精确遮挡关系都能自然得到。惠特德在 1980 年提出带递归反射/折射的改进光照模型,奠定了现代离线渲染的基础。但基础光线追踪只产生硬阴影,软阴影、景深与全局光照需要分布式光线追踪(Cook 等 1984)或路径追踪(Kajiya 1986)等蒙特卡洛方法。
Ray tracing synthesizes images by shooting rays from the camera into a scene and simulating their interaction with objects and lights (reflection, refraction, occlusion); because it follows physical light paths, specular reflection, refraction, and exact visibility come out naturally. Whitted's 1980 improved illumination model with recursive reflection and refraction laid the foundation of modern offline rendering. Basic ray tracing, however, yields only hard shadows—soft shadows, depth of field, and global illumination require Monte Carlo methods such as distributed ray tracing (Cook et al. 1984) or path tracing (Kajiya 1986).
难度 进阶 · 适合 初中(12-15)
CC BY 4.0 · 已核验 · Verified 2026-11-04
来源 · Source
Whitted 1980(Communications of the ACM 23(6));Cook, Porter & Carpenter 1984(分布式光线追踪,SIGGRAPH);Kajiya 1986《The Rendering Equation》(SIGGRAPH)
Whitted (1980), CACM 23(6); Cook, Porter & Carpenter (1984), distributed ray tracing, SIGGRAPH; Kajiya (1986), 'The Rendering Equation', SIGGRAPH
独立核验依据 · Independent verification: 核验依据 1 Crossref DOI 10.1145/964965.808590
#光线追踪 #全局光照 #反射折射 #惠特德