图形学笔记《Fundamentals of Computer Graphics 4th Edition》——【1】Introduction

2023-11-13

  • 计算机图形学:describes any use of computers to create and manipulate images
  • 一般包括specific hardware, file formats, a graphic API
  • 本书尽量避免依赖于任何特定硬件或API
  • 本章内容:基础概念,历史背景,信息资源

Graphics Areas

major areas

  • Modeling: deals with the mathematical specification of shape and appearance properties in a way that can be stored on the computer.
  • Rendering: a term inherited from art and deals with the creation of shaded images from 3D computer models.
  • Animation: a technique to create an illusion of motion through sequences of images.

other areas (maybe not core areas)

  • User interaction: the interface between input devices to the user in imagery, and other sensory feedback.
  • Virtual reality: attempts to immerse the user into a 3D virtual world.
  • Visualization: attempts to give users insight into complex information via visual display.
  • Image processing: deals with the manipulation of 2D images, is used in both the fields of graphics and vision.
  • 3D scanning: uses range-finding technology to create measured 3D models.
  • Computational photography: new ways of photographically capturing objects, scenes, and environments.

Major Applications

  • Video games
  • Cartoons
  • Visual effects: modern films, some not real characters
  • Animated films
  • CAD/CAM: computer-aided design, computer-aided manufacturing
  • Simulation: can be thought of as accurate video gaming
  • Medical imaging: creates meaningful images of scanned patient data. 如computed tomography (CT)
  • Information visualization

Graphic APIs

  • API (application program interface): a standard collection of functions to perform a set of related operations
  • graphics API: a set of functions that perform basic operation such as drawing images and 3D surfaces into windows on the screen

每个图形程序都需要两种API:

  • a graphics API for visual output
  • a user-interface API to get input from the user

目前的两种dominant paradigms for graphics and user-interface APIs:

  • the integrated approach, 如Java, always fully standardized and supported as part of the language
  • Direct3D and OpenGL, part of a software library tied to a language such as C++

Graphics Pipeline

  • 3D graphics pipeline: a special software/hardware subsystem that efficiently draws 3D primitives(基本体) in perspective(透视)
  • 处理前后透视关系采用z-buffer
  • 图形管线中主要使用四维空间,4×4矩阵,4维向量——3 traditional geometric coordinates + a fourth homogeneous(齐次) coordinate (helps with perspective viewing)
  • 大多数情况下,重要性排序:速度 > 质量
  • level of detail (LOD): fewer triangles are needed than when the model is viewed from a closer distance

Numerical Issues

曾经的数码处理非常混乱,直到出现了IEEE floating-point standrad,下面是一些比较重要的规则:

  • 一些特殊值:正无穷( )、负无穷()、不是个数(NaN)
  • 有关这些特殊值的一些计算结果:
    +a/(+)=+0 + a / ( + ∞ ) = + 0
    a/(+)=0 − a / ( + ∞ ) = − 0
    +a/()=0 + a / ( − ∞ ) = − 0
    a/()=+0 − a / ( − ∞ ) = + 0
    +=+ ∞ + ∞ = + ∞
    =NaN ∞ − ∞ = N a N
    ×= ∞ × ∞ = ∞
    /=NaN ∞ / ∞ = N a N
    /a= ∞ / a = ∞
    /0= ∞ / 0 = ∞
    0/0=NaN 0 / 0 = N a N
  • 一些bool判断规则
    • all finite valid numbers < + + ∞
    • all finite valid numbers > − ∞
    • <+ − ∞ < + ∞
    • any arithmetic expression that includes NaN results in NaN
    • any boolean expression involving NaN is false
  • 这些IEEE规则减少了很多条件判断和程序出错的频率

Efficiency

优化重点与当前哪项技术的发展较为落后有关,即优化方式是随着时代发展不断变化的。但仍然有reasonable approach to making code fast:

  1. Write the code in the most straightforward way possible. Compute intermediate(中间) results as needed on the fly(不工作?) rather than storing them.
  2. Compile in optimized mode.
  3. Use whatever profiling tools exist to find critical bottlenecks.
  4. Examine date structures to look for ways to improve locality. If possible, make data unit sizes match the catch/page size on the target arthitecture.
  5. If profiling reveals bottlenecks in numeric computations, examine the assembly code generated by the compiler for missed efficiencies. Rewrite source code to solve any problems you find.

最重要的其实是第一步,不能为了优化放弃代码的可读性和可扩展性。

Designing and Coding Graphics Programs

Class Design

  • vector2
  • vector3
  • hvector: a homogeneous vector with four components
  • rgb
  • transform: a 4×4 matrix for transformations
  • image: a 2D array of RGB pixels with an output operation

Float vs. Double

  • float: keeping memory use down and maintaining coherent memory access
  • double: avoiding numerical problems

根据自己的项目决定~

Debugging Graphics Programs

很少使用traditional debuggers,因为找BUG效率太低,常用的方法有这些~:

  • The Scientific Method: create an image and observe what is wrong with it → develop a hypothesis(假设) about what is causing the problem and test it. 如,关闭环境光,看看变化~
  • Images as Coded Debugging Output: copy the value directly to the output image and skip the rest of the calculations that would normally be done. 如,直接把法线值copy到图片中输出
  • Using a Debugger: 图形学中debug难点是,每个操作都要重复很多遍(每个像素点一遍)。因此一种debug方法是,在找到问题所在位置后,加上特定的breakpoint,如~
if x = 126 and y = 247 then
    print "blarg!"
  • Data Visualization for Debugging: 为自己设计好怎样显示数据能更有利于debug~

some annual conferences related to computer graphics:

  • ACM SIGGRAPH
  • SIGGRAPH Asia
  • Graphics Interface
  • the Game Developers Conference (GDC)
  • Eurographics
  • Pacific Graphics
  • High Performance Graphics
  • the Eurographics Symposium on Rendering
  • IEEE VisWeek
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

图形学笔记《Fundamentals of Computer Graphics 4th Edition》——【1】Introduction 的相关文章

随机推荐

  • Java语言实现通讯录,联系人信息存在数据库里

    通讯录管理 问题描述 编写一个简单的通讯录管理程序 通讯录中需要存储姓名 地址 电话号码 邮政编码四项 还可以存储Email 家庭电话等信息 基本要求 程序应提供的基本管理功能有 1 添加 即增加一个人的记录到通信录中 2 显示 即在屏幕上
  • postman 将返回值设置为环境变量

    代码如下 var jsonData JSON parse responseBody pm globals set token jsonData data token
  • win2012 管理用户账号点滴

    1 c windows system32 config SAM 存储本地用户账号 2 cmd gt set 可以查看很多信息 包括logon server 3 创建一般服务账号的时候 要选择 密码永不过期 4 cmd gt net user
  • 【数据结构】线性表的顺序存储结构

    线性表 由n n 0 个数据元素 结点 a1 a2 an组成的有限序列 其中数据元素的个数n定义为表的长度 当n 0时称为空表 常常将非空的线性表 n gt 0 记作 a1 a2 an 这里的数据元素ai 1 i n 只是一个抽象的符号 其
  • DNS & bind详解

    文章目录 1 DNS基础知识 1 1 DNS的出现及演化 1 2 什么是DNS 1 3 域的分类 1 4 主机名 域名 FQDN 1 5 DNS解析流程 1 6 DNS分类 1 7 资源记录 2 DNS安装配置 2 1 安装DNS 2 2
  • 《C++ Primer》学习笔记(十六):模板与泛型编程

    C Primer 学习笔记 十六 模板与泛型编程 定义模板 函数模板 类模板 模板参数 控制实例化 模板实参推断 类型转换与模板类型参数 尾置返回类型与类型转换 模板实参推断和引用 转发 可变参数模板 模板特例化 定义模板 函数模板 tem
  • 简单记录我的第一个云服务器:华为云服务器

    一直想买个服务器用来瞎鼓捣 或者说把之前的一些乱七八糟的小项目部署到服务器给自己的 object 看 但是我也很无奈昂 一个菜鸡 临近毕业了说来就来 于是就买了个华为云服务器 毕竟在某地培训很是无聊 服务器如下 因为用的是linux系统 需
  • 越来越火的Serverless(无服务器计算),到底是个啥?

    今天这篇文章 我们来聊一个云计算领域的热门概念 Serverless 到底什么是Serverless 英语好的童鞋 可能一眼就看出来了 Serverless是由Server和less两个词根组成的词 从字面上理解 就是 无服务器 行业通常所
  • 【C++】类与类之间的 5 种关系

    文章目录 前沿 1 继承关系 2 关联关系 3 聚合关系 4 组合关系 5 依赖关系 6 比较五种关系 前沿 该文章就是简要的总结一下面向对象的 类与类之间的关系 熟悉类与类之间的关系 能够帮助我们更好的设计出合理的类 1 继承关系 继承关
  • Python进阶-----面向对象3.0(面对对象三大特征之---封装)

    目录 前言 什么是封装 Python私有化封装 习题 前言 上一期是讲解Python中类的私有属性和方法 其实很好理解 我给一个类中的部分属性进行加密拒绝访问 上一期链接Python进阶 面向对象2 0 特有属性和方法与私有属性和方法 Py
  • VirtualBox安装Ubuntu(20.10桌面版)教程

    由于学校的课程需要 需要安装一个Linux系统 根据电脑配置 8G运存 250G硬盘剩余 最终选择了使用虚拟机 VirtualBox 免费开源 上安装Linux系统 Ubuntu 使用最多 BUG少 界面简洁 的方案 根据需求 我将安装过程
  • DDoS攻击及防御技术综述

    DDoS攻击及防御技术综述 本文内容为论文转载 摘 要 分布式拒绝服务攻击 Distributed Denial of Service DDoS 是互联网上有严重威胁的攻击方式之一 难以完全对其进行防御 介绍DDoS攻击的技术原理 在此基础
  • 如何在CSDN中发布博客

    1 首先打开CSDN官网 进行注册然后登录 登录以后看到的界面如下 2 进入会员中心右边有个创作中心点进去 看到界面如下 3 在上界面中 可以单击 发布 直接写博客 如下所示 4 也可以单击 Markdown编辑器 或者 富文本编辑器 进入
  • react入门(六)——组合组件

    什么是组合组件 大家都知道我们在做项目的时候不可能只有一个组件或两个组件 是由很多个组件组合使用的 而且每个组件之间或多或少的有些关系 我把这些组件就称作组合组件 例如我们想要实现以下效果 分析 拆分为静态组件 我们可以将他拆分为三个组件
  • 【Spark Operator】核数设置Cores/Cores Limit/Cores Request,你搞清楚没有?

    我们先看下 Spark 3 0 官方文档 关于几个 Core 的参数的解读 spark driver cores spark kubernetes driver request cores spark kubernetes driver l
  • 关于windows下DPI详解

    什么DPI 全称是dots per inch DPI 也就是每英寸的点数 在显示器上就是每英寸的像素个数 Window上一般默认是96 dpi 作为100 的缩放比率 但是要注意的是该值未必是真正的显示器物理值 只是Windows里我们的一
  • 用vue写一个分页展示的列表

    我可以提供一些有关如何使用Vue来创建分页展示列表的建议 首先 你需要使用Vue js和vue router组件来实现路由功能 然后使用Vuex来管理状态 并使用Axios来实现与后端API的交互 最后使用Vue组件来实现分页展示功能
  • 2023年正在使用的设计资源网站分享

    这篇文章 也将整理出我今年一直都在使用的设计资源网站 作为设计师一定是离不开优质的资源网站的 我自己的话会每天都花一两个小时的时间去浏览自己的收藏的这些资源网站 哪怕只是简单的浏览 也可以在无形中增加自己对设计的 设计感 即时 AI 画廊这
  • maven jar包 私服 拉去问题,加载jar包时报错ReasonPhrase:unauthorized

    当我们的项目开发完成以后 可能要进行发布 如果是独立的项目 就不需要发布啦 如果是模块项目 那么就要发布到nexus里 供其他开发人员下载调用 要想发布项目到nexus里 必须通过
  • 图形学笔记《Fundamentals of Computer Graphics 4th Edition》——【1】Introduction

    Graphics Areas major areas other areas maybe not core areas Major Applications Graphic APIs Graphics Pipeline Numerical