diff --git a/.gitignore b/.gitignore index 3d27c2c..92ca570 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ + + public/ /public \ No newline at end of file diff --git a/public/404.html b/public/404.html deleted file mode 100644 index 48aef59..0000000 --- a/public/404.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - 404 Page not found | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-

404 - 页面不存在

- -
-
-
- - diff --git a/public/408/index.html b/public/408/index.html deleted file mode 100644 index 9b966bd..0000000 --- a/public/408/index.html +++ /dev/null @@ -1,440 +0,0 @@ - - - - - - - - - - - - - - - - - - 408 | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
-
- - -

408

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

2022

- - - - - - -
-
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/408/操作系统操作系统发展历程/index.html b/public/408/操作系统操作系统发展历程/index.html deleted file mode 100644 index 8a0af4b..0000000 --- a/public/408/操作系统操作系统发展历程/index.html +++ /dev/null @@ -1,459 +0,0 @@ - - - - - - - - - - - - - - - - - - 《操作系统》操作系统发展历程 | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

《操作系统》操作系统发展历程

- - - - - - - - - -
-

手工操作阶段

-

用户在计算机上的所有计算流程都要人工干预

-

缺点:

-
    -
  1. 用户独占全机,虽然不会出现因资源已被用户占用而等待的现象,但资源利用率极低
  2. -
  3. CPU等待手工操作,CPU利用不充分
  4. -
-

批处理阶段

-

单道批处理系统

-

主要在解决人机矛盾及CPU和I/O设备不匹配的问题

-

特征:

-
    -
  1. 自动性,顺利的情况下,同一磁带上的同一批作业能够自动逐个运行
  2. -
  3. 顺序性,磁带上的各道作业顺序地进入内存
  4. -
  5. 单道性,内存中仅有一道程序运行
  6. -
-

多道批处理系统

-

多道程序设计的特点是多道、宏观上并行,微观上串行

-
    -
  1. 多道。计算机内存中同时存放多道相互独立的程序
  2. -
  3. 宏观上并行。同时进入系统的多道程序都出于运行过程中,即先后开始各自运行但都未运行完毕
  4. -
  5. 微观上串行。内存中的多道程序轮流占有CPU,交替执行
  6. -
-

优点:

-

资源利用率高,多道程序共享计算机资源,从而使各种资源得到充分利用;系统吞吐量打,CPU和其他资源保持“忙碌”状态

-

缺点:

-

用户响应时间较长;不提供人机交互能力,用户既不能了解自己的程序的运行情况,又不能控制计算机

-

分时操作系统

-

分时操作系统是指多个用户通过终端同时共享一台主机,用户可以同时与主机进行交互操作而互不干扰

-

特征:

-
    -
  1. 同时性
  2. -
  3. 交互性,用户能够方便进行人机对话
  4. -
  5. 独立性,多个用户可以彼此独立地进行操作
  6. -
  7. 及时性,用户请求能在很短的时间内响应
  8. -
-

实时操作系统

-

根据响应时间限制分为两种:

-
    -
  1. 硬实时系统:某个动作必须绝对地在规定的时刻发生
  2. -
  3. 软实时系统:能够接受偶尔违反时间规定的情况且不会引起任何永久性的损害
  4. -
-

特点:

-
    -
  1. 及时性
  2. -
  3. 可靠性
  4. -
-

网络操作系统和分布式计算机系统

- -
- - - - -
- - - - -
- - -updatedupdated2023-06-182023-06-18 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/408/操作系统操作系统的基本概念/index.html b/public/408/操作系统操作系统的基本概念/index.html deleted file mode 100644 index d1ec27c..0000000 --- a/public/408/操作系统操作系统的基本概念/index.html +++ /dev/null @@ -1,576 +0,0 @@ - - - - - - - - - - - - - - - - - - 《操作系统》操作系统的基本概念 | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

《操作系统》操作系统的基本概念

- - - - - - - - - -
-

知识框架

-
    -
  • 概论 -
      -
    • 特征 -
        -
      • 并发(最基本)
      • -
      • 共享(最基本)
      • -
      • 虚拟
      • -
      • 异步
      • -
      -
    • -
    • 目标和功能 -
        -
      • 计算机系统资源管理者
      • -
      • 扩充机器
      • -
      • 用户与计算机系统之间的接口 -
          -
        • 命令接口
        • -
        • 程序接口
        • -
        • GUI
        • -
        -
      • -
      -
    • -
    • 发展 -
        -
      • 批处理操作系统$\rightarrow$分时操作系统$\rightarrow$实时操作系统$\rightarrow$网络和分布式操作系统
      • -
      -
    • -
    • 运行机制 -
        -
      • 中断和异常
      • -
      • 系统调用
      • -
      -
    • -
    • 体系结构 -
        -
      • 大内核
      • -
      • 微内核
      • -
      -
    • -
    -
  • -
-

操作系统的基本概念

-

操作系统的概念

-

操作系统是只控制和管理整个计算机系统的硬件与软件资源,合理地组织、调度计算机的工作与资源的分配,进而为用户和其他软件提供方便接口与环境的程序集合。

-

操作系统是计算机系统中最基本的系统软件

-

操作系统的特征

-

基本特征包括并发、共享、虚拟和异步

-

并发

-

并发指两个或多个事件在同一时间间隔内发生

-

操作系统的并发性指计算机系统中同时存在多个运行的程序,因而具有处理和调度多个程序同时执行的能力。

-

同一时间间隔(并发)和同一时刻(并行)的区别:

-
    -
  1. 宏观上有多道程序同时进行,微观上这些程序依旧是分时交替执行的,操作系统的并发性正是分时得以实现的
  2. -
  3. 并行性则是具有同时进行运算或操作的特性,同一时刻能完成两种或两种以上的工作,需要硬件的支持
  4. -
-

共享

-

共享通常指系统中的资源可供内存中多个并发执行的进程共同使用,拥有两种资源共享方式

-
    -
  • 互斥共享方式
  • -
-

互斥式共享:

-

当进程A访问某个资源时,必须先提出请求,若此时该资源空闲,则系统将其分配给进程A使用,此后有其他进程也要访问该资源时,就必须等待。仅当进程A访问完并释放该资源后,才允许另一个进程对该资源进行访问。

-

临界资源(独占资源):

-

一段时间内只允许一个进程访问的资源

-

互斥共享要求一种资源在一段时间内(哪怕是很小的时间)只能满足一个请求,否则就会出现严重的问题

-
    -
  • 同时访问方式
  • -
-

宏观上存在一些资源允许多个进程同时访问,微观上这些进程是交替地对该资源进行访问,即分时共享

-
-

并发和共享是操作系统两个最基本的特征,两者互为存在的条件:

-
    -
  1. 资源共享是以程序的并发为条件的,若系统不允许程序并发执行,则自然不存在资源共享问题
  2. -
  3. 若系统不能对资源共享实施有效的管理,则必将影响到程序的并发执行,甚至根本无法并发执行
  4. -
-

虚拟

-

虚拟是指把一个物理上的实体变为若干逻辑上的对应物。

-

操作系统中采用了多种虚拟技术来实现虚拟处理器、虚拟内存和虚拟外部设备等

-

虚拟技术可归纳为:

-
    -
  1. 时分复用技术,如处理器的分时共享
  2. -
  3. 空分复用技术,如虚拟存储器
  4. -
-

异步

-

程序的异步性:

-

多道程序环境允许多个程序并发执行,但由于资源有限,进程执行并非一贯到底,而是走走停停,以不可预知的速度向前推进

-

异步性导致的问题:

-

异步性会使操作系统运行在一种随机的环境下,可能导致进程产生与时间有关的错误。然而在运行环境相同的情况下,操作系统就需要保证多次运行进程后得到的结果相同

-

操作系统的目标和功能

-

操作系统应具有以下功能来给多道程序提供良好的运行环境

-
    -
  1. 处理机管理、存储器管理、设备管理和文件管理
  2. -
  3. 需向用户提供接口以方便用户使用
  4. -
  5. 可用于扩充机器来提供更方便的服务、更高的资源利用率
  6. -
-

操作系统作为计算机系统资源的管理者

-
    -
  • 处理机管理
  • -
-

在多道程序环境下,处理机的分配和运行都以进程(线程)为主要单位

-

处理机的管理可归结为对进程的管理,因此进程创建、撤销、管理、避免冲突、合理共享就是进程管理的主要任务

-

进程管理的主要功能:

-
    -
  1. 进程控制
  2. -
  3. 进程同步
  4. -
  5. 进程通信
  6. -
  7. 死锁处理
  8. -
  9. 处理机调度
  10. -
-
    -
  • 存储器管理
  • -
-

存储器管理用于给多道程序的运行提供良好环境,便于用户使用及提高内存利用率

-

主要功能:

-
    -
  1. 内存分配与回收
  2. -
  3. 地址映射
  4. -
  5. 内存保护与共享
  6. -
  7. 内存扩充
  8. -
-
    -
  • 文件管理
  • -
-

负责文件管理的部分称为文件系统

-

主要功能:

-
    -
  1. 文件存储空间的管理
  2. -
  3. 目录管理
  4. -
  5. 文件读写管理和保护
  6. -
-
    -
  • 设备管理
  • -
-

主要任务是完成用户I/O请求,方便用户使用设备,提高设备利用率

-

主要功能:

-
    -
  1. 缓冲管理
  2. -
  3. 设备分配
  4. -
  5. 设备处理
  6. -
  7. 虚拟设备
  8. -
-

操作系统作为用户与计算机硬件系统之间的接口

-
命令接口
-
    -
  • 联机命令接口
  • -
-

联机命令接口又称为交互式命令接口,适用于分时或实时系统的接口

-

可由用户在控制台或终端输入命令,经命令解释程序解释并执行后,控制权再转交回控制台或终端,这一过程往往强调交互性

-

常见为 命令提示符中输入单条指令

-
    -
  • 脱机命令接口
  • -
-

脱机命令接口又称为批处理命令接口,适用于批处理系统

-

脱机用户不能干预作业运行,事先使用作业控制命令编写"命令清单",系统调度到该作业时,命令解释程序逐条解释并执行,从而间接控制作业的进行

-

常见为 使用命令编写脚本后运行

-
程序接口
-

该接口由一组系统调用组成,用户通过在程序中使用这些系统调用来请求操作系统为其提供服务

-

常见为用户图形界面(GUI),如linux的KDE桌面

-

操作系统用作扩充机器

-

没有任何软件支持的计算称为裸机,它仅是计算机系统的物质基础。操作系统提供的资源管理功能和方便用户的各种服务功能,将裸机改造成功能更强,使用更方便的机器

-

通常将覆盖了软件的机器称为扩充机器或虚拟机

- -
- - - - -
- - - - -
- - -updatedupdated2023-06-182023-06-18 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/408/操作系统的基本概念/index.html b/public/408/操作系统的基本概念/index.html deleted file mode 100644 index 735c991..0000000 --- a/public/408/操作系统的基本概念/index.html +++ /dev/null @@ -1,582 +0,0 @@ - - - - - - - - - - - - - - - - - - <操作系统>操作系统的基本概念 | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

<操作系统>操作系统的基本概念

- - - - - - - - - -
-

知识框架

-
    -
  • 概论 -
      -
    • 特征 -
        -
      • 并发(最基本)
      • -
      • 共享(最基本)
      • -
      • 虚拟
      • -
      • 异步
      • -
      -
    • -
    • 目标和功能 -
        -
      • 计算机系统资源管理者
      • -
      • 扩充机器
      • -
      • 用户与计算机系统之间的接口 -
          -
        • 命令接口
        • -
        • 程序接口
        • -
        • GUI
        • -
        -
      • -
      -
    • -
    • 发展 -
        -
      • 批处理操作系统$\rightarrow$分时操作系统$\rightarrow$实时操作系统$\rightarrow$网络和分布式操作系统
      • -
      -
    • -
    • 运行机制 -
        -
      • 中断和异常
      • -
      • 系统调用
      • -
      -
    • -
    • 体系结构 -
        -
      • 大内核
      • -
      • 微内核
      • -
      -
    • -
    -
  • -
-

操作系统的基本概念

-

操作系统的概念

-

操作系统是只控制和管理整个计算机系统的硬件与软件资源,合理地组织、调度计算机的工作与资源的分配,进而为用户和其他软件提供方便接口与环境的程序集合。

-

操作系统是计算机系统中最基本的系统软件

-

操作系统的特征

-

基本特征包括并发、共享、虚拟和异步

-

并发

-

并发指两个或多个事件在同一时间间隔内发生

-

操作系统的并发性指计算机系统中同时存在多个运行的程序,因而具有处理和调度多个程序同时执行的能力。

-

同一时间间隔(并发)和同一时刻(并行)的区别:

-
    -
  1. 宏观上有多道程序同时进行,微观上这些程序依旧是分时交替执行的,操作系统的并发性正是分时得以实现的
  2. -
  3. 并行性则是具有同时进行运算或操作的特性,同一时刻能完成两种或两种以上的工作,需要硬件的支持
  4. -
-

共享

-

共享通常指系统中的资源可供内存中多个并发执行的进程共同使用,拥有两种资源共享方式

-
    -
  • 互斥共享方式
  • -
-

互斥式共享:

-

当进程A访问某个资源时,必须先提出请求,若此时该资源空闲,则系统将其分配给进程A使用,此后有其他进程也要访问该资源时,就必须等待。仅当进程A访问完并释放该资源后,才允许另一个进程对该资源进行访问。

-

临界资源(独占资源):

-

一段时间内只允许一个进程访问的资源

-

互斥共享要求一种资源在一段时间内(哪怕是很小的时间)只能满足一个请求,否则就会出现严重的问题

-
    -
  • 同时访问方式
  • -
-

宏观上存在一些资源允许多个进程同时访问,微观上这些进程是交替地对该资源进行访问,即分时共享

-
-

并发和共享是操作系统两个最基本的特征,两者互为存在的条件:

-
    -
  1. 资源共享是以程序的并发为条件的,若系统不允许程序并发执行,则自然不存在资源共享问题
  2. -
  3. 若系统不能对资源共享实施有效的管理,则必将影响到程序的并发执行,甚至根本无法并发执行
  4. -
-

虚拟

-

虚拟是指把一个物理上的实体变为若干逻辑上的对应物。

-

操作系统中采用了多种虚拟技术来实现虚拟处理器、虚拟内存和虚拟外部设备等

-

虚拟技术可归纳为:

-
    -
  1. 时分复用技术,如处理器的分时共享
  2. -
  3. 空分复用技术,如虚拟存储器
  4. -
-

异步

-

程序的异步性:

-

多道程序环境允许多个程序并发执行,但由于资源有限,进程执行并非一贯到底,而是走走停停,以不可预知的速度向前推进

-

异步性导致的问题:

-

异步性会使操作系统运行在一种随机的环境下,可能导致进程产生与时间有关的错误。然而在运行环境相同的情况下,操作系统就需要保证多次运行进程后得到的结果相同

-

操作系统的目标和功能

-

操作系统应具有以下功能来给多道程序提供良好的运行环境

-
    -
  1. 处理机管理、存储器管理、设备管理和文件管理
  2. -
  3. 需向用户提供接口以方便用户使用
  4. -
  5. 可用于扩充机器来提供更方便的服务、更高的资源利用率
  6. -
-

操作系统作为计算机系统资源的管理者

-
    -
  • 处理机管理
  • -
-

在多道程序环境下,处理机的分配和运行都以进程(线程)为主要单位

-

处理机的管理可归结为对进程的管理,因此进程创建、撤销、管理、避免冲突、合理共享就是进程管理的主要任务

-

进程管理的主要功能:

-
    -
  1. 进程控制
  2. -
  3. 进程同步
  4. -
  5. 进程通信
  6. -
  7. 死锁处理
  8. -
  9. 处理机调度
  10. -
-
    -
  • 存储器管理
  • -
-

存储器管理用于给多道程序的运行提供良好环境,便于用户使用及提高内存利用率

-

主要功能:

-
    -
  1. 内存分配与回收
  2. -
  3. 地址映射
  4. -
  5. 内存保护与共享
  6. -
  7. 内存扩充
  8. -
-
    -
  • 文件管理
  • -
-

负责文件管理的部分称为文件系统

-

主要功能:

-
    -
  1. 文件存储空间的管理
  2. -
  3. 目录管理
  4. -
  5. 文件读写管理和保护
  6. -
-
    -
  • 设备管理
  • -
-

主要任务是完成用户I/O请求,方便用户使用设备,提高设备利用率

-

主要功能:

-
    -
  1. 缓冲管理
  2. -
  3. 设备分配
  4. -
  5. 设备处理
  6. -
  7. 虚拟设备
  8. -
-

操作系统作为用户与计算机硬件系统之间的接口

-
命令接口
-
    -
  • 联机命令接口
  • -
-

联机命令接口又称为交互式命令接口,适用于分时或实时系统的接口

-

可由用户在控制台或终端输入命令,经命令解释程序解释并执行后,控制权再转交回控制台或终端,这一过程往往强调交互性

-

常见为 命令提示符中输入单条指令

-
    -
  • 脱机命令接口
  • -
-

脱机命令接口又称为批处理命令接口,适用于批处理系统

-

脱机用户不能干预作业运行,事先使用作业控制命令编写"命令清单",系统调度到该作业时,命令解释程序逐条解释并执行,从而间接控制作业的进行

-

常见为 使用命令编写脚本后运行

-
程序接口
-

该接口由一组系统调用组成,用户通过在程序中使用这些系统调用来请求操作系统为其提供服务

-

常见为用户图形界面(GUI),如linux的KDE桌面

-

操作系统用作扩充机器

-

没有任何软件支持的计算称为裸机,它仅是计算机系统的物质基础。操作系统提供的资源管理功能和方便用户的各种服务功能,将裸机改造成功能更强,使用更方便的机器

-

通常将覆盖了软件的机器称为扩充机器或虚拟机

-

操作系统的发展与分类

- -
- - - - - - - - - -
- - - - -
- - -updatedupdated2022-08-222022-08-22 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/408/数据结构线性表/index.html b/public/408/数据结构线性表/index.html deleted file mode 100644 index afe2d39..0000000 Binary files a/public/408/数据结构线性表/index.html and /dev/null differ diff --git a/public/CNAME b/public/CNAME deleted file mode 100644 index 6561b99..0000000 --- a/public/CNAME +++ /dev/null @@ -1 +0,0 @@ -inksoul.top \ No newline at end of file diff --git a/public/about/index.html b/public/about/index.html deleted file mode 100644 index 85d6668..0000000 --- a/public/about/index.html +++ /dev/null @@ -1,406 +0,0 @@ - - - - - - - - - - - - - - - - - - About | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

About

- - - - - - - - - -
-
图形学
-

这里放着我出于兴趣琢磨的图形学笔记(随笔),其实也挺想未来从事相关行业的,奈何和本科学校的学习方向完全不同,目前自学中也希望自己能考上研也去参与图形学的研究,得以系统性地学习图形学这浩瀚的知识,算是一个梦想吧

-

参考来源:

-
    -
  1. games101
  2. -
  3. games202
  4. -
  5. games104
  6. -
  7. “实时渲染领域的武林秘籍”《Real-Time Rendering 4th》
  8. -
  9. 毛星云前辈整理的《Real-Time Rendering 4th》的引用文献合集
  10. -
  11. 毛星云前辈整理的《Real-Time Rendering 3rd》提炼总结
  12. -
-

向毛星云前辈致敬!!!!

-
-
算法
-

虽然说做TA的学长前辈说对于这一行业其实对一般算法要求不高,但我会在这里偶尔整理一些常用算法,也会有一些渲染算法的论文复现整理到这

-
-
数学
-

这里存放一些我在学习高数,线代,概率论的一些随笔,一方面是图形学的琢磨用的比较多,另一方面也是考研做题需求

-
-
408
-

存放学习408代号的四门专业课的一些随笔,囿于学校上课内容堪忧(说自己学校坏话貌似不太好,但确实是我自己感受到的),更多还是考研做题内容多些,若对实操感兴趣也会记录一部分

-
-
杂物
-

记录自己用服务器搭建的一些方便自己使用的服务,什么内网穿透,云VSCode,自己的私人git仓库之类的,还有自己逛Github碰到的一些有意思的开源项目,生活上的一些记录,游戏记录+1,总之就是一些难以分类的随笔

-
-

囿于本人知识沉淀有限,知识越丰富,越感知识面之欠缺,如有错误,欢迎点击页脚信封图标给我发邮件指出或在我的ink-soul.github.io项目下提交issue,我会加以验证和改正

- -
- - - - -
- - - - -
- - -updatedupdated2023-06-182023-06-18 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/algorithm/index.html b/public/algorithm/index.html deleted file mode 100644 index 436a04e..0000000 --- a/public/algorithm/index.html +++ /dev/null @@ -1,440 +0,0 @@ - - - - - - - - - - - - - - - - - - Algorithm | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
-
- - -

Algorithm

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

2022

- - - - - - -
-
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/algorithm/分治法/index.html b/public/algorithm/分治法/index.html deleted file mode 100644 index 0bb4b65..0000000 --- a/public/algorithm/分治法/index.html +++ /dev/null @@ -1,601 +0,0 @@ - - - - - - - - - - - - - - - - - - 分治法 | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

分治法

- - - - - - - - - -
-
基本思想
-

将一个规模为n的问题分解为k个规模较小的子问题,这些子问题互相独立且与原问题相同。递归地解这些子问题,然后将各子问题的解合并得到原问题的解 -子问题数量不定,但最好使每个子问题的规模相等

-

一般算法设计模式

-
divide-and-conquer(p)
-{
-    if(|p|<=n0) 
-        adhoc(p);
-    divide p into smaller subinstances p1,p2,pk;
-    for(i=1,i<=k,k++)
-        yi=divide-and-conquer(pi);
-    return merge(y1,···,yk);
-}
-

-
二分搜索技术
-

将n个元素分成个数大致相同的两半,取a[n/2]与x进行比较。

-
    -
  1. -

    $x=[n/2]$,则找到x,算法终止

    -
  2. -
  3. -

    $x<a[n/2]$,在数组a的左半部继续搜索x

    -
  4. -
  5. -

    $x>a[n/2]$,在数组a的右半部继续搜索x

    -

    具体算法

    -
    -
    -
    -
     1
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
    - 9
    -10
    -11
    -12
    -13
    -14
    -15
    -16
    -
    -
     public static int binarySearch(int [] a,int x,int n){
    - //在a[0]<=a[1]<=···<=a[n-1]中搜索x
    - //找到x时返回起在数组中的位置,则返回-1
    - int left =0;int right=n-1;
    - while(left<=right)
    - {
    - int middle=(left+right)/2;
    - if(x==a[middle])
    -     return middle;
    - if(x>a[middle])
    -     left=middle+1;
    - else
    -     right=middle-1;
    - }
    - return-1;//未找到x
    - }
    -
    -
    -
  6. -
-
棋盘覆盖
-

在一个$2^k\times2^k$ 个方格组成的棋盘中,恰有一个方格与其他方格不同,称该方格为一特殊方格,且称该棋盘为一特殊棋盘,在该问题中要用4中种不同形态的L型骨牌覆盖给定的特殊棋盘上除特殊方格以外的所有方格,且任意2个L型骨牌不得重叠覆盖

-

利用分治法得出的简洁算法

-

当k>0时,将$ 2^k\times 2^k $棋盘分割为4个$ 2^{k-1}\times 2^{k-1}$ 子棋盘,特殊方格必定位于4个较小子棋盘之一,其余3个子棋盘中无特殊方格。未来将这3个无特殊方格的子棋盘转化为特殊棋盘,可以用一个L型骨牌覆盖着3个较小棋盘的会合处,这3个子棋盘上被L型骨牌覆盖的方格就成为该棋盘上的特殊方格,从而将原问题转化为4个较小规模的棋盘覆盖问题,递归地使用这种分割,直至棋盘简化为1

-
-
-
-
 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-
-
public class Divide_and_conquer {
-    public void chessBoard(int tr,int tc,int dr,int dc,int size){
-        int tile=0;
-        int board[][]=new int[6][6];
-        if(size==1)
-            return;
-        int t=tile++,
-        s=size/2;
-
-        //覆盖左上角棋盘
-        if(dr<tr+s&&dc<tc+s)
-            chessBoard(tr, tc, dr, dc, s);
-        else{
-        //用t号L型骨牌覆盖右下角
-            board[tr+s-1][tc+s-1]=t;
-        //覆盖其余方格
-            chessBoard(tr,tc,tr+s-1,tc+s-1,s);
-            }
-
-        //覆盖右上角子棋盘
-        if(dr<tr+s&&dc>=tc+s)
-        //特殊方格在此棋盘中
-            chessBoard(tr, tc+s, dr, dc, s);
-        else{
-            //此棋盘中无特殊方格
-            //用t号L型骨牌覆盖左下角
-            board[tr+s-1][tc+s]=t;
-            //覆盖其他方格
-            chessBoard(tr, tc+s, tr+s-1, tc, s);
-            }
-
-        //覆盖左上角棋盘
-        if(dr>=tr+s&&dc<tc+s)
-        //特殊方格在此棋盘中
-            chessBoard(tr+s, tc, dr, dc, s);
-        else{
-        //此棋盘中无特殊方格
-        //用t号L型骨牌覆盖右下角
-            board[tr+s][tc+s-1]=t;
-            //覆盖其他方格
-            chessBoard(tr+s, tc, tr+s, tc+s-1, s);
-            }
-
-        //覆盖右下角子棋盘
-        if(dr>=tr+s&&dc>=tc+s)
-        //特殊方格在此棋盘中
-            chessBoard(tr+s, tc+s, dr, dc, s);
-        else{
-            //此棋盘中无特殊方格
-            //用t号L型骨牌覆盖左下角
-            board[tr+s][tc+s]=t;
-            //覆盖其他方格
-            chessBoard(tr+s, tc+s, tr+s, tc+s, s);
-            }
-
-        }  
-    }
-
-
-
-
- - - - -
- - - - -
- - -updatedupdated2023-06-182023-06-18 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/algorithm/排序合集/index.html b/public/algorithm/排序合集/index.html deleted file mode 100644 index ff8955a..0000000 Binary files a/public/algorithm/排序合集/index.html and /dev/null differ diff --git a/public/algorithm/递归/index.html b/public/algorithm/递归/index.html deleted file mode 100644 index 9a191f5..0000000 --- a/public/algorithm/递归/index.html +++ /dev/null @@ -1,710 +0,0 @@ - - - - - - - - - - - - - - - - - - 递归 | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

递归

- - - - - - - - - -
-
    -
  • 递归技术 -
      -
    • 直接或间接地调用自身的算法称为递归算法
    • -
    • 用函数自身给出定义的函数称为递归函数
    • -
    • 每个递归函数都必须有非递归定义的初始值,否则递归函数无法计算
    • -
    -
  • -
-
-
    -
  • 阶乘函数 -
      -
    • -

      可递归地定义为$n!= \begin{cases}1,& \text{n=0} \\ n(n-1)!,&\text{n>0} \end{cases}$

      -
      -
      -
      -
      1
      -2
      -3
      -4
      -5
      -
      -
       public static int Factorial(int n){
      - if(n==0)
      -     return 1;
      - return n*Factorial(n-1);
      - }
      -
      -
      -
    • -
    -
  • -
-
-
    -
  • -

    Fibonacci数列

    -
      -
    • 可递归地定义为$F(n)=\begin{cases}1, &\text{n=0},1 \\ F(n-1)+F(n-2) &\text{n>1} \end{cases}$
    • -
    -
    -
    -
    -
    1
    -2
    -3
    -4
    -5
    -
    -
     public static int fibonacci(int n){ 
    - if(n<=1)
    -       return 1;  
    - return fibonacci(n-1)+fibonacci(n-2);   
    - }
    -
    -
    -
  • -
-
-
    -
  • -

    排列问题

    -
      -
    • -

      当$n=1时,perm(R)=(r)$,其中r是集合R中唯一的元素;

      -
    • -
    • -

      $当n>1时,perm(R)=(r)$ -$perm(R)由(r_1)perm(R_1),(r_2)perm(R_2),\cdots,(r_n)perm(R_n)构成$

      -
    • -
    • -

      算法perm(list,k,m)递归地产生所有前缀是list[0:k-1],且后缀是list[k:m]的全排列的所有排列。调用perm(list,0,n-1)即产生list[0:n-1]的全排列

      -
    • -
    • -

      一般情况下,$k<m$

      -
      -
      -
      -
       1
      - 2
      - 3
      - 4
      - 5
      - 6
      - 7
      - 8
      - 9
      -10
      -11
      -12
      -13
      -14
      -15
      -16
      -17
      -18
      -19
      -20
      -21
      -22
      -23
      -
      -
      public static void perm(Object[] list,int k,int m){
      -           if(k==m){
      -               //只剩一个元素
      -               for(int i=0;i<=m;i++)
      -                   System.out.print(list[i]);
      -               System.out.println();
      -           }
      -           else
      -           //还有多个元素,递归产生排列
      -               for(int i=k;i<=m;i++)
      -               {  
      -                   MyMath.swap(list,k,i);
      -                   perm(list,k+1,m);
      -                   MyMath.swap(list,k,i);
      -               }
      -       }  
      -public static class MyMath{
      -         public static void swap(Object[] list,int k,int m){
      -             int temp = k;
      -             k = m;
      -             m = temp;  
      -   }
      -       }
      -
      -
      -
    • -
    -
  • -
-
-
    -
  • -

    整数划分问题

    -
      -
    • -

      将正整数$n$表示成一系列正整数之和,$n=n_1+n_2+...+n_k$,其中$n_1\geq n_2\geq ...\geq n_k\geq 1,k\geq 1$

      -
    • -
    • -

      将最大加数$n_1$不大于$m$的划分个数记作$q(n,m)$可建立如下递归关系

      -
        -
      • 当最大加数$n_1$不大于1时,任何正整数n只有一种划分形式,即$n=\begin{matrix} n \\ \overbrace{1+1+\cdots+1}\end{matrix}$
      • -
      • 最大加数$n_1$实际上不能大于$n$。因此,$q(1,m)=1$。
      • -
      • 正整数$n$的划分由$n_1=n$的划分和$n_1\leq n-1$的划分组成
      • -
      • 正整数$n$的最大加数$n_1$不大于$m$的划分由$n_1=m$的划分和$n_1\leq m-1$的划分组成
      • -
      -
    • -
    -
    -
    -
    -
     1
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
    - 9
    -10
    -11
    -
    -
     public static int q(int n,int m){
    -         if((n<1)||(m<1))
    -             return 0;
    -         if((n==1)||(m==1))
    -             return 1;
    -         if(n<m)
    -             return q(n,n);
    -         if(n==m)
    -             return q(n,m-1)+1;
    -         return q(n,m-1)+q(n-m,m);
    -     }
    -
    -
    -
  • -
-
-
    -
  • -

    Hanoi塔问题

    -
      -
    • -

      设a,b,c是三个塔座。开始是在塔座a上有一叠共n个圆盘,这些圆盘自下而上,由大到小地叠在一起。各圆盘从小到大编号为1,2,···,n。现要求将塔座a上的这一叠圆盘移到塔座b上,并仍按同样顺序叠置。在移动圆盘时应该遵守以下移动规则。

      -
        -
      • 每次只移动一个圆盘
      • -
      • 任何时刻都不允许将较大的圆盘压在较小的圆盘之上。
      • -
      • 在满足前两个规则的前提下,可将圆盘移至a,b,c任一塔座上
      • -
      -
    • -
    • -

      递归关系

      -
        -
      • $n=1$时,将编号为一的圆盘从塔座a直接移至塔座b上即可。
      • -
      • $n>1$时,需要利用塔座c作为辅助塔座, -
          -
        • 将$n-1$个较小的圆盘依照移动规则从塔座a移至塔座c,
        • -
        • 将剩下的最大圆盘从塔座a移至塔座b,
        • -
        • 将$n-1$个较小的圆盘依照移动规则从塔座c移至塔座b
        • -
        -
      • -
      -
    • -
    -
    -
    -
    -
     1
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
    - 9
    -10
    -11
    -
    -
     public static void hanoi(int n,char a,char b,char c){
    -         if(n>0){
    -             hanoi(n-1, a, c, b);
    -             move(n,a,b);
    -             hanoi(n-1,c,b,a);
    -         }
    -
    - }
    - public static void move(int n,char a,char b){
    -         System.out.println("第"+n+"个盘子从"+a+"--->"+b);
    -     }
    -
    -
    -
  • -
  • -

    递归调用总结和系统原理

    -
      -
    • 实现递归调用的关键:为算法建立递归调用工作栈
    • -
    • 运行被调用算法前的行为 -
        -
      • 为所有实参指针,返回地址等信息传递给被调用算法
      • -
      • 为被调用算法的局部变量分配存储区
      • -
      • 将控制转移到被调用算法的入口
      • -
      -
    • -
    • 从被调用算法返回调用算法时 -
        -
      • 保存被调用算法的计算结果
      • -
      • 释放分配给被调用算法的数据区
      • -
      • 依照被调用算法保存的返回地址将控制转移到调用算法
      • -
      -
    • -
    • 嵌套调用时的系统原则:后调用先返回,即算法间的信息传递和控制转移通过栈来实现
    • -
    • 递归算法的调用层次 -
        -
      • 调用一个递归算法的主算法为第0层算法
      • -
      • 从主算法调用递归算法为进入第1层调用
      • -
      • 从第i层递归调用本算法为进入第i+1层调用。
      • -
      • 退出第i层递归调用,则返回至i-1层调用。
      • -
      -
    • -
    • 递归调用的栈使用情况示意
    • -
    -
  • -
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
主算法栈块
M
主算法调用递归算法A的栈块
算法A的第一层递归调用工作记录
算法A的第二层递归调用工作记录
TOP
M
- -
- - - - -
- - - - -
- - -updatedupdated2023-06-182023-06-18 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/atom.xml b/public/atom.xml deleted file mode 100644 index 572c1e9..0000000 Binary files a/public/atom.xml and /dev/null differ diff --git a/public/categories/index.html b/public/categories/index.html deleted file mode 100644 index 60c5c9a..0000000 --- a/public/categories/index.html +++ /dev/null @@ -1,1327 +0,0 @@ - - - - - - - - - - - - - - - - - - | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
-
- -

Categories

- -
-
    - - - - - - - - - - - - - - - - - - - -
  • - - - - - 408 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (3) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  • - - - - - - - - - - - - - - - - - - - - - -
  • - - - - - Algorithm - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (3) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  • - - - - - - - - - - - - - - - - - - - - - -
  • - - - - - Computergraphic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (18) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  • - - - - - - - - - - - - - - - - - - - - - -
  • - - - - - Mathematics - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (1) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  • - - - - - - - - - - - - - - - - - - -
  • - - - - - Stuff - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (1) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  • - - - -
-
-
-
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/computergraphic/index.html b/public/computergraphic/index.html deleted file mode 100644 index 0a38aec..0000000 --- a/public/computergraphic/index.html +++ /dev/null @@ -1,545 +0,0 @@ - - - - - - - - - - - - - - - - - - Computergraphic | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
-
- - -

Computergraphic

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

2022

- - - - - - -
-
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/computergraphic/taa/index.html b/public/computergraphic/taa/index.html deleted file mode 100644 index b715e9e..0000000 --- a/public/computergraphic/taa/index.html +++ /dev/null @@ -1,634 +0,0 @@ - - - - - - - - - - - - - - - - - - TAA(temporal antialiasing) | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

TAA(temporal antialiasing)

- - - - - - - - - -
-
-

知识沉淀有限,后续会补充内容

-

当前内容来源:

-

[SIGGRAPH 2016] Temporal Antialiasing in Uncharted 4

-

十分感谢浅墨大佬的整理

-
-
基本思想
-

与超采样类似且在静态图片下实现方式相同

-

对同一像素点内采用多个采样点的方式来减少走样但将采样点分散到了一段时间内的多个帧上,在每帧采样时对采样点进行偏移,即抖动(jitter)来实现MSAA中放置多个次采样点的效果

-

采样序列也使用Halto sequence -

-
jitter的实现
-

采样点的位置会在初始化的时候确定,之后需要在与像素中心距离$[0,1]$的范围里发生偏移

-

实现这个效果只需要对投影矩阵中的值进行改动 -

-

图片中标红的值便是在归一化后的坐标空间里偏移值的替换位置

-

当然,只完成jitter只会让实时渲染的图像发生严重的抖动,接下来我们只需要让这些抖动的帧收敛(converge, PS:实在找不到合适的词来翻译)

-
在渲染管线中的位置
-

TAA Shader

-

输入:

-

当前帧的HDR缓存 -
上一帧的TAA计算结果或者历史结果缓存

-

输出:

-

当前帧的TAA结果,用于输出到渲染管线的下一处理阶段 和 作为下一帧TAA计算的历史结果缓存

-

由此可以推断出TAA Shader在渲染管线的位置

-

Depth only pass (main view scene pass) -
GBuffer pass (main view scene pass) -
Deferred lighting shader $\leftarrow$ HDR -
Temporal AA -
Post processing (tone mapping, motion blur, etc.) $\leftarrow$ LDR

-
静态场景
-

在静态场景下应用TAA

-

设置好输入和输出 -
启用全屏着色 -
在历史值和现在值之间做插值计算

-
-
-
-
1
-2
-3
-
-
float3 currColor = currBuffer.Load(pos);
-float3 historyColor = historyBuffer.Load(pos);
-return lerp(historyColor,currColor,0.05f);
-
-
-

插值时,不同的权重会带来不同的影响 -
当前帧的颜色的权重越高,抖动越明显,但收敛速度较快 -
历史帧的颜色的权重越高,抖动越少,走样越明显,但是收敛速度慢

-

0.05是一个合适的权重值来平衡反走样质量与收敛速度,这意味着每一个新渲染的帧都只对最终的静态场景生成占比5%

-
-
动态场景
-

在动态情况下,我们需要使用全局运动向量来计算当前帧的某一个像素在上一帧的位置坐标

-

所以在GBuffer里我们通常作如下计算 -
$ pos_{proj}\times mat_{wvp}$ -
$ posLast_{proj}=posLast_{obj}\times matLast_{wvp}$

-

由此我们可以总结出计算运动向量(Motion Vector)所需的值

-
    -
  1. 上一帧的相机信息
  2. -
  3. 每一个物体上一帧的$ mat_{o2w}$
  4. -
  5. 每一个蒙皮的物体在上一帧时的骨骼位置,并在每一帧计算两次蒙皮和输出上一帧和目前帧的顶点位置
  6. -
-
-

当然,在GBuffer里我们可以直接获得目前帧的ndc(normalized device coordinate)坐标,出于不将jitter视为运动的目的,我们也要在ndc里去除jitter带来的偏移

-

$ pos_{ndc} -= g_{projOffset} $ -
$ posLast_{ndc} -= g_{projOffsetLast} $ -
$ float2 \quad motionvector = (posLast_{ndc}- pos_{ndc} ) * float2(0.5f,-0.5f) $

-
-

对于滚动的贴图(比如流动的单层贴图水) -
我们需要计算贴图在贴图UV里的变化量(deltaU,deltaV)在屏幕空间里造成了多少变化量(deltaX,deltaY) -
deltaU = ddx(U) * deltaX + ddy(U) * deltaY -
deltaV = ddx(V) * deltaX + ddy(V) * deltaY

-
-

理论上所有物体都应有motion vector,但依旧有某些物体不支持motion vector

-
    -
  1. 有复杂贴图的动画物体,如粒子烟雾,水流,云的移动
  2. -
  3. 半透明物体,因为motion vector仅有一层而无法写入
  4. -
-

当然,我们可以选择将它们的绘制顺序调换至TAA之后,但并非所有物体都允许这么做,任何物体在未经TAA处理的情况下都会发生抖动 -
纠正抖动并非只是简单地去除,还要用抖动后的深度情况进行检测

-
-

在对多种情况进行讨论后,我们便可以开始进行motion vector的混合计算,计算前必须去除当前采样的抖动偏移值

-
-
-
-
1
-2
-3
-4
-5
-6
-
-
//去除抖动偏移值,得到像素中心值
-uv -= _jitter
-//计算上一帧的投影坐标
-float2 uvLast = uv +motionVectorBuffer.Sample(point,uv);
-//双线性模式采样
-float3 historyColor = historyBuffer.Sample(linear,uvLast);
-
-
-

镜头移动的时候,很多物体之间的遮挡关系会发生变化,例如

-
    -
  1. 原本不出现的物体在下一帧出现,原来出现的物体被遮挡而消失
  2. -
  3. 光线发生了改变,阴影的位置改变或高光位置改变
  4. -
-

这会导致采样motion偏移到的位置在上一帧并没有渲染数据,这时为了数据的平滑过渡,可以在像素点位置周围判断深度,取距离最近的点位来采样获取motion vector的值,减弱遮挡错误的影响

-
-
-
-
1
-2
-3
-4
-
-
//通过遍历采样点周围9个像素的方式计算neighborMinneighborMax
-float3 neighborMin,neighborMax;
-
-historyColor = clamp(historyColor,neighborMin,neighborMax);
-
-
-

这种方式也存在一些弊端 -
对于未发生改变的物体,会截断(clamp out)太多不同的历史颜色值 -
$3\times3$的像素点周围采样无法对边缘的反走样生效

-
-

这种计算方式有时会因 neighborhood min/max的值过大使clamp失效而产生鬼影(ghosting)现象

-

解决方法:

-
    -
  1. 使用模板位( stencil bits , PS:这个我也不好翻译)的方式将物体分割为两个部份
  2. -
  3. 将目前帧和上一帧的stencil 输入到TAA shader中处理
  4. -
-
-
-
-
1
-2
-3
-4
-
-
uint currStencil = stencilBuffer.Sample(point,uv);
-uint lastStencil = lastStencilBuffer.Sample(point,uvLast);
-blendFactor = (lastStencil & 0x18) == (currStencil & 0x18) ? blendFactor : 1.f;
-//0x18表示有两个ghosting bits (不好翻译+1)
-
-
-

在经过处理后,鬼影现象消失,但当相机从向右旋转时,人物的左侧边缘像素表现效果较差

-

-

为了减少这种情况的产生,我们在blendFactor为1时,返回一个经过高斯模糊的上一帧的颜色值

-
-
-
-
1
-2
-3
-4
-5
-6
-
-
blendFactor = (lastStencil & 0x18) == (currStencil & 0x18) ? blendFactor :1.f;
-
-float3 blurredCurrColor
-//Gaussian blur currColor with 3x3 neighborhood
-if (blendFactor == 1.f)
-    return blurredCurrColor;
-
-
-

Gaussian blur使用的卷积核与$3\times3$相邻像素采样一致 -
$ \begin{bmatrix} \frac{1}{16} & \frac{1}{8} &\frac{1}{16} \\ \frac{1}{8} &\frac{1}{4} &\frac{1}{8} \\ \frac{1}{16} &\frac{1}{8} &\frac{1}{16} \end{bmatrix} $

-

处理后依旧有1像素厚的鬼影存在 -

-

产生原因: -
Color history 是线性采样,Stencil history 是点采样,两者在边缘并不相容

-

解决方法 -
在stencil buffer里让物体向外扩大1像素

-
    -
  1. 创建输入值为历史帧和stencil buffers的全屏shader
  2. -
  3. 对每一个像素,将它的深度与周围4个相邻像素进行对比
  4. -
  5. 输出深度接近的像素的模板(stencil of pixel)
  6. -
  7. 将扩张的stencil buffer输入TAA
  8. -
  9. 上一帧的stencil应该来自于扩张后
  10. -
  11. 对扩张后的stencil做模板测试(stencil test)
  12. -
  13. 边缘的检测则使用未扩张的版本
  14. -
-
-

在计算完成后我们需要将目前帧的和历史帧的结果混合到一起

-
-
-
-
1
-
-
return lerp(historyColor,currColor,blendFactor)
-
-
-

出于平衡模糊和抖动的目的,blendFactor必须是一个动态的值 -
由UE4在[siggraph 2014]提出的方法可知 -
当局部对比度低的时候增加 -
当历史帧在截断值附近或像素的偏移接近子像素时减少 -
但在这样处理后依旧有模糊的情况残余

-
-

为了修复残余的模糊情况,我们可以再加入一个全屏的锐化处理 -
对一个$3\times3$的相邻像素序列,采取$\begin{bmatrix} 0 &-1 &0 \\ -1 &4 &-1 \\ 0 &-1 &0 \end{bmatrix}$的权重比例,即

-
-
-
-
1
-
-
return saturate(center + 4 * center-up-down-left-right)
-
-
-

-
TAA的性能
-

主体shader在PS4的GPU上渲染1080p分辨率需要0.8ms

-

后续处理也存在开销 -
Motion vector calculation 运动向量计算 -
Sharpen shader (0.15ms) 锐化效果 -
Expand stencil shader(0.4ms) 模板扩张

-
-

WVP和MVP矩阵的区别

-

$ matrix_{objToWorld} $

- -
- - - - -
- - - - -
- - -updatedupdated2023-06-182023-06-18 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/computergraphic/whitted-style光线追踪/index.html b/public/computergraphic/whitted-style光线追踪/index.html deleted file mode 100644 index 08a9d2b..0000000 --- a/public/computergraphic/whitted-style光线追踪/index.html +++ /dev/null @@ -1,534 +0,0 @@ - - - - - - - - - - - - - - - - - - Whitted-style光线追踪(Whitted-style Ray Tracing) | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

Whitted-style光线追踪(Whitted-style Ray Tracing)

- - - - - - - - - -
-

使用光线追踪的原因

-
    -
  1. -

    光栅化无法很好地处理全局效果

    -
      -
    1. 软阴影
    2. -
    3. 光线产生多次反弹
    4. -
    -
  2. -
  3. -

    光栅化处理速度快但质量相对较低

    -
  4. -
  5. -

    光线追踪处理精准,但速度较低

    -
      -
    1. 光栅化:实时渲染,光线追踪:离线渲染
    2. -
    3. 在生产环境中渲染一帧往往需要~10kCPU核心时
    4. -
    -
  6. -
-

光线

-
    -
  1. 光线沿直线传播(虽然是错误的)
  2. -
  3. 光线在相交时互不影响(虽然也是错的)
  4. -
  5. 光线从光源传播到眼睛(且光路是可逆的)
  6. -
-

Ray Casting

-

1968年由Appel提出

-
    -
  1. 通过每个像素投射一条光线的方式来生成图像
  2. -
  3. 通过向光源发送光线的方式来生成阴影
  4. -
-

-

生成视角射线(Generating Eye Rays)

-

Pinhole Camera Model

-

-

着色像素(shading pixel)

-

-

递归式光线追踪(Recursive Ray Tracing)

-

Recursiv Ray Tracing 又名 Whitted-Style Ray Tracing 由T.Whitted在1980年提出

-

"An improved Illumination model for shaded display"

-

-

总体计算流程

-

-
-

射线表面相交计算(Ray-Surface Intersection)

-

在进行射线表面相交计算前我们需要了解射线方程(Ray Equation)

-
Ray Equation and Plane Equation
-

射线:由一个起点和一个方向向量定义

-

对应的射线方程(Ray Equation)为: -$$r(t) = o +td , \ \ \ \ 0\leq t < 100 $$

-

r:沿射线的点

-

t:"时间"

-

o:起始点

-

d:归一化后的方向向量

-
-

平面:由一个法线向量和在平面上的点定义

-

对应的平面方程(Plane Equation)为: -$$P:(p - p') * N = 0,\ \ \ ax+by+cz+d = 0$$

-

p:所有在平面上的点

-

p':在平面上的一个点

-

N:法线向量

-
射线与球体相交(Ray Intersection With Sphere)
-

射线:$r(t) = o +td , \ \ \ \ 0\leq t < 100 $

-

球体:$p:(p-c)^2 - R^2 = 0 $

-

当射线与球体相交时,交点$p$必须同时满足射线和球体的方程

-

此时的解为:

-

$$(o + td - c )^2 - R^2 = 0$$

-
射线与隐式曲面相交(Ray Intersection With Implict Surface)
-

射线:$r(t) = o +td , \ \ \ \ 0\leq t < 100 $

-

一般隐式曲面:$p:f(p) = 0$

-

代入后的替代射线方程:$f(o + td) = 0$

-

!解必须为正根

-
射线与三角形网格相交(Ray Intersection With Triangle Mesh)
-

原因:

-
    -
  1. 渲染上:计算可见性,阴影,光照
  2. -
  3. 几何上:判断内外关系
  4. -
-

计算:拆分

-
    -
  1. 最简单的方式:对每个三角形进行一次相交判断
  2. -
  3. 最简单但速度最慢
  4. -
  5. 可以出现0次相交或一次相交
  6. -
-
射线与三角形相交(Ray Intersection With Triangle)
-

三角形可以视为在一个平面中

-
    -
  1. 可视为射线与平面相交
  2. -
  3. 判断相交点是否位于三角形内部即可
  4. -
-
射线与平面相交(Ray Intersection With Plane)
-

射线方程:$r(t) = o +td , \ \ \ \ 0\leq t < 100 $

-

平面方程:$P:(p - p') * N = 0,\ \ \ ax+by+cz+d = 0$

-

相交的解为:

-

设$p = r(t)$求解$t(0\leq t < \infty)$

-

$(p-p') * N = (o + td - p') * N = 0$

-

$t = \frac{(p'-o) * N }{d * N}$

-

-
Möller Trumbore Algorithm
-

一种更快地得出重心坐标的算法

-

-

光线追踪的性能瓶颈

-

通过简单地计算光线与场景的相交的方式:

-
    -
  1. 需要对场景中每一个三角形判断光线是否相交
  2. -
  3. 找到最接近的交点(即最小的t值)
  4. -
-

带来的问题:

-
    -
  1. 算法复杂度 = $pixels \times triangles (\times bounces)$
  2. -
  3. 计算耗时极高
  4. -
-

解决办法:

-
    -
  1. 采取遍历物体而非三角形的方式进行计算
  2. -
  3. 采用相关加速结构/算法
  4. -
-
- -
- - - - -
- - - - -
- - -updatedupdated2023-06-182023-06-18 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/computergraphic/z-buffer_深度缓存/index.html b/public/computergraphic/z-buffer_深度缓存/index.html deleted file mode 100644 index 54754c3..0000000 --- a/public/computergraphic/z-buffer_深度缓存/index.html +++ /dev/null @@ -1,453 +0,0 @@ - - - - - - - - - - - - - - - - - - Z-Buffer 深度缓存 | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

Z-Buffer 深度缓存

- - - - - - - - - -
-
Painter's Algorithm 画家算法
-

起源于油画绘制方式,从后往前,依次覆盖后面的物体

-

需要对不同深度的物体进行分类来确定面与面的绘制顺序,复杂度为$O(n\log n)$,其中n为三角形的个数,也存在一个无法解决的问题,不能处理无法确定绘制顺序的物体,例如下图互相遮挡的情况

-

-
Z-Buffer
-

主要思想

-
    -
  1. 对于每一个采样点或像素存储一个最小的z值(深度值)
  2. -
  3. 存储方式与frame buffer存储颜色值的方式相同,在depth buffer里存储深度值
  4. -
-

出于简化考虑,我们通常认为z值始终是正数,这意味着越小的值代表采样点或像素距离相机越近,越大的值则代表距离越远

-

Z-Buffer会在生成渲染图的同时根据各采样点(像素)的深度值生成深度图,颜色越深代表距离越近,越浅则越远

-

-

算法

-

初始化depth buffer的所有值为$\infty$

-

在光栅化的流程中增加如下伪代码流程

-
-
-
-
1
-2
-3
-4
-5
-6
-7
-
-
for (each triangle T)
-    for(each sample(x,y,z)in T) //循环每一个采样点,深度值在采样时确定
-        if(z<zbuffer[x,y])   //判断深度值大小,确定远近
-            framebuffer[x,y]=rgb; //更新颜色值
-            zbuffer[x,y]=z;  //更新深度值
-        else
-            ; //什么都不做,因为采样流程已经完成
-
-
-

整体算法流程会形成如下图效果,复杂度为O(n),n为三角形面的数量

-

- -
- - - - -
- - - - -
- - -updatedupdated2023-06-182023-06-18 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/computergraphic/光场颜色和感知/index.html b/public/computergraphic/光场颜色和感知/index.html deleted file mode 100644 index 96380f3..0000000 --- a/public/computergraphic/光场颜色和感知/index.html +++ /dev/null @@ -1,752 +0,0 @@ - - - - - - - - - - - - - - - - - - 光场、颜色和感知 | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

光场、颜色和感知

- - - - - - - - - -
-

光场(Light Field/Lumigraph)

-

两个都指光场,来源于该现象由两个不同组各自法线并命名,现在仍然有争论

-

我们看到的世界是什么

-

坐在房间的一侧往窗户的一侧看,三维和二维的情况是下面这样的

-

-

如果加上一个幕布,显示上图图像,往往人们难以区别于现实世界,即为虚拟现实的原理

-

-

全光函数(The Plenoptic Function)

-
    -
  • 函数 Grayscale snapshot
  • -
-

统计往任意方向上的所见值,可定义一个函数,最后结果为一个数

-

-
    -
  • 改进函数 Color snapshot
  • -
-

改进后引入波长,即为引入颜色(因光的不同波长而产生颜色)

-

记录各个方向看到的不同方向上的光,就可以看到彩色场景

-

-
    -
  • 扩展的全光函数 A movie
  • -
-

进一步将全光函数扩展一个时间t,那下面这个四维的函数就是电影,因为你可以往各个不同的方向看,看到各个不同方向来的信息都是彩色的,然后在不同时间显示的东西不一样

-

-
    -
  • 进一步扩展 Holographic movie
  • -
-

现在考虑人/摄像机可以在三维空间中的任何地方移动,三维空间中的任何一个位置可以用x、y、z定义。那这也就是全息电影

-

-
    -
  • 再改进一步 The Plenoptic Function
  • -
-

将它理解成在任何位置,然后往任何方向看,并且在任何时间看到的都是不同的颜色,即为整个世界是一个7个维度的函数

-

将这个7维的函数当做全光函数

-
    -
  • 全光函数和光场
  • -
-

全光函数本身的定义:

-

在任何位置,任意方向,我们知道它过来的光是多少,方向也应是连续的,这就是一个简单的二维全光函数的表示

-

可以从全光函数中提取一部分信息出来,用来表示更复杂的光,就是说我们平常在一个点我们往任意方向看,那记录的是来自各个方向的光的信息,那光场就记录了更多的信息,光场就是全光函数的一个小部分

-

-

光场

-

定义光线

-
    -
  • 通过一个起点和一个方向定义
  • -
-

-
    -
  • 取光线上的任意两点定义整条光线(二维位置和方向)
  • -
-

物体可以放在一个包围盒中,从任何位置和任何方向看向这个物体,根据光路的可逆性,也可以认为要想描述这个物体所能被看到的所有的情况,就去描述这个物体在它的包围盒上在任何位置往任何方向过去的光线

-

已知包围盒上的点,观测位置的点,这两点确定一条光线,可以查询记录的函数,该函数记录了物体表面不同位置往各个不同方向的发光情况

-

-

定义光场

-

光场:在任何一个位置往任何一个方向去的光的强度

-

如果有了一个物体的光场,如下图,任何一个位置往任何一个方向都可以发光。我们在任何一个位置往这个物体某个点看的时候,是可以知道这条光线带的能量是多少的,因为通过这2个点可以知道往这个点看的方向,就可以从4维的光场中查询到之前记录的光场的值,即光场可以给出任意观测方向看到的结果

-

-

记录光场

-
    -
  • 记录上述将物体放在包围盒里后,盒子上的任何一个点往任何一个方向的光线
  • -
-

观测点必须在包围盒外

-

-
    -
  • 取一平面,平面右侧有有物体发出光线打到平面上
  • -
-

如图已知平面一点,二维只需$\theta$,三维则需两个数$(\theta,\phi)$

-
    -
  • 参数化光场
  • -
-

光线还可以用2个点来确定,那就可以用2个平面来定义一个光场

-

定义2个相互平行的平面,2个平面上各自任取一个点,连接两点即可确定光线

-

找到所有u、v和s、t的组合,可以描述所有的不同位置和不同方向出来的光线

-

-

-

-

光场本质上就是一个4维的函数,不同记录方法即为描述方式不同

-

对以上使用两个平面参数化

-
    -
  • u、v处取一点看向所有s、t平面
  • -
-

如下图,在u、v上取一个点,这个视角的右边是我们需要看到的东西,这就好像一个针孔摄像机所能看到的东西,所以能看到一个完整的物体的图。u、v上不同的位置出发,就相当于从不同的角度看向这个世界

-

-

很多摄像机从某一个角度看向世界,拍一张图,然后将所有图都组织到一块,就是整个光场。如下图,斯坦福做了一个摄像机的矩阵,相当于在不同的位置对场景拍不同的图,每个位置对应一个u、v,拍到的照片是s、t,相机本身二维,成像结果二维,综合为四维

-

-
    -
  • 固定s、t平面上一个点,然后往u、v平面上看
  • -
-

整个世界还是在s、t平面的右边,从u、v上的任何一个点都看向s、t上的同一点。就好像盯着同一个点,从不同的角度去看,会看到很多类似不同高光的东西

-

通过这种方式,可以将像素上的Irradiance给展开成Radiance,可以看到打到任何一个像素上不同方向的光

-

-

苍蝇的复眼成像原理就是成像一个光场,盯着原本拍出的一张照片来看,那照片上的任何一个像素记录的是Irradiance(平均各个方向的光)

-

如下图,普通相机记录下来的就是蓝色、绿色、红色的平均。如果有办法可以把它分开,比如这个光打到像素点时不立刻记录它,而是把这个像素变成某个小的透镜,把来自于各个方向的光给分到不同的位置上去(分光)。把实际的感光元件放在底下,就可以将它们分别记录到不同位置,此时就可以记录Radiance

-

此时看一个像素实际为穿过像素的不同方向的光

-

-

光场相机

-

利用光场原理制作的相机

-

The Lytro Light Field Camera

-

Lytro相机有下图这个人创办

-

-
    -
  • -

    原理:Microlens design(上面谈到的微透镜)。将一个像素替换成一个透镜,让这个透镜可以把来自于不同方向的光分开并记录下来

    -
  • -
  • -

    功能:支持拍照后的重新聚焦

    -
  • -
  • -

    具体效果如下图:

    -
  • -
-

-
    -
  • 详细原理
  • -
-

将原本的像素换成了微透镜,这些微透镜可以把来自各方向的光分散到不同的方向上去,在后面再将它记录下来

-

-

光场照相机照出来的最原始的图实际上是原本的一个像素变成了一个圆,任何一个圆内部平均起来就是以前普通的照相机得到的结果,在一个圆的内部各个像素其实就是记录了各个不同的方向

-

-
    -
  • 得到普通相机照片
  • -
-
    -
  1. -

    透镜原本是像素,从透镜中各个不同的光线中选一条,如果都选最下面那条,并将结果记录在对应的一个像素上,现在透镜就对应了一个值

    -
  2. -
  3. -

    每一个透镜都取中间这条光线,那就好像把相机放在正中间往左边去看

    -
  4. -
  5. -

    都取最上面的往左下方打的光线,相当于相机在上面

    -
  6. -
-

类似于有光场后,取不同方向的光线就可以虚拟地移动摄像机位置

-
    -
  • 动态重新聚焦
  • -
-

与上述相同原理,在拥有整个光场时,在四维的光场中记录了所有可能的光线的位置和方向信息,那就可以查询更新了之后的光线应该查哪一条,那就对于不同的透镜查的可能并不是同一个位置,你算出来应该查询哪一个方向就去查询哪一个方向

-
    -
  • 问题
  • -
-

分辨率不足

-

原本成像平面在透镜的位置,现在成像平面在后面,每一个小块记录的是原本的普通相机对应的一个像素,如果都用相同的胶片,那原本一个像素记录一个像素的信息,现在要用100个像素记录一个像素的信息(假设是10x10的),因为把不同的方向分开了。也就是说胶片的分辨率现在变成了一个空间上的分辨率

-

方向上记录得越多,照片本身记录分辨率越低

-

高成本

-
    -
  1. 为了达到原有分辨率,要使用超级的分辨率的实际胶片
  2. -
  3. 微透镜的设计制造成本高,是一个超级精密的仪器
  4. -
-
-

颜色

-

颜色的物理基础

-

光的基本成分

-

牛顿曾做过将一束白光穿过棱角,其会被分解成各个不同颜色

-

不同的颜色可以合成其他的颜色,将所有的颜色合在一起又会形成白色

-

-

可见光谱

-

不同的波长对应不同的折射率,某一种光一定对应某一种光谱

-

光谱是光线的能量在不同的波长上的分布。光谱是一个很长的范围,图形学中重要的是可见光的光谱,即分布在波长在400nm到700nm之间

-

-

谱功率密度(SPD)

-

光谱的准确定义名是谱功率密度

-

单位:辐射单位/纳米,也可能无单位

-
    -
  • 蓝天和太阳光的SPD
  • -
-

如下图可见:

-

蓝天部分更多的能量集中在高频

-

阳光则是另一种SPD

-

-

不同光源的SPD

-

-
    -
  • SPD的线性性质
  • -
-

用一种光照亮能记录光强度的东西能够得到右边的另一种分布;两种光同时照亮得到的分布就是它们两个对应的SPD之和

-

-

颜色的生物学基础

-

颜色可以认为是人的感知

-

人眼结构

-

相机是人眼的仿生

-

人眼的瞳孔可调节大小,对应着光圈;晶状体对应透镜,可通过肌肉的拉扯调节焦距;视网膜进行成像

-

-

视网膜感光细胞

-
    -
  • 棒状细胞:
  • -
-

很多(~120 million)感知光的强度,不感知颜色,可得灰度图

-
    -
  • 锥形细胞:
  • -
-

少(~6-7 million),可以用来感知颜色锥形细胞内部分成S、M、L这3种不同的锥形细胞(因为这三种细胞对三种类型的波长的响应各不相同)

-
    -
  1. S类型:感知小波长(高频)
  2. -
  3. M类型:感知中间波长
  4. -
  5. L类型:感知长波长
  6. -
-

三种响应类型的曲线:

-

-
    -
  • 三种细胞的分布和数量有个体差异,下图为12人锥形细胞分布差异
  • -
-

-

颜色的三刺激理论

-

人体如何利用三种细胞进行感知

-

已知光在不同波长上的分布(SPD),又知道某一种细胞对于某一个波长的响应是多少。感知的函数就是这2个函数对应的位置相乘积分起来

-

三种不同的细胞自然会感应出三种颜色,对应下图的S、M、L

-

-

给定任意类型光线,人眼看到的是上面S、M、L这3个数,而不是光线本身的SPD

-

人的视觉系统

-

光线的光谱经过人的眼睛,反应到视网膜上,然后被三种不同的细胞感知到形成3个数,这3个数送到人的脑袋中,人就会认为看到了一个什么样的颜色

-

-

同色异谱

-
    -
  • 同色异谱现象
  • -
-

2种光线具有的光谱不相同,可是被我们看到的结果却是相同的

-

不同的信号进来后,通过积分得到3个数是相同的

-
    -
  • 颜色匹配
  • -
-

通过调和不同的光谱,得到某一种颜色,使得这一种颜色和我看到的另外一种颜色一样。并不需要2个光的光谱一样,只需要最后的颜色一样

-

下图中光谱的SPD完全不同,但被人感知后可得到三个相同的结果

-

-
    -
  • 应用
  • -
-

如图,可通过不同调节方式使两个颜色一致来表现显示器上太阳颜色,但混合后光谱可与之前的完全不同

-

-

颜色复制/匹配

-

颜色混合

-

加色系统:

-

有几种不同的原色,将各自不同的颜色乘上一个强度,将其混合起来,可以得到一种颜色,用它们各自混合的系数RGB这3个数来表示颜色

-

如果RGB的值都调到255会得到白色

-

减色系统:

-

类似于调和不同颜料会越调越黑

-

-

加色实验

-
    -
  • 实验一
  • -
-

加色系统就可以使用上面的线性组合基本颜色的方式来匹配任何给定的颜色

-

如下图,给定任何一个颜色,希望用三种不同颜色混合匹配得到相同颜色

-

-

左侧为给定颜色,右侧为混合颜色,每个颜色存在系数

-

-

即找到三种颜色系数的值混合后得到左边颜色

-

-
    -
  • 实验二
  • -
-

有时存在左边的颜色右边无法混合得到的情况

-

-

可在左边给定的颜色上加上一个颜色,类似于右边对应减去这个颜色

-

多个不同颜色混合得到一个颜色,存在负值可能

-

-

CIE RGB配色实验

-

CIE RGB系统开始接近颜色空间的表示

-

CIE是一个组织,定义了RGB系统,给定的任何一个颜色是单波长的颜色,光线的SPD是一个单一的函数

-

使用三种单色的光

-

-

颜色匹配函数:

-
    -
  • 单波长的目标颜色
  • -
-

做颜色匹配时,给定一个固定波长,需要将这3个颜色中相同波长的值混合起来

-

-
    -
  • 实际光(多波长)
  • -
-

给定一个实际光的SPD,要使用积分考虑每一个波长所需要的红、绿、蓝然后混合在一块

-

这三个颜色每一个积分出来会得到三个数

-

-

颜色空间

-

Standard Color Spaces : Standardized RGB (sRGB)

-

RGB的标准名为sRGB

-

广泛用于各种成像设备

-

问题:

-

RGB颜色空间的色域有限

-

国际颜色空间:CIE XYZ

-

CIE XYZ系统人为定义了一个颜色匹配函数,

-
    -
  • 绿色曲线分布比较对称,对应的y函数匹配出来的数Y在一定程度上可以表示颜色的亮度
  • -
  • 红色有2个峰值,没有负数,这些函数都分布在可见光的范围内
  • -
-

-

二维可视化XYZ

-

将X、Y、Z先进行归一化

-

$$x = \frac{X}{X+Y+Z}$$

-

$$y = \frac{Y}{X+Y+Z}$$

-

$$z = \frac{Z}{X+Y+Z}$$

-

三个数相加为1,此时只需显示前面2个维度能得到一个什么样的图就可以了

-

改变Y即为改变亮度

-

-
    -
  • 色域
  • -
-

可见图中边界为扇形,这个就是色域,整个颜色空间可以显示的颜色

-

色域有一个白色中心,纯色都在边界上

-

-

不同颜色空间表示的颜色范围不一样

-

下图sRGB只能表示很小的三角形部分的色域

-

-

Perceptually Organized Color Spaces

-

HSV Color Space

-

广泛应用于颜色拾取器

-

可以选择各种不同的色调(Hue)、饱和度(Saturation)、Brightness(亮度)或Value(值)

-

色调:不同类型的颜色

-

饱和度:更接近中心白色,还是更接近颜色本身的纯色

-

亮度:从黑色一直到某种颜色

-

CIELAB Space

-

LAB色彩空间也和感知有关

-

L轴表示的是亮度(0为黑,100为白)

-

a轴上红和绿分别在两端

-

b轴上蓝和黄在两端

-

LAB空间认为任何一个轴上两端都是互补色

-

-

互补色理论

-

人脑对互补色存在一个定义

-
    -
  • 人眼的视觉暂留来验证互补色
  • -
-

人眼的视觉暂留就是看一幅图看得时间长了,看到另外一幅图,你会看到第一幅图的互补色

-

颜色是相对的

-

颜色本身是感知,看到的颜色可能和实际存在出入

-

如下图A,你会觉得B比A亮

-

-

挡住A、B以外区域,会发现A和B颜色相同

-

-

减色系统(CMYK)

-

减色系统在生活中应用更广泛

-

CMYK:

-

Cyan(蓝绿色)、Magenta(品红色)、Yellow(黄色)、Key(黑色)

-

-

C、M、Y可以通过混合得到各种不同的颜色,所以在打印上,可以通过混合各种各样不同墨水调出各种各样不同的颜色

-

-

印刷上要考虑成本,正常情况下打印东西以黑色居多,而且黑色的墨水好制作,便宜,C、M、Y这三种带颜色的墨水不容易制作,那用这三种颜色混合得到黑色,成本就比直接用黑色高,因而需要黑色墨水

- -
- - - - -
- - - - -
- - -updatedupdated2023-06-182023-06-18 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/computergraphic/光线追踪加速结构和算法/index.html b/public/computergraphic/光线追踪加速结构和算法/index.html deleted file mode 100644 index afbd04e..0000000 --- a/public/computergraphic/光线追踪加速结构和算法/index.html +++ /dev/null @@ -1,623 +0,0 @@ - - - - - - - - - - - - - - - - - - 光线追踪加速结构/算法 | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

光线追踪加速结构/算法

- - - - - - - - - -
-

包围盒(Bounding Volumes)

-

将复杂的物体用简单的包围盒包裹是一个减少无用射线相交计算的好方式

-
    -
  1. 物体完整地包含在包围盒里
  2. -
  3. 如果射线不与包围盒相交则不与物体相交
  4. -
  5. 因而优先检测包围盒是否相交再检测是否与物体相交
  6. -
-

射线与包围盒相交(Ray-Intersection With Box)

-

注意理解:盒子是三对平面的交汇处,这三个平面即为包围盒边界

-

特别的我们通常使用轴对齐包围盒(Axis-Aligned Bounding Box),简称 AABB

-

Bounding Box(BB)的任意一侧沿着X,Y,或Z轴

-

-

射线与轴对称包围盒相交(Ray Intersection with Axis-Aligned Box)

-

以下2D例子在3D场景中同样适用

-

-

如上图所示,我们分别计算射线与包围盒两个边界的相交时间点,求取到$t_{min}/t_{max}$的交集

-
    -
  1. 射线只有同时进入所有对平面才算进入包围盒,离开包围盒同理
  2. -
  3. 对于每一对平面,计算$t_{min}和t_{max}$,允许出现负值
  4. -
-

对于3D包围盒,$t_{enter} = \max{t_{min}},t_{exit} = \min{t_{max}}$

-

如果$t_{enter}<t_{exit}$,我们便可得知射线在盒子内停留了一段时间(必定发生了相交)

-

注意点:

-
    -
  1. 光线并非一条线,应当检查是否为负值或是否符合物理
  2. -
  3. $t_{exit}<0$的时候,包围盒在射线之外,没有相交
  4. -
  5. $t_{exit}>=0和t_{enter}$时,光线的起始点在包围盒内,相交
  6. -
-

选择轴对称的原因:计算量少

-

-

统一空间分区\网格(Uniform Spatial Partitions/Grids)

-

划分过程

-

找到包围盒

-

-

创建网格

-

-

在与相应物体重叠的网格中存储对应的物体

-

-

根据射线穿过的网格顺序来遍历网格

-

对于每一个被遍历的网格,需要检测其中存储的物体是否与射线相交

-

-
-

网格数量

-

网格仅有一个时无法起到加速算法的效果

-

-

网格过多时,因需要遍历过多无关网格而低效

-

-

最佳的网格数量为: -$$cells = C * objs$$ -$$C \approx 27 \ \ in \ \ 3D$$

-
-

划分空间网格的方式往往在大小和空间均匀分布的大型对象集合的情况下有良好的效果

-

在失效的情况下会产生" Teapot in a stadium "问题,即在一个大运动场中间放了一个茶壶,此时需要走很多格子才能找到场景中茶壶的交点,在场景分布不均匀的情况下不适用网格方法

-

空间划分(Spatial Partitions)

-

八叉树(Oct-Tree)

-

将整个场景包围在盒中,再将包围盒切分为8份(三维情况下,每面四块),下图展示的是二维下的情况,将整个盒子分为四块,再将每块都分成四块,直到每个格子中无物体或物体数量足够少

-

-

通过这种方式将空间切成了分块并组织成了树状结构(一维下为二叉树,二维下为四叉树,三维下为八叉树,$n维下为2^n叉树$)

-
-

BSP-Tree

-

该方法是对空间进行二分的方法,即每次都选择一个方向将节点划分开,与KD-Tree不同在于其并非横平竖直地划分,且计算难度随维度升高而增加

-

-

二维下用一条线划分,三维下用一个平面划分,四维用‘超平面’划分,依次类推

-
-

KD-Tree

-

与八叉树几乎相同,但每找到一个格子后总是沿着某一个轴分开使整个空间被划分成类似二叉树的结构,如下图所示,划分是水平竖直交替进行的

-

-

三维下,划分轴在X,Y,Z轴间轮替就可以在保持二叉树性质的情况下进行划分

-
KD-Tree建立
-

将整个场景包围在盒子A中,先沿着竖直方向划分,再将这两个部分横向划分开,之后一直交替向下划分,形成一棵树

-

-

如果一个空间已经被划分成了KD-Tree结构,则中间节点(A,B,C,D)只需要记录被划分成的各自格子,叶子节点则存储和格子相交的几何形体

-
KD-Tree的数据结构
-

内部节点存储:

-
    -
  1. 划分的轴:X,Y,Z轴
  2. -
  3. 划分的点:沿轴的平面分割坐标
  4. -
  5. 子内部节点:指向子节点的坐标
  6. -
  7. 在根节点不存储物体
  8. -
-

叶子节点存储:

-
    -
  1. 物体的列表(list of objects)
  2. -
-
KD-Tree的遍历
-

假设有一根光线,从左上到右下,穿过一个包围盒A

-

-

第一次判断是否与A存在交点,光线有交点则可能与左右子节点产生交集

-

-

检测是否与子节点存在交点,发现与左边蓝色区域存在交点,按图中划分,1不再划分的情况下则认为光线与该叶子节点(蓝色区域内)所有物体求交

-

-

检查右子节点,发现与右边区域也有交点,则光线可能和B的子节点(2和C)相交

-

-

再判定光线与2和C区域相交情况,发现与2存在交点,此处假设2不再细分,2即为一个叶子节点,光线需要和2中所有物体求交

-

-

发现与C区域存在交点,那便要判断光线和C的子节点(D、3)是否有交点,发现和3存在交点,且3为叶子节点,则光线要和3中的所有物体求交,D同理,一直求到叶子节点(区域5与光线无交点,无需求交)

-

-

在C中光线和所有物体求交就找到了交点

-

-
KD-Tree的问题
-
    -
  • 难以判定包围盒和物体的交集
  • -
-

虽然三角形只要有一个顶点在盒子内,就可以判定相交,但存在三个顶点都不在包围盒内但依旧相交的情况(包围盒在三角形内部)

-
    -
  • 一个物体可能出现在多个不同的叶子节点里
  • -
-

如案例中右下角的圆与3、4、5都存在交点,会在叶子节点3、4、5中存储这个物体,这会造成性能浪费

-
-

BVH(Bounding Volume Hierarchy)

-

BVH无论在实时的光线追踪还是离线的结构都解决了KD-Tree的问题,在图形学里有广泛地运用

-
BVH结构创建
-

同样将场景用一个盒子包围,与KD-Tree不同在于后者将物体划分为2个部分

-

-

将上图方框中所有三角形分割成两个部分再重新求它们的包围盒

-

-

同样再继续划分,将上图蓝色节点划分为两堆三角形再重新求它们的包围盒,对应下图蓝绿节点

-

-

划分终止条件自定义:如一个节点中只有5个三角形存在

-

总结:

-
    -
  1. 找到一个包围盒
  2. -
  3. 基于包围盒中的物体,递归地拆分包围盒为两个部份
  4. -
  5. 两个部份各自重新计算包围盒
  6. -
  7. 叶子节点中三角形数量满足终止条件时停止划分,记录实际的物体至叶子节点里,其余结构用于判断加速结构
  8. -
-
BVH性质
-
    -
  • -

    一个叶子节点里只可能出现在一个几何结构里

    -
  • -
  • -

    可以不采用求三角形和包围盒的交

    -
  • -
-

按物体划分使得包围盒求取简易,避免了空间划分中求包围盒和物体的交集

-

问题:

-

未严格划分空间,不同的Bounding box间可以相交

-
BVH节点划分方式
-
    -
  • -

    与KD-Tree一样选择一个维度来划分

    -
  • -
  • -

    方法一:只沿着最长的轴将其分成两半

    -
  • -
  • -

    方法二:取中间的物体进行划分

    -
  • -
-

例如:

-

一行三角形从左到右依次排列寻找中位数,第n/2个三角形

-

中位数可确保两部分数量相似即生成的树接近平衡(通过保证两边深度相似可减少平均搜索次数)

-

排序上可假设沿着X轴去考虑三角形,则所有三角形取重心后沿X轴排序便可得知中间的三角形位置(快速选择算法)

-
-

以上步骤可得到一个预计算的BVH,如果场景发生改动则需要重新计算

-
-
BVH的数据结构
-
    -
  • -

    内部节点存储

    -
      -
    • 包围盒
    • -
    • 指向子节点的指针
    • -
    -
  • -
  • -

    叶子节点存储

    -
      -
    • 包围盒
    • -
    • 实际的物体
    • -
    -
  • -
  • -

    节点表示场景中分割框的子集

    -
      -
    • 子树中的所有物体
    • -
    -
  • -
-
BVH与光线求交
-

与KD-Tree类似,光线和根节点求交,找到内部物体最近的交点

-

光线与BVH节点相交后存在两种可能:

-
    -
  1. 节点本身为叶子节点,此时光线与叶子节点里所有物体求交,放回最近交点
  2. -
  3. 节点本身不是叶子节点,此时光线可能与该节点的两个子节点都有交点,递归地求出它们的交点再返回最近的点
  4. -
-

-
空间/物体划分区别
-
    -
  • 空间划分(Spatial partition) -
      -
    1. 划分空间,任何一个节点在空间和时间之间不会有交集
    2. -
    3. 有些物体存在横跨边界的可能
    4. -
    -
  • -
-

-
    -
  • 物体划分(Object partition) -
      -
    1. 划分物体,物体分为两部分后分别计算包围盒
    2. -
    3. 包围盒存在交集的可能,但不产生影响且无需计算包围盒相交方式
    4. -
    -
  • -
-

-
- -
- - - - -
- - - - -
- - -updatedupdated2023-06-182023-06-18 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/computergraphic/几何geometry/index.html b/public/computergraphic/几何geometry/index.html deleted file mode 100644 index d45914f..0000000 --- a/public/computergraphic/几何geometry/index.html +++ /dev/null @@ -1,676 +0,0 @@ - - - - - - - - - - - - - - - - - - 几何(geometry) | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

几何(geometry)

- - - - - - - - - -
-

几何

-

几何物体的表现形式

-
隐式(Implicit)
-
    -
  1. 代数平面(algebraic surface)
  2. -
  3. 水平集(level sets)
  4. -
  5. 距离函数(distance functions)
  6. -
  7. ...
  8. -
-
优缺点
-

优点:

-
    -
  1. 描述简洁(如,一个函数)
  2. -
  3. 便于某些查询(判定物体内部,或内部点到表面的距离)
  4. -
  5. 便于计算光线到表面的交集
  6. -
  7. 对于简单的形状能够做到准确描述无抽样误差
  8. -
  9. 易于处理拓扑变化(如,流体)
  10. -
-

缺点:

-
    -
  1. 难以模拟复杂的形状
  2. -
-
基于一系列满足特定关系的点
-

例如:

-

球体:所有的点在三维坐标系里满足$$x^2 + y^2 + z^2 = 1$$或$$f(x,y,z) = 0 $$

-
难以采样
-

例如:

-

在一系列符合下列条件的点中,难以采样到符合$f(x,y,z) = 0$的点

-

$$f(x,y,z) = (2 - \sqrt{x^2 + y^2})^2 + z^2 - 1$$

-

对应的几何形状如下图

-

-
易于判断内外关系
-

例如:

-

在一系列符合下述条件的点中

-

$$f(x,y,z) = x^2 + y^2 + z^2 - 1$$

-

-

对于点$(\frac{3}{4},\frac{1}{2},\frac{1}{4})$ 若要判定其是否在该几何体内部则只需计算$$f(x,y,z) = - \frac{1}{8} < 0$$ 即可判定其位于几何体内部

-
-
代数平面(Algebraic Surfaces)
-

表面是x,y,z中多项式的零集

-

-
构造实体几何(Constructive Solid Geometry)
-

通过布尔计算组合构造隐式几何

-

-
距离函数(Distance Functions)
-

距离函数:从任意位置到目标物体给出最小距离(符号距离)

-

使用距离函数将两个曲面混合在一起

-

-
水平集(Level Set Method)
-

封闭式的方程难以描述复杂的形状

-

解决方案:存储值相似的函数网格

-

-

插值为零的值的位置即为表面

-

优势:能够提供对形状更明确的控制(如纹理)

-

在流体仿真中也存在应用:计算到气液边界的距离

-
分形(Factals)
-

该几何形状表现为所有尺度的细节都存在自相似性(一种描述自然现象的说法),往往难以控制形状

-

-
-
显式(Explicit)
-
    -
  1. 点云(point cloud)
  2. -
  3. 多边形网格(polygon mesh)
  4. -
  5. 细分曲面和曲线(subdivision, NURBS)
  6. -
  7. ...
  8. -
-
点直接或参数映射给出
-

例如:

-

$$f:R^2 \rightarrow R^3;(u,v) \rightarrow (x,y,z)$$

-

-
易于采样
-

例如:

-

对于$$ f(u,v) = ((2 + \cos u)\cos v,(2 + \cos u)\sin v,\sin u) $$

-

若要判定点$f(u,v)$是否位于表面,则只需将$(u,v)$的值相加

-

-
难以判断内外关系
-

例如: -对于$$f(u,v) = (\cos u \sin v ,\sin u \sin v,\cos v)$$

-

难以判定点$(\frac{3}{4},\frac{1}{2},\frac{1}{4})$

-
-
点云 (Point Cloud)
-
    -
  1. 最简单的表示:点列表(x,y,z)
  2. -
  3. 轻松表现任何类型的几何图形
  4. -
  5. 适用于大型数据集(>> 1 点/像素)
  6. -
  7. 通常转换为多边形网格
  8. -
  9. 难以用于采样不足的区域
  10. -
-

-
多边形网格(Polygon Mesh)
-
    -
  1. 存储顶点和多边形(通常是三角形或四边形)
  2. -
  3. 更易于进行处理/模拟,自适应采样
  4. -
  5. 更复杂的数据结构
  6. -
  7. 图形中最常见的表示形式
  8. -
-

-
-

表现形式应根据目标几何模型选择最合适的类型,没有最好的表现形式

-

-
-

贝塞尔曲线(Bézier Curves)

-

定义

-

贝塞尔曲线完全由其控制点决定其形状,$n$个控制点对应着$n-1$阶的贝塞尔曲线,并且可以通过递归的方式来绘制.

-

-

de Casteljau Algorithm(图形)

-

假设存在三个点(quadratic Bezier)

-

-

通过线性插值的方式插入一个点

-

-

在另一边也通过同样方式插入一个点

-

-

递归重复

-

-

对于在$[0,1]$区间的每个t点都使用相同算法进行计算

-

-

构造一个三次方贝塞尔曲线需要总共四个输入,都递归使用线性插值

-

-

可视化算法流程

-

-

de Casteljau Algorithm(数学公式)

-

de Casteljau 算法给出各点间金字塔型的变量关系

-

-
推导流程
-

-

$$b_0^1(t) = (1 - t)b_0 + tb_1$$ -$$b_1^1(t) = (1 - t)b_1 + tb_2$$ -$$b_0^2(t) = (1 - t)b_0^1 + tb_1^1$$ -$$b_0^2(t) = (1 - t)^2b_0 + 2t(1 - t)b_1 + t^2b_2$$

-

进而推得$n$阶贝塞尔曲线的公式为:

-

$$b^n(t) = b_0^n(t) = \sum_{j=0}^{n} {b_j B_j^n(t)}$$

-

$b^n(t)$:贝塞尔曲线阶级数n(n次向量多项式)

-

$b_j$:控制点($R^N$的向量)

-

$B_j^n$:伯恩斯坦多项式

-

伯恩斯坦多项式(Bernstein polynomial):

-

$$B_i^n(t) = \begin{pmatrix} n \\ t \end{pmatrix} t^i(1 - t)^{n - i}$$

-

例如$n = 3$时

-

我们在三维空间里有下列控制点

-

$b_0 = (0,2,3),b_1 = (2,3,5),b_2 = (6,7,9),b_3 = (3,4,5)$

-

这些点定义了以下列公式形式的贝塞尔曲线

-

$$b^n(t) = b_0(1 - t)^3 + b_1 3t(1 - t)^2 + b_2 3t^2(1 - t) + b_3 t^3$$

-

贝塞尔基本函数

-

-

插值端点:$b(0) = b_0;b(1) = b_3$

-

与末端线段相切:$b'(0) = 3(b_1 - b_0); b'(1) = 3(b_3 - b_2)$

-

能够通过控制点的位置来改变曲线

-

分段贝塞尔曲线

-

出现原因:高阶贝塞尔曲线有多个控制点,难以控制曲线形状

-

对策: 将多个低阶的贝塞尔曲线相连,构造为分段贝塞尔曲线

-

常用于:字体,路径,插画,主题演讲

-

样例:

-

-

组合计算

-

要将一下两条贝塞尔曲线组合在一起则

-

$$a:[k,k+1] \rightarrow IR^N$$ -$$b:[k+1,k+2] \rightarrow IR^N$$

-

-

$c^0$处的连续性:$a_n = b_0$

-

-

$c^1$处的连续性:$a_n = b_0 = \frac{1}{2}(a_{n-1} + b_1)$

-

-
-

贝塞尔表面(Bézier Surfaces)

-

对于一个双立方贝塞尔表面贴片

-

输入:$4 \times 4 $ 控制点

-

输出:由$[0,1]^2$ 参数化的2D平面

-

-

计算方法

-

目标:计算相对于(u,v)的平面位置

-
    -
  1. 使用 de Casteljau 算法来计算四条贝塞尔曲线上各自的U,这将会为"移动"贝塞尔曲线提供4个有效的控制点
  2. -
  3. 使用一阶 de Casteljau 算法来计算"移动"曲线上的点V
  4. -
-

-

可视化计算流程:

-

-

曲面处理(Mesh Operations)

-

曲面细分(Mesh Subdivision)

-

目的:提高分辨率

-

-

通常做法:

-
    -
  1. 创建更多三角形(顶点)
  2. -
  3. 更新它们的位置
  4. -
-
Loop Subdivision
-
    -
  1. 将每个三角形划分为4个三角形
  2. -
  3. 根据权重更新顶点的位置(新旧顶点各自以不同方式进行更新)
  4. -
-

新顶点:

-

-

白点即为新顶点,其位置为周围四个顶点的权重之和

-

旧顶点:

-

-

白色旧顶点也是自身及邻接顶点的权重之和,权重的设置与旧顶点度数关联

-
Catmull-Clark Subdivision
-

-

定义:

-
    -
  1. 所有非四边形的面都称为Non-quad face
  2. -
  3. 所有度不为4的点称为奇异点
  4. -
  5. 每次细分时在每个面中添加一个点,每条边的中点也都添加一个点,面上的新顶点连接所有边上的新顶点
  6. -
-

第一次细分后结果:

-

-

特点:

-
    -
  1. 非四边形面的数量与奇异点相同,即现在共有$2+2=4$个
  2. -
  3. 奇异点的度数与原来所在面的边数相等,即这里为3度
  4. -
  5. 第一次细分后所有的面都会变成四边形,且后续奇异点数目不再增加
  6. -
-

Catmull-Clark 顶点更新规则

-

-
收敛性:整体形状和折痕
-

-

曲面简化(Mesh Simplification)

-

目的:降低分辨率的同时尽量保持形状/外观

-

-
边坍缩
-

边坍缩是曲面简化的常用方法,如上图所示将一条边的两个顶点合成为一个顶点,出于尽量保持形状的目的,需要正确选择不影响或影响最小的边进行坍缩,由此引入二次误差度量(Quadric Error Metrics)

-

-
二次误差度量(Quadric Error Metrics)
-

-

坍缩之后蓝色新顶点所在位置与原来各个平面的垂直距离之和,如此误差最小则整个模型样貌修改一定程度也会较小

-
曲面简化算法流程
-
    -
  1. 为模型每条边赋值,其值为坍缩后代替老顶点产生的新顶点所得到的最小二次误差
  2. -
  3. 选取权重最小的边做坍缩,新顶点的位置为原计算得出使二次误差值最小的位置
  4. -
  5. 坍缩之后,会改动与之相连的其他边,更新这些边的权值
  6. -
  7. 重复步骤,直到符合终止条件
  8. -
-

符合贪心算法标准,无法获得最优解,但效果依旧合适

-

-
-

纹理映射(Shadow Mapping)

-

Shadow Mapping是一种基于图像的算法

-
    -
  1. 阴影计算期间无需进行几何体计算
  2. -
  3. 必须进行反走样处理
  4. -
  5. 不在阴影中的点必须同时在灯光和相机范围内
  6. -
-
计算流程
-

阴影映射总体需要两个pass

-

Pass1:render from light

-
    -
  1. 获得从光源视角得到的深度图像
  2. -
-

-

Pass2:render from eye

-
    -
  1. 从观看视角(相机视角)获得带有深度的标准图像
  2. -
  3. 将观看视角中的可见点投影回光源 -
      -
    1. 光源和观看视角的下的深度相同时为可见
    2. -
    3. 光源和观看视角下的深度不相同则为被阻挡
    4. -
    -
  4. -
-

-
- -
- - - - -
- - - - -
- - -updatedupdated2023-06-182023-06-18 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/computergraphic/动画/index.html b/public/computergraphic/动画/index.html deleted file mode 100644 index 0d28dc9..0000000 --- a/public/computergraphic/动画/index.html +++ /dev/null @@ -1,943 +0,0 @@ - - - - - - - - - - - - - - - - - - 动画 | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

动画

- - - - - - - - - -
-

动画:

-
    -
  1. 交流工具,用于展示会动的东西
  2. -
  3. 关注美学,早期动画是绘画制作的,不关注物理是否符合现实,只要看起来正确
  4. -
  5. 建模或几何的拓展:动画即为在不同时间或不同帧有不同几何形状,将3D模型延伸到时间维度
  6. -
-

动画生成:

-

将很多图形按一定顺序和速度播放

-
    -
  1. 电影:一秒播放24帧
  2. -
  3. 视频:30帧每秒
  4. -
  5. 游戏:体验好需要60帧甚至144帧每秒
  6. -
  7. 虚拟现实:防止用户产生眩晕需要两眼画面90帧每秒
  8. -
-

动画发展历史

-
    -
  • 远古人类壁画
  • -
-

-
    -
  • 圆盘转动
  • -
-

人们人为制造的可以看到的动画

-

最早起,有类似圆盘的物体,可固定在某处,可以旋转

-

-
    -
  • 第一部电影
  • -
-

早期不用于娱乐,是一种科学研究的设备,如下图拍摄奔跑中的马可用于研究马匹运动时四肢动态

-

-
    -
  • 第一部与电影时长相当的动画
  • -
-

第一部手绘的与电影时长相当的动画,即剧场版:白雪公主和七个小矮人

-

每秒播放24帧,制作耗时极长

-

-
    -
  • 第一部计算机生成的动画
  • -
-

可追溯至1963年

-

-
    -
  • 早期计算机动画
  • -
-

如下图为人脸的三维结构网格,已经可以做到人物面部表情

-

-
    -
  • 电子(计算机生成)恐龙(Digital Dinosaurs)
  • -
-

如下图,侏罗纪公园,真正将计算机生成的恐龙放入电影中

-

-
    -
  • 第一部计算机生成的电影时长动画
  • -
-

第一部完全用计算机生成的动画电影:

-

皮克斯的《玩具总动员》

-

采用光栅化的方式生成阴影效果

-

-
    -
  • 十年前的计算机动画
  • -
-

依旧缺少一些细节

-

-
    -
  • 2019-冰雪奇缘2
  • -
-

充满各种细节

-

-

关键帧动画

-

下图中,上面一行的3个动作是重要位置,对应的帧称为关键帧

-

下面一行在2个动作间补充过渡的动作

-

-

关键帧插值

-

给定一系列不同的帧,中间帧采用插值的方式计算得到

-

找出每一帧中重要的点在其他帧的位置,所有点一一对应找出后就可以插值计算得到结果

-

插值得到的过渡往往需要看着自然、真实,对插值方式有一定要求

-

最简单的是线性插值,但下图为非线性插值

-

-

线性插值:

-

给定任意的连续点,将其连接成线段

-

有时需要更好的连续性,就需要用到曲线和样条,这说明几何和动画之间时存在联系的

-

-
-

物理模拟

-

关键字动画是最简单的方式,插值方式生成中间帧,但人们往往更常用物理仿真的方式

-

牛顿运动定律

-

$$F = ma$$

-

F: 施加在物体上的力

-

m:物体的质量

-

a:物体的加速度

-
    -
  1. 小球在重力影响下抛出时会形成抛物线
  2. -
  3. 衣服可认为由网格形成,任何一个顶点有一定质量,受重力影响,也受其他点作用的力的影响
  4. -
-

-

案例

-
    -
  • 布料模拟
  • -
-

-
    -
  • 流体仿真
  • -
-
    -
  1. 模拟水的运动和水滴的形成位置
  2. -
  3. 模拟了位置和形状后进行渲染得到样式
  4. -
-

-

质点弹簧系统

-

案例

-
    -
  • 绳子模拟
  • -
-

将一根绳子模拟成很多小的弹簧,允许其在重力作用下来回摆动

-

-
    -
  • 头发
  • -
-

-
    -
  • 布料
  • -
-

布料是由网格描述的,可以使用各种不同的质点弹簧系统描述,还可使用一个点进行拖拽

-

-

建模足够好的情况下,模拟与仿真可以做到与现实几乎一致

-

-

上图受限于PDF,建议结合games101第21课

-

简单的质点弹簧系统

-
    -
  • -

    质点弹簧系统:一系列相互连接的质点和弹簧

    -
  • -
  • -

    最基础的单元:一个弹簧两侧连着两个质点

    -
  • -
-

-
    -
  • 理想的弹簧(无长度,产生的力与被拉长的长度成比例)
  • -
-

$$f_{a\rightarrow b} = k_s(b-a)$$

-

$$f_{b\rightarrow a} = -f_{a\rightarrow b}$$

-
    -
  1. $f_{a\rightarrow b }$为应用到a上,往b方向的作用力,往往取决于a和b之间的距离
  2. -
  3. (b-a)为从a指向b的向量,b-a越长,力越大,可以写出a点往b点的力
  4. -
  5. $k_s$劲度系数(胡克定律:固体材料受力后,应力与形变量之间存在线性关系)
  6. -
  7. 因为力的作用的相对性,a受到向右的力,b肯定受到向左的力,两者互为相反
  8. -
-
    -
  • 非0长度弹簧
  • -
-

弹簧在正常情况下有一定的长度,为Rest length

-

弹簧在拉伸后

-
    -
  1. b和a的距离为$||b - a||$
  2. -
  3. 形变量为$||b - a|| - l$
  4. -
  5. 受力的方向$\frac{(b - a)}{||b - a||}$
  6. -
-

$$f_{a \rightarrow b } = k_s \frac{b - a}{||b - a||}(||b - a|| - l)$$

-

因能量守恒,会永远振动下去

-
    -
  • 加入摩擦力
  • -
-

平常我们会用x来表示位置,x的一阶导数(x′)表示速度,x的二阶导数(x′′)表示加速度,在物理模拟中会用x上面加一个点表示速度,加2个点表示加速度

-

$$\dot{x} = v$$

-

$$\ddot{x} = a$$

-

加入摩擦力(damping force)使它能停止

-

对于任何一个运动的质点,如果想让它停,那力的方向肯定和速度方向相反

-

-

问题:

-

会引起所有的运动都停下来,这样描述的摩擦力只能描述外部的力,描述不了弹簧之间内部的力

-
    -
  • 加入内部摩擦力
  • -
-

目的:希望弹簧恢复到正常长度

-

方向:$-(b - a)/||b - a||$

-

大小:下图红框部分,a和b之间的相对速度投影在ab方向上的速度

-

-

弹簧结构

-

弹簧可以组合成各种形状

-

如下图,可以每2根共用一个质量表示一张平面,也可以在三维空间中进行连接

-

-
使用各种弹簧模拟一块布
-
    -
  1. 问题1:切变会受影响
  2. -
  3. 问题2:存在一种力让整个形状变得不是一个平面
  4. -
-

-
    -
  • 加入斜的对角线解决切边
  • -
-

在以上的形状中加入斜的对角线,发生切变时,新加的蓝线会被压缩,那弹簧就会向外抵抗它

-

-

存在结构不对称问题,无法使模拟的布在任何一个方向拉它,它的行为保持一致

-
    -
  • 加入另外一个方向上的斜对角线
  • -
-

不能抵抗非平面的弯曲(沿着竖的或横的线折叠)

-

-
    -
  • 加上跳过相邻质点的连接线
  • -
-

如下图的红线,任何一个点都和它隔一个点连一根线

-

红线的连接是非常弱的,蓝线非常强

-

-
    -
  • 例子
  • -
-

下图是质点弹簧系统做的裙子

-

简化的表示,未表示纤维、股和线等之间的力的关系

-

-
    -
  • 拓展
  • -
-

除了质点弹簧系统,还有其他的方法,比如有限元方法(FEM (Finite Element Method)),这个方法被广泛应用于车辆碰撞,能够表现力之间的传导作用

-

-

粒子系统

-

用于描述一些很小很小移动的东西

-

建模一堆很微小的东西,定义每一个粒子会受到的力(有重力、风力、粒子和粒子之间的力)

-

很容易模仿一些魔法效果、雾、灰尘等等

-

粒子越多模拟得越精细,但是越慢;越少,计算速度越快,但效果差一些

-

-

存在问题

-
    -
  1. 粒子系统可以模拟流体,这样可能需要很多粒子
  2. -
  3. 粒子和粒子之间的作用不只有碰撞,还可能有引力,需要随时更新粒子的位置
  4. -
-

算法

-
    -
  1. 动态生成一些新的粒子
  2. -
  3. 计算每个粒子的作用力
  4. -
  5. 根据作用力更新粒子的位置和速度
  6. -
  7. 如果粒子有存活时间,移除消亡的粒子
  8. -
  9. 渲染粒子
  10. -
-

粒子系统的力

-
    -
  • 吸引力和排斥力 -
      -
    • 重力、电磁力
    • -
    • 弹力、推力
    • -
    -
  • -
  • 阻尼力 -
      -
    • 摩擦力、空气阻力、粘滞力
    • -
    -
  • -
  • 碰撞 -
      -
    • 墙、容器、固定物体
    • -
    • 动态物体、角色身体碰撞
    • -
    -
  • -
-

例子

-
    -
  • 万有引力
  • -
-

最小的物体都会满足此规律

-

$$F_g = G\frac{m_1m_2}{d^2}$$

-

$$G = 6.67428 \times 10^{-11}Nm^2kg^{-2}$$

-

-
    -
  • 银河模拟
  • -
-

-
    -
  • 基于粒子的流体模拟
  • -
-

模拟的是粒子,渲染的是像玻璃、是否带白沫

-

-

粒子间相互作用

-

粒子系统不一定只是描述最简单的点,这个粒子也就是在一个很大范围内有很多重复的东西

-

个体的运动属性:

-

会被中央的相邻点吸引

-

粒子间间隔不会太近

-

所有粒子会对齐一个方向

-

有了以上的属性就可以通过粒子的方法解出来

-

-
    -
  • 分子结构
  • -
-

-
    -
  • 人群
  • -
-

-

运动学

-

在图形学中运动学分为正向的和反向的,即正运动学和逆运动学

-

正运动学

-

骨骼系统

-

用于描述和人骨骼连接拓扑结构类似的结构,可定义不同的关节

-

-
    -
  • Pin
  • -
-

钉子钉住后只能在钉住的平面内往一个方向旋转

-

-
    -
  • Ball
  • -
-

有一个东西可以包住一个球,这个球可以任意的在任意方向旋转

-
    -
  • Prismatic joint
  • -
-

可以拉长,也就是可以有一些移动

-

-

一个简单的关节

-

如下图,只能在平面内发生旋转,类似于肩和肘的旋转,假设第一段旋转$\theta_1$度,第二段旋转$\theta_2$度,如何确定尖端位置

-

-

先算出上方黑点的位置,因为$\theta_2$是在$\theta_1$的基础上旋转的,可以用$\theta_1$加$\theta_2$计算

-

-

因此,正向运动学需要定义好连接方式,定义好它们之间的各种位置,就可以找到各种点的位置

-
    -
  • 例子
  • -
-

人类行走动作模拟

-

-
优缺点
-
    -
  • 优点
  • -
-

实现容易

-
    -
  • 缺点
  • -
-

它的定义都很物理

-

但是艺术家们更喜欢直观的控制尖端进行动画的创建,而非调整角度

-

逆向运动学

-

逆运动学可以手里捏着尖端到处移动,它会自动的调整它的关节的位置,使得尖端就在你要的位置上

-

-

如下图中,给出固定点P,它就会给出$\theta_1$和$\theta_2$,解出这两个角度的过程比较复杂

-

-

问题

-
    -
  • 逆向运动学的解有时候不唯一
  • -
-

如图,尖端位置确定,但存在两个解

-

-

-
    -
  • 存在无解的情况
  • -
-

最上面的关节点只可能出现在下图的虚线上,尖端通过旋转可以在一个圆上,从而尖端只有可能在外层的圈和内层的圈之间,其他位置到不了

-

-

问题优化

-

一般N维IK问题的数值求解

-
    -
  • 选择初始配置
  • -
  • 定义错误度量(例如:目标与当前位置之间距离的平方)
  • -
  • 计算误差梯度作为配置的函数
  • -
  • 应用梯度下降或牛顿方法
  • -
-

绑骨(Riging)

-

对于一个形状的控制,其实就是木偶操作,一定程度上就是逆运动学的一个应用

-

例子:

-

-

形状混合

-

人物有2个不同的动作,这2个动作之间可以通过插值的方式做。利用控制点做了2个不同的造型,然后将控制点和控制点之间的位置做插值

-

实际为混合控制点及其影响区域

-

-

动作捕捉

-

给真人各个不同的地方加上控制点,让这些控制点的位置直接反应到虚拟的造型上去。要建立虚拟的人物和真实的人物之间的关系,此时只要人在做动作时将它拍下来,就可以知道控制点的不同的位置并反应到对应的人物上面去

-

-

优缺点

-
    -
  • 优点
  • -
-

可以迅速捕捉大量的真实数据,避免手K的耗时耗力的操作

-

真实感非常强

-
    -
  • 缺点
  • -
-

进行动作捕捉需要很多前期的准备

-

捕捉出来的动作可能不符合艺术家的需求,需要调整(比如真人去演动画人物,动画人物的表情是很夸张的;或者有时捕捉不到好的数据,比如捕捉条件有限制,人在正面的时候看到的控制点,背面也有但正面看不到,那就要在背后加一个摄像机,这就需要成本,而且正常需要更多的摄像机;人物动作的时候还会遮挡)

-

-

其他捕捉方法

-

还有磁力的(不受遮挡影响)、机械的(真正在人身上贴上机械的东西)

-

-

光学动作捕捉

-

应用最广泛的还是光学的捕捉方法,贴一些Maker(贴片或小球)贴在人身上,然后用很多很复杂的摄像机,将这些点的位置非常准确的测出来

-

-

-

获取的动作数据

-

下图曲线就为一个控制点不同时间在三维空间中的位置

-

-

面部动画的问题

-

非常真实的动画往往会出现恐怖谷效应

-

恐怖谷效应:人们会对生成的过于真实的人类感到害怕

-

-

面部动作捕捉

-

阿凡达这部电影具有里程碑式的效应,就是因为使用了面部动作捕捉

-

-

动画/电影的生成过程

-

分别为Pre-Production、Production、Post-Production三个部分,具体工作内容和职责可由下图所示

-

-
-

单粒子模拟

-

可在已知任何一个物体任何时刻的速度和初始位置的情况下计算某个时间后的位置

-
    -
  1. 粒子满足匀速直线运动,初始位置加上速度和时间的乘积即可
  2. -
  3. 一个粒子在一个速度场会沿着类似水流的方向往前走
  4. -
-

-

此时在任何一个位置x和时间t,都有一个速度

-

$$v(x,t)$$

-

常微分方程(ODE)

-

对于一个物体的运动模拟,可以写成一阶常微分方程(Ordinary Differential Equation (ODE)的形式

-

$$\frac{dx}{dt} = \dot{x} = v(x,t)$$

-

欧拉方法(前向欧拉,显式欧拉)

-

已知速度和起始位置,求任意时刻位置

-

-

将时间细分为很多的小块,不断计算$t+\Delta t$的位置

-

$$x^{t+\Delta t} = x^ t+\Delta t \dot{x}^t$$

-

$$\dot{x}^{t+\Delta t} = \dot{x}^t + \Delta t \ddot{x}^t$$

-

始终使用上一时刻的量来估计下一时刻的量

-

问题

-

欧拉方法会迅速变得不稳定

-
    -
  • 减少$\Delta t$来减少误差
  • -
-

$\Delta t$分得越细,模拟就会越精确,如果越大,和实际的路线偏离得越多

-

-
    -
  • 不稳定性
  • -
-

不稳定:无论取多大的$\Delta t$,它都会变得和实际结果相差无限远

-

如下图,不管取多大的步长,路线都肯定不会沿着螺旋形走,而且一定会离开这个螺旋形的速度场

-

事实上,粒子在一个螺旋形的速度场,一定会按照严格的圆周运动

-

-

如下图速度场中,粒子运动轨迹与实际按一根曲线慢慢走到水平存在极大差别

-

总结:数值方法解微分方程都会面临的问题

-
    -
  • 误差
  • -
-

每一步计算都会有误差,累积起来还是有误差

-

如果用的步长较小,就可以降低误差

-

对于图形学来说,有时候模拟出来的误差问题也不大,因为图形学关注的是模拟看起来的效果,而不是物理上特别的真实

-
    -
  • 不稳定
  • -
-

不管通过怎样的方法模拟得到的结果,最后都和实际的正确的结果差得越来越远

-

如下图对应链接的视频,在绝地求生中,车辆撞上摩托后会出现奇怪的翻滚现象,这在许多存在物理引擎的游戏中普遍存在

-

-

解决办法

-
    -
  • 中点法
  • -
-

避免欧拉方法在模拟的过程中让结果离得越来越远

-
    -
  1. 一开始有一个位置和一个方向,可以直接用欧拉方法来模拟某个$\Delta t$,让其先到达a
  2. -
  3. 取原始点和a点之间的中点b,考虑它所在的速度
  4. -
  5. 再回到原始的出发点,应用b点的速度来重新再算一遍欧拉方法,到达c点
  6. -
-

-

$$x_{mid} = x(t) + \Delta t/2 \cdot v(x(t),t)$$

-

$$x(t+\Delta t) = x(t) +\Delta t \cdot v(x_{mid},t)$$

-

依旧使用的欧拉方法只是计算了两次,第一次得到中点速度,第二次代入中点速度计算

-

因为多了一个二次项而更加准确

-

$$x^{t+\Delta t} = x^t +\frac{\Delta t}{2}(\dot{x}^t+\dot{x}^{t+\Delta t})$$

-

$$\dot{x}^{t+\Delta t} = \dot{x}^t + \Delta t \ddot{x}^t$$

-

$$\dot{x}^{t+\Delta t} = x^t +\Delta t \dot{x}^t + \frac{(\Delta t)^2}{2}\ddot{x}^t$$

-

可以认为中点法作为修正的欧拉方法算出了局部的二次的模型,因而比一次的模型准确

-
    -
  • 自适应步长改变
  • -
-

如图,原始点使用欧拉方法经$\Delta t$在$x_T$上

-

将时间减半,得到2个$\Delta t$,计算2次,从原始点先用$\frac{\Delta t}{2}$ 算到一个位置,再使用$\frac{\Delta t}{2}$再算一次,到达$\frac{x_T}{2}$

-

-

如果$x_T和\frac{x_T}{2}$这2个点差得挺远,这就意味着将$\Delta t$分成2部分分别考虑这样做会更准确,那就应该考虑$\frac{\Delta t}{2}$;如果差得不远,就没必要再分下去

-
    -
  • 隐式欧拉方法
  • -
-

使用下一个时间的梯度来更新此时

-

要解下列方程组,如果速度与加速度之间不是简单的线性关系就不太好解了

-

$$x^{t+\Delta t} = x^t +\Delta t \dot{x}^{t+\Delta}t$$

-

$$\dot{x}^{t+\Delta t} = \dot{x}^t+\Delta t \ddot{x}^{t+\Delta t}$$

-

可以用求根公式,虽然比之前数值的解法要慢很多,但隐式的方法可以提供更好的稳定性

-
    -
  • 龙格库塔方法(Runge-Kutta Families)
  • -
-

龙格库塔是一类解常微分方程(ODE)方法(特别是非线性的情况)

-

其中RK4方法是应用最广泛的

-

解决的方法和欧拉方法是一样的:

-

有一个一阶导数,它和时间和位置有关,并且有一个初始情况

-

在更新的时候稍微有点不一样:用上一帧的位置用$\Delta t$乘以某个平均值来更新

-

下面的4个值是不同位置和不同时间在速度场中的值

-

-

非物理方法

-

通过调整它的不同位置,使得它最后能够满足某种限制

-

优点:

-

实现起来快、简单

-

缺点:

-

有时不能保证能量守恒的性质

-

刚体模拟

-

刚体不会发生形变,它会让内部所有的点都按照同一种方式去运动

-

如下图,一个刚体的位置、朝向、速度、角速度分别对时间求导后得到速度、角速度、加速度、角加速度

-

-

流体模拟

-

简单的非物理方法

-

通过模拟形成水的体积的小球的位置来模拟整个水的运动

-
    -
  1. 认为整个水体是由很多不可压缩的刚体小球组成的
  2. -
  3. 水在任何地方都是不可压缩的
  4. -
  5. 给定任何一个时刻这些小球它们分布,都可以知道任何一个地方的密度。如果有任何一个地方的密度变得和水一开始平静的时候的密度不一样,那就需要通过移动小球的位置把这个密度修正
  6. -
  7. 需要知道任何一个点它的密度对所有的小球位置的梯度(导数)
  8. -
-

-

欧拉方法和拉格朗日方法

-

物理模拟中模拟大规模的物质

-
    -
  • 拉格朗日方法俗称质点法
  • -
-

模拟水是认为水是由很多圆形的小水滴组成,挨个模拟小水滴

-

如下图,如果模拟一群小鸟的移动,就只关注某一只

-

-
    -
  • 欧拉方法俗称网格法
  • -
-

这里是指如何去看待模拟的一系列大规模的物体,将整个空间分成不同的网格,不管网格中的东西是出去了还是进来了,就考虑这个网格随着不同的时间是如何变化的

-

如下划分多个网格就知道时间t为黑色的鸟,t-1应显示蓝色的鸟

-

-

物质点方法

-

结合了上述两个方法

-
    -
  1. 认为这些不同的粒子都具有某些材质属性,存储在点上
  2. -
  3. 融化的过程在网格中做
  4. -
  5. 再将格子上的信息写回不同的粒子上去
  6. -
-

-
- -
- - - - -
- - - - -
- - -updatedupdated2023-06-182023-06-18 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/computergraphic/双向反射分布函数/index.html b/public/computergraphic/双向反射分布函数/index.html deleted file mode 100644 index 0dfd20a..0000000 --- a/public/computergraphic/双向反射分布函数/index.html +++ /dev/null @@ -1,518 +0,0 @@ - - - - - - - - - - - - - - - - - - 双向反射分布函数(BRDF) | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

双向反射分布函数(BRDF)

- - - - - - - - - -
-

光的反射

-

对于在某一点上发生的反射,我们通常认为:

-
    -
  • 光进来打到了一个物体,被弹走后,改变了方向
  • -
  • 光线打到了某个物体表面后被吸收,再从物体表面将吸收的能量辐射出去
  • -
-

通过Radiance 和 Irradiance 来解释

-

从某个立体角($\omega$)来的Radiance会打在dA上,在dA上转换成能量,并以光的形式辐射到另一个方向上去(dLr),即表现为出去的Radiance

-

-

对于dA来说,其接收到的能量只考虑某一方向下立体角的Radiance,在投影后就可以计算dA接收到的Irradiance,Irradiance又会转换成Radiance反射出去

-

出于描述dA从某个方向接收到能量后向某一方向辐射的能量值的目的,我们定义了双向反射分布函数(BRDF)

-

Bidirectional Reflectance Distribution Function (BRDF)

-

BRDF描述了dA表面是如何把一个方向收集到的能量反射到另一个方向去(定义收集到的能量如何如何往各个方向去分配(漫反射还是镜面反射))

-

-

镜面反射下,反射出去的方向上分布了所有能量

-

漫反射下,吸收的能量会被均等的分配到各个不同的出射方向上去

-

BRDF本质上描述了光线和物体是如何作用的,因而BRDF项也定义了物体的不同材质

-

反射方程(The Reflection Equation)

-

反射方程定义的是任意着色点,在不同的光照下,我们考虑任意一个输入的光照的入射方向对出射方向的贡献,并累加所有入射方向的贡献

-

-

公式解释:

-

考虑任一不同方向的Radiance到图示的点,再通过BRDF的计算,可以得到出射的Radiance

-

存在问题:

-

从某个方向观察着色点意味着需要考虑所有到达这个着色点的光线,在光线弹射次数大于一次的情况下,能到达着色点的光线并非只有光源,还可能有其他面反射过来的光线(一个面接收光源照射后反射的Radiance还能够照亮其他面,产生递归问题)

-

渲染方程(The Rendering Equation)

-

渲染方程在反射方程上考虑了物体自发光的情况,提高了通用性,几乎所有物体表面的光线传播都可以使用下列公式来总结

-

$$L_o(p,w_o) = L_e(p,w_o) + \int_{\Omega+} {L_i(p,w_i)f_r(p,w_i,w_o)(n\cdot w_i)dw_i}$$

-
    -
  • 渲染方程与Blinn-Phong模型都假设所有方向向外(考虑所有入射来的方向为球心向整个半球的各个方向)
  • -
  • $\Omega +$和反射方程中的$H^2$都表示半球
  • -
-

帮助理解渲染方程

-

反射方程:

-
    -
  • 对于一个点光源,反射方程描述Li进来经过BRDF反射到观察方向上去的能量
  • -
-

-
    -
  • 如果有多个光源,就累加计算每个点光源光线到这个点反射到观测方向上的能量值
  • -
-

-
    -
  • 如果有一个面光源(一堆点光源的集合),则将面光源上任意一个点的贡献积分起来
  • -
-

-

渲染方程:

-
    -
  • 在考虑其他物体反射过来的光时,可以将反射面视为光源,由于渲染方程假设所有方向都是向外的,所以从x点指向反射面就要变成负的
  • -
-

-

该点向某一观察方向辐射出去的Radiance是依赖于其他点辐射出去的Radiance,即为递归过程

-

递归的另一用处:简化方程

-

在某个方向看向一点时,我们不知道看到的能量(Lr)、从其他反射到这一点的Radiance,但其他项都已知,可定义物体的不同材质(diffuse、gloss、specular)

-

-

可利用数学上的一些简单表达式进行简化

-

$$I(u) = e(u) + \int {I(v) k(u,v)dv}$$

-

I: 从两个不同位置(u,v表示)辐射出去的Radiance,

-

e:着色点自己发出的能量在加上从其他物体表面反射来的Radiance反射到该着色点后有多少能量辐射到观察方向

-

$k(u,v)dv$ : 方程核心

-

进一步简化:

-

将BRDF和积分写成某种操作符(算子)后简化为下列式子,

-

$$L = E +KL$$

-

所有物体辐射出的所有能量 = 所有光源辐射出来的能量加上辐射出来的能量被反射后的能量

-

解渲染方程 :

-
    -
  • 将KL移至方程左侧,L写成单位矩阵*L的形式
  • -
  • 将(I-k)移至右侧
  • -
  • 计算(1-K)的逆即可解出L的值
  • -
-

$$L = E + KL$$ -$$IL - KL = E$$ -$$(I - K)L = E$$ -$$L = (I - K )^{-1}E$$

-

算子本身具有类似泰勒展开的性质

-

$$L = (I + K + K^2 + K^3 + \ldots)E$$ -$$ L = E +KE+ K^2E +K^3E + \ldots $$

-

可看做:

-

光源直接辐射(E),加上经过一次反射后的辐射(KE),加上经过两次反射后的辐射(k^2E)

-

即分解了光线传播过程的弹射次数

-

全局光照(global illumination)

-

光线弹射一次得到为直接光照,弹射两次及以上为间接光照,所有光线弹射次数的项加起来的结果为全局光照(直接光照+间接光照)

-

实例-光栅化

-

光栅化在已知着色点与光源位置的情况下便可以做着色,着色实际为直接光照

-

因此光栅化能表现的光线传播内容实际上只有零次和一次弹射(光源自己+直接光照)

-
    -
  • 直接光照(光源能直接照射的地方有颜色,其余位置为黑的)
  • -
-

-
    -
  • 一次间接光照(光弹射两次)
  • -
-

-
    -
  • 两次间接光照(光弹射一次,两次,三次累积后的全局光照效果)
  • -
-

-
    -
  • 四次间接光照(玻璃灯内部变亮,在弹射三次时,仅足够进入物体,不足以离开物体)(双层玻璃需要两次弹射进入,两次弹射离开)
  • -
-

-

8次弹射和16次弹射只会提高暗处亮度,难以感知到

-

在无限次数弹射下,亮度会收敛到某一个值上,不会有剧烈变化,也不会产生过曝

-

在相机的情况下,保持快门打开则会产生过曝现象,与辐射度量学中单位时间的条件相应,快门打开使积累能量的时间变长,亮度变亮

- -
- - - - -
- - - - -
- - -updatedupdated2023-06-182023-06-18 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/computergraphic/基本变换/index.html b/public/computergraphic/基本变换/index.html deleted file mode 100644 index 6375883..0000000 --- a/public/computergraphic/基本变换/index.html +++ /dev/null @@ -1,587 +0,0 @@ - - - - - - - - - - - - - - - - - - 3D基本变换和观测变换(viewing transform) | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

3D基本变换和观测变换(viewing transform)

- - - - - - - - - -
-

3D基本变换

-

平移矩阵

-

通常处理三维中对模型进行平移的行为

-


$T(t_x,t_y,t_z) = \begin{pmatrix} 1 &0 &0 &t_x \\ 0 &1 &0 &t_y \\ 0 &0 &0 &t_z \\ 0 &0 &0 &1 \end{pmatrix} $

-

$t_x,t_y,t_z$通常表示对应轴上平移的距离

-
-

缩放矩阵

-

通常处理三维中对模型进行缩放的行为

-

$S(s_x,s_y,s_z) = \begin{pmatrix} s_x &0 &0 &0 \\0 &s_y &0 &0 \\ 0 &0 &s_z &0 \\ 0 &0 &0 &1 \end{pmatrix} $

-

$s_x,s_y,s_z$通常表示对应xyz轴的缩放比例

-
-

旋转矩阵

-

这个矩阵通常处理三维中对模型绕坐标轴进行旋转的行为

-
-

绕x轴旋转的矩阵为 -$\begin{pmatrix} 1 &0 &0 &0 \\ 0 &cos(r) &-sin(r) &0 \\ 0 &sin(r) &cos(r) &0 \\ 0 &0 &0 &1 \end{pmatrix} $

-
-

绕y轴旋转的矩阵为 -$\begin{pmatrix} cos(r) &0 &sin(r) &0 \\ 0 &1 &0 &0 \\ -sin(r) &0 &cos(r) &0 \\ 0 &0 &0 &1 \end{pmatrix} $

-
-

绕z轴旋转的矩阵为 -$\begin{pmatrix} cos(r) &-sin(r) &0 &0 \\ sin(r) &cos(r) &0 &0 \\ 0 &0 &1 &0 \\ 0 &0 &0 &1 \end{pmatrix} $

-
-

对于给定三个旋转角度的旋转,通常使用欧拉角

-

$R_{xyz}(\alpha,\beta,\gamma)=R_x(\alpha)R_y(\beta)R_z(\gamma)$

-

此时的三个旋转方向将被称为roll,pich,yaw

-

flight_euler

-
-

对于围绕某一特定点进行旋转的行为,则将该点平移至原点处后视为绕特定轴旋转 -

-
-

视角变换矩阵

-

这个矩阵通常用来定义相机对应的视角朝向,利用这个矩阵来将相机位置移动到原点,便于后续的模型进行平移旋转等变换

-
-
-
-
1
-2
-3
-4
-5
-6
-7
-8
-9
-
-
Eigen::Matrix4f view = Eigen::Matrix4f::Identity();
-
-Eigen::Matrix4f translate;
-translate << 1, 0, 0, -eye_pos[0],
-             0, 1, 0, -eye_pos[1],
-             0, 0, 1, -eye_pos[2],
-             0, 0, 0,  1;
-
-view = translate * view;//移动相机位置到顶点
-
-
-

在上述代码中,eye_pos(x,y,z,1)往往为相机的位置

-
-

正交/投影矩阵

-

正交矩阵

-

正交矩阵将使摄像头置于坐标系原点,看向-Z轴方向,可以在Y轴上平行移动。 -最终结果将表现为在XY轴平面上的2D图像,让模型坐标归一化到[-1,1]之间

-
-

总体流程

-

为了将一个$[l,r]\times[b,t]\times[f,n]$的长方体转换为符合canonical(正则、规范、标准)的正方体,我们需要进行两步操作

-

第一步

-

平移这个长方体到坐标系的原点

-

对应矩阵$M_{translate}=\begin{bmatrix} \frac{2}{r-l} &0 &0 &0 \\ 0 &\frac{2}{t-b} &0 &0 \\ 0 &0 &0 &\frac{2}{n-f} \\ 0 &0 &0 &1 \end{bmatrix}$

-

第二步

-

缩放这个长方体到符合正则、规范、标准的正方体

-

对应矩阵$M_{scale}=\begin{bmatrix} 1 &0 &0 &-\frac{r+l}{2} \\ 0 &1 &0 &-\frac{t+b}{2} \\ 0 &0 &1 &-\frac{n+f}{2} \\ 0 &0 &0 &1 \end{bmatrix}$

-

由第一二步可得出

-

正交矩阵为$M_{ortho}=\begin{bmatrix} \frac{2}{r-l} &0 &0 &0 \\ 0 &\frac{2}{t-b} &0 &0 \\ 0 &0 &0 &\frac{2}{n-f} \\ 0 &0 &0 &1 \end{bmatrix}\times\begin{bmatrix} 1 &0 &0 &-\frac{r+l}{2} \\ 0 &1 &0 &-\frac{t+b}{2} \\ 0 &0 &1 &-\frac{n+f}{2} \\ 0 &0 &0 &1 \end{bmatrix}$

-

图示

-

正交矩阵

-
-

投影矩阵

-

投影矩阵将使模型满足自然界透视效果,如物体近大远小、所有的平行线变得不再平行,总会交于一点

-
-

推导过程

-

将远平面与近平面连线形成的梯形“挤压”到成为一个正方体

-

-

挤压的过程对梯形做横切面可知,计算挤压后的坐标点值实质上为计算相似三角形

-

如下图,可知挤压后的坐标与之前的坐标存在的数学关系为 -

-

$$y^{'}=\frac{n}{z}y$$ $$x^{'}=\frac{n}{z}x$$

-

由此可知经过“挤压”后的坐标为 -$$M_{persp->ortho}\times\begin{pmatrix} -x \\ y \\ z \\ 1 -\end{pmatrix}=\begin{pmatrix} -nx \\ ny \\ {未知} \\ z -\end{pmatrix}$$

-

所以 -$$M_{persp->ortho}=\begin{pmatrix} -n &0 &0 &0 \\ 0 &n &0 &0 \\ ? &? &? &? \\ 0 &0 &1 &0 -\end{pmatrix}$$

-

又由远平面在被“挤压”后相当于近平面做正交投影得到的远平面,可知

-
    -
  1. 任何在近平面上的点的坐标在“挤压”的过程中不发生改变
  2. -
  3. 任何在远平面的点的坐标中的Z值不发生改变,即$$\begin{pmatrix} -0 \\ 0 \\ f \\ 1 -\end{pmatrix}\rArr\begin{pmatrix} -0 \\ 0 \\ f \\ 1 -\end{pmatrix}==\begin{pmatrix} -0 \\ 0 \\ f^2 \\ f -\end{pmatrix}$$
  4. -
-

在将上述坐标公式中Z的值以n替换之后可得 -$$\begin{pmatrix} -x \\ y \\ n \\ 1 -\end{pmatrix}\rArr\begin{pmatrix} -x \\ y \\ n \\ 1 -\end{pmatrix}==\begin{pmatrix} -nx \\ ny \\ n^2 \\ n -\end{pmatrix}$$ -据此,可推测第三行未知坐标值符合以下关系 -$$\begin{pmatrix} -0 &0 &A &B -\end{pmatrix}\begin{pmatrix} -x \\ y \\ n \\ 1 -\end{pmatrix}=n^2$$ -因此 -$$An+B=n^2$$ -联立性质2推导的 -$$Af+B=f^2$$ -可得出 -$$A=n+f$$ -$$B=-nf$$

-

所以 -$$M_{persp}=M_{ortho}M_{persp->ortho}=$$ -$$\begin{pmatrix} \frac{2}{r-l} &0 &0 &0 \\ 0 &\frac{2}{t-b} &0 &0 \\ 0 &0 &0 &\frac{2}{n-f} \\ 0 &0 &0 &1 \end{pmatrix}$$ -$$\times$$ -$$\begin{pmatrix} 1 &0 &0 &-\frac{r+l}{2} \\ 0 &1 &0 &-\frac{t+b}{2} \\ 0 &0 &1 &-\frac{n+f}{2} \\ 0 &0 &0 &1 \end{pmatrix}$$ -$$\times$$ -$$\begin{pmatrix} n &0 &0 &0 \\ 0 &n &0 &0 \\ 0 &0 &n+f &-nf \\ 0 &0 &1 &0 \end{pmatrix}$$

-
-

涉及FovY的投影矩阵

-

FovY表示视域,即摄像机在固定时能看到的最大角度或最低角度的范围

-

Aspect ratio 表示纵横比,投影平面的长宽比 -

-

对应的相似三角形关系不变,参数改变 - -可得如下关系 -$$\tan{\frac{fovY}{2}}=\frac{t}{|n|}$$ -$$aspect=\frac{r}{t}$$ -因此 -$$t=near\times tan(\frac{fovY}{2})$$

-

$$r=aspect\times near\times tan(\frac{fovY}{2})$$ -$$l=-aspect\times near \times tan(fovY/2)$$ -带入上述由l,b,n,f构成的矩阵可得 -$$M_{persp->ortho}$$ -$$=$$ -$$\begin{pmatrix} \frac{2}{r-l} &0 &0 &0 \\ 0 &\frac{2}{t-b} &0 &0 \\ 0 &0 &\frac{2}{n-f} &0 \\ 0 &0 &0 &1 \end{pmatrix}$$ -$$\times$$ -$$\begin{pmatrix} 1 &0 &0 &-\frac{r+l}{2} \\ 0 &1 &0 &-\frac{t+b}{2} \\ 0 &0 &1 &-\frac{n+f}{2} \\ 0 &0 &0 &1 \end{pmatrix}$$ -$$=$$

-

$$\begin{pmatrix} -\frac{\frac{\cot{FovY}}{2}}{apsect*near} &0 &0 &0 \\ 0 & \frac{\frac{\cot{FovY}}{2}}{near} & 0 & 0 \\ 0 & 0 & \frac{2}{near-far} & 0 \\ 0 & 0 & 0 & 1 -\end{pmatrix}$$

-

$$\times$$

-

$$\begin{pmatrix} -1 &0 &0 &0 \\ 0 &1 &0 &0 \\ 0 &0 &1 &-\frac{near+far}{2} \\ 0 &0 &0 &1 -\end{pmatrix}$$

-

$$=$$

-

$$\begin{pmatrix} -\frac{\frac{\cot{FovY}}{2}}{apsect * near} &0 &0 &0 \\ 0 &\frac{\frac{\cot{FovY}}{2}}{near} &0 &0 \\ 0 &0 &\frac{2}{near-far} &-\frac{near+far}{near-far} \\ 0 &0 &0 &1 -\end{pmatrix}$$

-
-

视口变换

-

经过MVP矩阵计算后得到的一个正则的正方体需要将X轴和Y轴上的坐标映射到屏幕坐标[0,width]$\times$[0,height]

-

变换时需要先将[-1,1]缩放到屏幕大小[width,height],再进行平移使得原点坐标与屏幕原点对齐

-

变换矩阵 -$$M_{viewport}=\begin{bmatrix} -\frac{width}{2} &0 &0 &\frac{width}{2} \\ 0 &\frac{height}{2} &0 &\frac{height}{2} \\ 0 &0 &1 &0 \\ 0 &0 &0 &1 -\end{bmatrix}$$

- -
- - - - -
- - - - -
- - -updatedupdated2023-06-182023-06-18 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/computergraphic/常用光照模型/index.html b/public/computergraphic/常用光照模型/index.html deleted file mode 100644 index 28f31aa..0000000 --- a/public/computergraphic/常用光照模型/index.html +++ /dev/null @@ -1,503 +0,0 @@ - - - - - - - - - - - - - - - - - - 常用光照模型 | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

常用光照模型

- - - - - - - - - -
-

着色(shading)

-

着色往往是指向模型物体上色或添加材质特性的流程(不包含阴影的计算)

-

对于计算以某个点为反射点的反射向摄像机的光照,我们需要四个主要数据

-
    -
  1. 视线方向,v
  2. -
  3. 模型表面法线,n
  4. -
  5. 光线方向(许多光线中的一条),l
  6. -
  7. 模型表面性质(如,颜色,粗糙度等)
  8. -
-

-

blinn-phong

-

在进一步计算时,我们先对效果进行分析,将效果拆分如下图为3个部分

-

分别为

-
    -
  1. 镜面反射高光(Specular highlights):对于绝缘体而言其与高光对应,对于金属而言其与它本身的光对应
  2. -
  3. 漫反射(diffuse reflection):来自于光在物体表面的散射现象
  4. -
  5. 环境光(ambient lighting):光在物体之间弹射,最终在整个环境中形成的一个基本光
  6. -
-

-

由此可见,一个物体在渲染后体现的颜色是这三种光的总和,即每个位置的颜色就是specular+diffuse+ambient

-
Diffuse Reflection
-

在计算漫反射时我们要考虑反射点接收了多少能量从而判断高光的亮度大小

-

根据lambert's cosine law,反射点吸收能量的多少与反射点法线和光线的夹角有关,即如图中表现的$\cos{\theta}=l\cdot n$

-

-

由此我们可以将漫反射总结为如下公式(lambertian Shading)

-

$L_d=k_d(I/r^2)max(0,n\cdot l)$

-
    -
  1. $L_d$ : 我们想要的反射光线
  2. -
  3. $k_d$ : 漫反射系数
  4. -
  5. $(I/r^2)$ :到达反射点的能量值
  6. -
  7. $max(0,n\cdot l)$ : 反射点接收的能量值
  8. -
-
Specular Term(高光)
-

高光(Specular)指的是视线在一定的角度区域观看模型表面时会产生一个类似镜面反射的效果

-

-

如图中黄色区域为可见高光的视线范围

-

计算过程中需要引入一个半程向量(光线与视线夹角一半方向上的一个单位向量,半程向量与法线向量越接近,镜面反射强度越高)

-

$$ h=bisector(v,l) = \frac{v+l}{ || v+l || } $$

-

$$L_s=k_s(I/r^2)max(0,\cos \alpha)^p$$ -$$\quad =k_s(I/r^2)max(0,n \cdot h)^p$$

-

-

$ k_s $ : 镜面反射系数 -$ p $ : 高光的面积,P越大高光面积越小 -$ L_s $ : 计算的高光效果光线

-

高光的效果和范围大小与$k_s$和p有关,下图展示了变化效果

-

-
ambient Term (环境光)
-

任何物体都可以反射光,这使得光在多个物体间弹射,最终会在环境中形成一个最基本的光,通常会被视为常量

-

!这是一个近似的效果(不符合物理)

-

$$L_a=k_a I_a$$

-

$k_a$ : 环境光系数,确定当前环境的底色

-
Blinn-phong Reflection Model
-

-

$$L = L_a + L_d + L_s $$ -$$\quad = k_aI_a+k_d(I/r^2)max(0,n\cdot l)+k_s(I/r^2)max(0,n\cdot h)^p$$

-

当然这种方式会产生严重的塑料感,这种感觉可以通过调整参数来减少或避免,下次再述(挖坑)

-
-

渲染序列

-

渲染序列可以分为三种:

-

逐三角渲染(flat shading)

-
    -
  1. 三角形面或一个法线向量视为是一个平面
  2. -
  3. 对平滑表面的表现力不友好
  4. -
-

-

逐顶点渲染(Gouraud shading)

-
    -
  1. 根据三角形顶点对颜色进行插值计算
  2. -
  3. 每一个顶点都有一个法线向量
  4. -
-

-
    -
  1. 如何获取逐顶点的法线向量 -
      -
    1. 对于标准的几何图形:顶点的法线向量就在顶点位置
    2. -
    3. 对于非标准的几何图形:包含该顶点的周围几个表面的法线取平均值,可由计算公式$$ N_v=\frac{\sum_{i}N_i}{\lVert \sum_{i}N_i \rVert}$$ 得到
    4. -
    -
  2. -
-

-

逐像素渲染(phong shading)

-
    -
  1. 对每一个三角形的法线向量插值(Barycentric interpolation)
  2. -
  3. 对每一个像素计算完整的渲染模型
  4. -
  5. 注意:非Blinn-Phong反射模型
  6. -
-

-
- -
- - - - -
- - - - -
- - -updatedupdated2023-06-182023-06-18 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/computergraphic/材质与外观/index.html b/public/computergraphic/材质与外观/index.html deleted file mode 100644 index de7b87e..0000000 --- a/public/computergraphic/材质与外观/index.html +++ /dev/null @@ -1,688 +0,0 @@ - - - - - - - - - - - - - - - - - - 材质与外观 | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

材质与外观

- - - - - - - - - -
-

图形学中的材质

-

用于描述光线和不同材质间的作用关系

-

-

上图从左至右分别为三维空间中的网格模型,渲染出的两种不同结果

-

材质(Material) == BRDF

-

渲染方程由物理量推出,因而渲染方程本身严格正确,BRDF描述了某一种材质,因此BRDF决定了光如何被反射

-
漫反射材质
-

漫反射:任何一根光线打到漫反射位置的点上会被均匀地分散到各个不同的方向上去

-

-
    -
  • 漫反射材质可定义任何一个不同的点上不同的漫反射系数
  • -
-

经验定义:

-

在Blinn-phong模型中,我们定义过漫反射系数,有多少Intensity到达,然后用一个0到1的颜色控制能被吸收多少(RGB三个通道各不相同,那就引入了颜色)

-

正确定义:

-

空间中从任何一个方向进来的光的Radiacne是一样的,反射出来的光因为漫反射所以也是同样的

-

因此如果如果这个点不发光也不吸收光(白的),那就意味着所有的光进来多少就发射出去多少。也就是进来多少Irradiance,就会出去多少Irradiance,因为Radiance是一致的的,所以入射和出射的Radiance也要是一样的

-

-

要使Li等于Lo,所以BRDF为$1/\pi$,此时是完全不吸收能量的

-

可定义一个反射率(albedo)在0到1之间,那就可以引入不同颜色的BRDF,值为$albedo/\pi$。这个BRDF的范围是$(0,1/\pi)$

-

$$f_r = \rho/\pi$$

-
Glossy材质
-

类似于镜面反射又有些粗糙

-

-
类玻璃/水的通透材质
-

-

左图为玻璃球(水的性质),右图有颜色且来自于玻璃球壳内,说明折射光在玻璃里传播时会被部分吸收

-

反射

-
物理上的反射定律
-

镜面反射:入射角等于反射角

-

-
计算公式
-

方式一:

-

根据反射定律,入射光的方向和出射方向的正中间一定是法线方向,再利用平行四边形法则,将$\omega o$和$\omega i$加起来,一定会沿着n方向,其长度为$2\cos \theta $

-

方式二:

-

将入射和反射角投影到局部坐标系上,可以认为任何一个方向和法线的夹角为0,意味着其方向沿着法线方向,为坐标系的水平方向

-

再定义一个$\phi$角度:规定$\omega i$、$\omega o$、n在某一个平面上,$\phi$等于0,如果这个平面绕着n在转,所形成的角度叫方位角

-

通过这种方式可以将任何的角度拆成$\theta$和$\phi$,对于左图从上往下看,得到右图,入射角和出射角的朝向在方位角上正好相反(也就是在一个角度上加上一个$\pi$),然后所有的角度都是按$2\pi$循环的

-

所以已知$\theta和\phi$,就可以计算出射方向

-

-

镜面反射:

-

对于一个全镜面反射来说,只需要考虑菲涅尔系数

-

$$L_o(\omega_o) = F_r(\omega_r)L_i(\omega_r) = \int_{\Omega}f_r(\omega_o,\omega_i)L_i(\omega_i)\cos \theta_i d\omega_i$$

-

$\omega_r和\omega_o$关于表面法线对称

-

此处描述$f_r$BRDF项使用狄拉克函数$\delta$

-

$\delta$函数满足:

-

$$\delta(x) = \begin{cases} -\infty & \text{x = 0} \\ -0 & {x \neq 0 } -\end{cases}$$

-

$$\int_{-\infty}^{+\infty} {\delta(x)} =1$$

-

$$\int_{-\infty}^{+\infty} {f(x)\delta(x-x_0)dx} = f(x_0)$$

-

此时将狄拉克函数代入方程中可得到

-

$$L_0 = \int_{\Omega} {\frac{\delta(\omega_i - \omega_r )}{\cos\theta_i}F_r(\omega_i)\cos\theta_i d\omega_i} = F_r(\omega_r)L_i(\omega_r)$$

-

得到镜面反射的BRDF表达式:

-

$$f_r(p,\omega_0,\omega_i) = F_r(\omega_r)\frac{\delta(\omega_i - \omega_r)}{\cos\theta_i}$$

-

折射

-
    -
  • 色散:一束平行光经过棱镜后,因为不同的波长有不同的折射率,会被分解成不同的光线
  • -
  • Caustics(不准确翻译为焦散)
  • -
-

产生Caustics的原因永远不是散射,而是聚焦

-

形成原因:光线打到的海水表面时,光线会往不同的方向去折射,对于海底的某一个点来说,有几率接收到来自不同方向打过来的光

-

-

斯内尔定律(Snell's Law)

-

不同材质拥有不同的额折射率,如真空认为是1,水为1.333,折射率越高说明光在穿过这个材质时会被折射得非常厉害,折射角会非常小,体现出不同波长的光被折射得不同程度

-

-

方位角的朝向中,入射光和折射光也是正好相反的

-

入射角的正弦和折射角的正弦满足折射率相乘相等

-

$$\eta_i \sin\theta_i = \eta_t \sin\theta_t$$

-

-

由斯内尔定律可计算折射角的余弦

-

$$\eta_i \sin\theta_i = \eta_t \sin\theta_t$$

-

$$\cos\theta_t = \sqrt{1-\sin^2\theta_t} $$

-

$$= \sqrt{1-(\frac{\eta_i}{\eta_t})^2 sin^2\theta_i}$$

-

$$\sqrt{1-(\frac{\eta_i}{\eta_t})^2(1-\cos^2 \theta_i)}$$

-

全反射现象

-

当满足下列条件时,折射角的余弦的计算没有实数意义,即折射不可能发生

-

$$1-(\frac{\eta_i}{\eta_t})^2(1-\cos^2\theta_i) < 0$$

-

要使上式成立则

-

$$\frac{\eta_i}{\eta_t} > 1$$

-

即入射介质的折射率大于折射介质的折射率,此时可能会发生没有折射的现象,名为全反射现象

-

如:Snell's Window/Circle

-

人在水底,往各个不同的方向看,只能看到一个锥形的区域(97.2度)。如下图,最左边的一根光线的折射角就已经达到90度了,如果角度再大一点,所有能量都会反射到池子底部

-

-

BSDF = BRDF + BTDF

-

BRDF中的R表示反射,折射是BTDF,其中的T是transmit。BRDF和BTDF加起来可以统称BSDF,其中的S表示散射

-

菲涅尔项(Fresnel Reflection/Term)

-

反射率取决于入射角(和光的偏振)的现象

-

-

如上图中,反射现象随着视角变化而明显

-
绝缘体
-

图中红线所示,如果一根光几乎和物体表面完全持平,那它就会被完全反射掉;如果光和物体是垂直的,更多的能量会发生折射,反射的能量会非常少

-

下图的另外两根线表示的是极化现象,和光线的波动性有关,其实光线是沿着各个不同方向有振动的,极化就是只沿着某一个方向振动(S和P是两个方向的极化)

-

-
导体
-

导体的菲涅尔项和绝缘体的不一样,即使在垂直看过去的情况下,也是反射很多能量

-

导体的折射率是复数,需要一个N和一个K

-

-
菲涅尔项的公式
-

一个0到1之间的数,有多少能量会被反射,2个不同的极化(polarization:S和P)会告诉你不同的反射率,如果考虑不极化的光,就将2项平均

-

-
菲涅尔近似式
-

可认为该曲线在视角为0度时为某一个值,到达90度值就为1,和绝缘体类似,对导体而言,不考虑其下降再上升的过程

-

基准反射率与折射率存在数学关系

-

$$R_0 = (\frac{n_1-n_2}{n_1+n_2})^2$$

-

曲线上升到90度时为1,0度时等于$R_0$

-

$$R(\theta) = R_0 + (1 - R_0)(1 - \cos\theta)^5$$

-

可近乎完美地近似绝缘体或导体

-

微表面材质/模型

-

如下图在空间站拍摄的照片,有相对完美的高光,但看不到地球表面的山、树、和建筑物

-

与微表面理论不谋而和,只要离得足够远,看向一个物体时,很多微小的东西看不到,看到的是它们最终形成的对表面的作用(对光形成的总体的效应)

-
微表面理论(Microfacet Theory)
-

假设物体表面是粗糙的,从远处看看到的是材质(外观),从近处看看到的是几何

-
    -
  • -

    Macroscale层级:(flat & rough)从远处看,看到的是一个平面,并且是粗糙(材质看上去是粗糙的)的;

    -
  • -
  • -

    Microscale层级:(bumpy & specular)从近处看,可以看到很多凹凸不平的表面,并且每一个小的表面的微元都认为是完全镜面反射的物体

    -
  • -
-

漫反射将光反射到各个方向上就是认为所有的微表面都像一个很小的镜子,分布又各不规则,最后形成的分布就会把光打到各个不同的方向上去

-

-
微表面法线分布
-
    -
  • 可使用微表面模型将表面的粗糙程度用微表面的法线分布表示
  • -
-

glossy材质:

-

如下图的表面,看起来很平,它们的分布法线差的不太远,基本都是朝上的。所以如果将它们的分布画出来,它们的法线会集中在宏观的表面法线的周围

-

-

diffuse材质:

-

如下图,如果表面粗糙(意味着所有的微表面会沿着不同的方向),如果将法线画出来,那它的分布就会离中心离的特别远都会有分布的值

-

-
    -
  • 微表面模型的BRDF公式
  • -
-

菲涅尔项(Fresnel)- F(i,h):

-

表示总共有多少能量被反射。根据不同的入射方向有不同程度的反射(也就是说如果入射方向几乎是平的,那么就会有大量能量被反射)

-

法线分布(distribution of normals)- D(h):

-

这个分布表示在任何一个给定方向上分布的值(可能是集中在中间的,可能是均匀分散开的)

-

只有当微表面的法线方向和half vector完全一致的时候,才能吧入射方向的光反射到出射方向上去

-

阴影遮掩(shadowing-masking)(几何项) - G(i,o,h):

-

这些微表面间有可能会发生互相遮挡。对入射的光线,有可能会出现自己给自己的阴影;对于观察方向也是一样的,有部分也有可能因为遮挡会看不到

-

光线近似平行于表面时更易发生自遮挡,这种入射方向为掠射角(Grazing Angle),阴影遮掩的提出正是用于修正掠影角

-

-
-

使用微表面材质渲染得到的图像质量很高,且微表面模型可描述的物体种类较多,金属、皮质、木头

-

-

各向同性/各向异性材质

-

如下图在电梯间的内部,电梯间的六面几乎都是金属,金属是平面的,如果说头顶上有一些小灯打到金属的表面上去会形成高光,高光一般都是圆和椭圆,但这里出现了一条一条的现象

-

当金属为拉丝金属,就会产生如图现象

-

-
    -
  • 各向同性:认为其微表面不存在一定的方向性,或方向性微弱
  • -
-

下图可见法线在各个方向上的分布是均匀的

-

-
    -
  • 各向异性:认为其法线分布具有明确的方向性
  • -
-

-
    -
  • Anisotropic BRDFs
  • -
-

如果出射方向和入射方向在方位角上旋转,得到的还是相同的BRDF,那就是各向同性的材质。如果不只和相对的方位角有关,还和绝对的方位角有关,那这个BRDF就是各向异性的

-

$$f_r(\theta_i,\phi_i;\theta_r,\phi_r) \neq f_r(\theta_i,\phi_i;\theta_r, - \phi_r)$$

-
    -
  • 尼龙
  • -
-

正常尼龙做法为水平方向和竖直方向的一根压一根,其各向异性在对角线上有不同的表现

-

-
    -
  • 天鹅绒
  • -
-

底层有很多伸出去的纤维,如果这些纤维往各个不同方向上分布是均匀的,就可认为是各向异性。但我们可将纤维拨到一边去,认为造出各向异性效果

-

-

BRDF属性

-
    -
  • 非负性
  • -
-

$$f_r(\omega_i - \omega_r) \geq 0 $$

-
    -
  • 线性
  • -
-

BRDF可拆分为多块,分别做光线传播,再累加各块,得到结果与未拆分相同

-

$$L_r(p,\omega_r) = \int_{H^2} f_r(p,\omega_i \rightarrow \omega_r)L_i(p,\omega_i)\cos\theta_id\omega_i$$

-
    -
  • 可逆性
  • -
-

交换入射方向和出射方向,得到的BRDF值相同

-

$$f_r(\omega_r \rightarrow \omega_i) = f_r(\omega_i \rightarrow \omega_r)$$

-
    -
  • 能量守恒
  • -
-

BRDF不会让能量变多

-

$$\forall \omega_r \int_{H^2} f_r(\omega_i \rightarrow \omega_r)\cos \theta_i d\omega_i \leq 1 $$

-

path tracing 中光线在无限次弹射后会收敛正是因为能量守恒

-
    -
  • 各向同性和各向异性
  • -
-

各向同性说明BRDF的值只与相对的方位角相关,可改写为下式

-

$$f_r(\theta_i,\phi_i;\theta_r,\phi_r) f_r(\theta_i,\phi_i;\theta_r, - \phi_r)$$

-

原本四维的BRDF会变成三维

-
    -
  • 由于BRDF的可逆性,所以对于各向同性来说,相对的方位角无需考虑正负
  • -
-

$$f_r(\theta_i,\theta_r,\phi_r - \phi_i) = f_r(\theta_r,\theta_i,\phi_i - \phi_r) = f_r(\theta_i,\theta_r,|\phi_r - \phi_i|)$$

-

测量BRDF

-

BRDF可以用各种各样不同的模型去描述,但这些模型都是基于物理的描述或者近似,但只有测量出来的BRDF才是对的BRDF

-
    -
  • 测量原因
  • -
-

以前的模型不够准确

-

可以通过某些物理方法测出菲涅尔项(绿线、红线),发现和理论上的曲线(蓝线)看起来完全不一样。也就是说实际上菲涅尔项非常复杂,不是简单公式可以描述的,所以之前的模型是不太准确的

-

物理上得出的很多结论大多经过简化,与实际不同,在多数情况下需要测量

-

测量后可以不用推出一些模型,可以直接用测的数据

-

-
怎么测量
-
    -
  • 理论
  • -
-

BRDF是2个方向(一个入射方向,一个出射方向)的一个函数,如果盯着一个着色点看,并改变它的入射方向(比如拿一个灯从四面八方照它),相机从四面八方去拍它,这样就可以覆盖BRDF所有可能的输入方向和可能的输出方向对,这样就可以做测量

-

-
    -
  • 实践仪器
  • -
-

这个器械有2个爪子,一个抓相机,一个抓光源,将样本放在正中间(球心),这2个爪子可以在球面上任意的旋转

-

-
    -
  • 算法
  • -
-

枚举所有出射方向,放置光源

-

枚举所有入射方向,放置相机

-

测量Radiance

-
foreach outgoing direction wo
-    move light to illuminate surface with a thin beam from wo
-    for each incoming direction wi
-        move sensor to be at direction wi from surface
-        measure incident radiance
-

测得BRDF是四维的,测量十分耗时

-

固定了摄像机之后,光源要整个走一遍球面,才能覆盖所有的光源方向,如果下次换一下相机的方向,就又要把光源在整个球面走一遍,这就叫curse of dimentionality

-
    -
  • 提升算法效率
  • -
-

如果测量的BRDF是各向同性的,实际上只有三维的

-

用BRDF的可逆性,只考虑相对方位角的话,又可以减少一半的测量

-
    -
  • BRDFs存在的问题
  • -
-
    -
  1. 需要精确测量掠影角
  2. -
  3. 需要足够高密度的采样频率来测量,以捕获高频的镜面反射
  4. -
  5. 逆向反射
  6. -
  7. 空间反射率会发生变化
  8. -
-
    -
  • BRDFs的存储
  • -
-

需要的存储要求

-
    -
  1. 紧凑的表现形式
  2. -
  3. 准确表示测量的数据
  4. -
  5. 能正确表现任意方向
  6. -
  7. 需要可用于重要性采样的良好分布
  8. -
-
    -
  • BRDF库
  • -
-

BRDF库存储了很多不同的材质,大多数是假设各向同性的

-

对每一个材质做了9090180次测量,并存储结果至一个三维数组

-

存储数据量大(未压缩)

-

- -
- - - - -
- - - - -
- - -updatedupdated2023-06-182023-06-18 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/computergraphic/相机与透镜/index.html b/public/computergraphic/相机与透镜/index.html deleted file mode 100644 index f06491b..0000000 --- a/public/computergraphic/相机与透镜/index.html +++ /dev/null @@ -1,720 +0,0 @@ - - - - - - - - - - - - - - - - - - 相机与透镜 | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

相机与透镜

- - - - - - - - - -
-

计算机图形学中有两种成像方法:光栅化成像和光线追踪成像

-

这两种方法都是一种合成(Synthesis)的方法,即这个在自然界中不存在,但我们不知可以通过合成方法成像,还可以通过捕捉(capture)方法成像

-

$$Image = Synthesis + Capture$$

-

当然还有很多种成像方法,最简单的捕捉成像方法是使用相机。当然现在还在研究很多别的更好成像技术(比如:光线的传播其实是有时间的,有一些研究会研究光在极短时间内的传播,就可以看到光线真正在空间中进行传播的过程,这个过程叫Transient image(瞬息图像))

-

-

相机

-

-

最早的相机起源子小孔成像

-

如果中间平面上的一个孔是一个理想的点,那左边所有不同的有反射光的点,通过中间的孔会在另一侧形成和左边的人道理的像,此时在另一侧放一个传感器将其记录在胶片上就可以得到一张相片

-

小孔成像对应的相机为针孔相机(pinhole camera)

-

生活中常见的则为带透镜的相机

-

-

相机部件

-
    -
  • 快门(shutter)
  • -
-

下图为去掉了镜头后的相机快门部分,控制光在多少分之一秒内进入相机

-

-
    -
  • 传感器
  • -
-

记录传感器上任何一个点(像素)的Irradiance

-

-

如果一个相机没有透镜或针孔是无法拍出照片的,如果将一个感光元件直接放在一个人的面前,任何一个点上都可能收集到来自不同方向的光,而这个点作为传感器无法区分来自各个方向的光线,此时会将各个方向的能量都综合在这个点上,会导致所有东西都是模糊的

-

-

前沿中存在传感器可通过方向性的光分开记录的研究,但目前依旧认为只能记录Irradiance而非Radianc

-

小孔成像过程

-

小孔成像现象在公元前就已经被发现和提出

-

-

在今天,针孔摄像机拍摄依旧可行,大多数使用的相机都是带有透镜的,

-

真正做一个如下图的针孔(硬纸板中间有一个6mm直径能透光的地方),也能用这个小针孔拍摄某个场景,记录在胶片上。但拍出来的东西是没有深度可言的,任何地方都不会是虚的,都一定是清楚的

-

-

-

虚化正是来源于透镜。在计算光线追踪是,我们使用的就是针孔摄像机的模型,所以也得不出不同的地方会有不同的模糊

-

视场(Field of View)(FOV)

-

视场往往意味着能够看到多大的范围,对于广角镜头,通常意味着能够拍到更广的角度,可见的FOV更大,对于手机上的相机,视场就相对比较小

-

-

从小孔成像的针孔摄像机理解视场

-

通过上图的相似三角形关系,如果分别从传感器的两个边缘和小孔连一条线,那么两条线中的区域都是可视范围

-
    -
  1. 传感器的高度认为是h
  2. -
  3. 传感器和小孔之间的距离(焦距,小孔成像中不存在此概念)是f
  4. -
  5. 通过平分FOV可计算得出
  6. -
-

$$FOV = 2\arctan(\frac{h}{2f})$$

-

将传感器放置在离小孔更近的地方会使f变小,FOV变大,这样就可以通过内部设计推断视场有多大

-

焦距(focal length)和视场

-
通过定义焦距的方式来定义视场
-

不同视场决定不同拍照结果。视场和传感器大小及焦距相关,所以人们通常定义视场(FOV)以35mm格式的胶片为基准,固定传感器的大小,再通过定义焦距的方式来定义FOV

-

-
单反镜头的焦距
-

购买单反镜头时会有不同的焦距参数的原因正是视场不同

-
    -
  • 17mm is wide angle 104$^\circ$
  • -
  • 50mm is a "normal" lens 47$^\circ$
  • -
  • 200mm is telephoto lens 12$^\circ$
  • -
-
手机相机的焦距
-

对于手机相机,其传感器很小,所以对应的焦距也小很多,手机上显示的焦距往往只是一个等效的概念

-
不同视场的效果
-

当视场越窄,看到的东西越远

-

-

传感器(Sensor)大小和视场(FOV)

-

小一点的传感器会对应小一点的视场

-

-
传感器与胶片
-

传感器与胶片这两个概念不一样,平常往往认为是一回事,认为传感器上各个不同的点会对应写到对应的位置上去,存在一个一一对应的关系。我们认为传感器接收到的图像就是最后成像出来的图像。对于渲染器而言,传感器负责记录每个像素最后收到的Irradiance有多大,胶片用于决定应存储的图片格式

-
传感器大小
-

大相机有大的传感器也就有大的分辨率,所以不同相机价格各不相同,相机机身越大,镜头越大越长越好,价格也就越高

-

-

曝光

-

理解:

-

如果对明亮场景拍照,得到的结果会亮一些,如果对着一个比较暗的场景,但快门按下的时间长即曝光时间长,也可以得到一个比较亮的照片。因此通过进来多少光和让光进来多长时间,进行累积就可以得到曝光度

-

在辐射度量学上,单位时间内有光打到一个表面,单位时间内又辐射出去,就只需要考虑单位时间,但照相是考虑整体时间

-
    -
  1. 曝光时间(T)由快门控制
  2. -
  3. Irradiance(E)指传感器单位面积接收的光能
  4. -
  5. H = T $\times$ E
  6. -
-

Irradiance往往由光圈大小(影响镜头接收到多少光)和焦距决定

-

影响照片亮度的因素

-
    -
  • 光圈的大小
  • -
-

相机为精密仪器,可控制光圈大小,最大可开到镜头一样大,由f-stop控制。实际上是仿生学设计,模仿人的瞳孔的动态大小调节功能

-
    -
  • 快门速度
  • -
-

快门速度越快,开放时间越短,更少的光进入

-
    -
  • ISO增益/感光度(ISO gain)
  • -
-

可简单理解为后期处理,当感光元件感知到某个层级的光后利用ISO后期乘上一个数值(可发生在不同的地方,可发生在硬件,调节传感器灵敏度,还可以生成照片的数字信号上进行调节)

-

各因素不同的配置

-
    -
  • 下图第一行参数中用F数表示光圈大小,黑色为遮挡物,白色为光圈大小,F数越大,光圈越小(点号写成逗号为欧洲写法)
  • -
  • 第二行参数使用分数表示快门速度(1/1000即为快门开放1/1000秒)
  • -
  • 第三行参数是ISO,不同ISO可简单理解为相乘
  • -
-

-

ISO简单地放大信号会放大噪声

-

任何一个信号肯定会产生噪声,对整个信号去乘以一个很大的数,在放大信号的同时也会放大噪声,这也是在很暗的环境中使用很小的光圈和快门时间会拍出来一张很暗的图

-

正常情况下,都不会通过调ISO的方式来得到一个更亮的图,在小范围内调整无误但调得特别大后一定会出现噪声问题

-

产生噪声的原因:

-

将光认为是光子,如果快门时间不足,那么进入感光元件的光子数就少,光子数少就会造成noisy

-

-

光圈与F数

-
    -
  • -

    描述光圈大小常用F-Number

    -
  • -
  • -

    F数有两种写法:FN(F后接一个数字)或F/N

    -
  • -
  • -

    F数的非正式理解:光圈的直径的逆,即$\frac{1}{直径}$

    -
  • -
  • -

    如图,调光圈可以直接调出曝光度

    -
  • -
-

-

快门曝光时间对结果的影响

-

快门

-

-
    -
  • -

    调节曝光度

    -
  • -
  • -

    产生运动模糊(motion blur)

    -
  • -
-

常出现在高速运动的物体上,在快门打开的期间物体发生了运动,就意味着在快门开合过程中会记录物体的一段移动,传感器由起到平均作用,所以表现为模糊

-

更长的快门时间会造成更严重的运动模糊,对于等长的快门时间,物体运动越快,越容易出现运动模糊

-

-

但是更短的快门时间,曝光度也降低了,所以为了达到相同的亮度,就要调节ISO或光圈的大小

-

-

运动模糊的好处

-
    -
  1. 没有运动模糊会从人的感知上觉得赛车非常慢
  2. -
  3. 对于运动的物体,一帧的拍摄相当于在不同的时间对物体所在的位置进行了一个采样,如果有运动模糊,就相当于做了一个反走样
  4. -
-

rolling shutter问题

-

电子控制的快门可以认为是任何时刻任何位置同步打开,但机械快门则需要一个过程,如果物体运动比机械快门的速度快就会出现Rolling Shutter问题,因为图像上不同位置可能记录的是不同时间进来的光

-

-

均衡快门和光圈

-

快门的时间打开得短就会暗,那就可以提高光圈的大小,用更小的F数。以下的表格上下对应的参数基本可以达到相同的曝光度。但达到的效果并不会一模一样(因为大光圈会引起前景深的问题,快门时间又会引起运动模糊)

-

-
-

快速或长曝光摄影

-

快速摄影

-

每秒拍摄更多帧数然后按正常帧数播放,每张照片的快门时间非常少又需要保证每张都清晰且有正常的曝光度,可以用更大的光圈和更高ISO

-

-

超低速(长曝光)摄影

-

用非常小的光圈慢慢拍,也就是所谓的延迟摄影,摄影界中称为拉丝,也就是长曝光造成的运动模糊

-

-

-

-

镜头

-

Thin Lens Approximation

-
    -
  • 真正的镜头设计是高度复杂的
  • -
-

无论相机还是手机,都不使用单个透镜来成像,往往使用一个透镜组

-

-
    -
  • 真正的镜头元素是不理想的
  • -
-

如下图,一面是凸的,一面是平的,这样就不可能将光聚在一起

-

-
    -
  • 我们研究的是理想的薄透镜(忽略厚度)
  • -
-

理想透镜:

-
    -
  1. 对于平行于透镜的光如果打进来会被集中到一个点上(焦点),定义焦距是焦点到透镜中心的距离
  2. -
  3. 光路有可逆性,如果光线穿过焦点,被透镜折射后会变成平行的一束光
  4. -
  5. 假设薄透镜可以任意改变焦距(透镜焦距固定,相机能改是因为透镜组)
  6. -
-

-
    -
  • 透镜满足的物理规律
  • -
-
    -
  1. 平行光会被折射成过焦点,以及过焦点的光会被变成平行光出去
  2. -
  3. 任何一个透镜可以假设任何一条光穿过透镜中心,它的方向不会发生改变
  4. -
  5. 对于固定焦距的透镜,如果改变像距,物距一定跟着改变
  6. -
-
    -
  • 薄透镜公式(Gauss's Ray Tracing Construction/Gaussian Thin Lens Equation)
  • -
-

如下图,左侧物体会经过透镜成像到右侧去,可定义一些参数

-

定义物距(物体到透镜的垂直距离):$Z_o$

-

定义像距(成的像到透镜的垂直距离):$Z_i$

-

透镜的焦距f

-

$$\frac{1}{f} = \frac{1}{z_i}+\frac{1}{z_o}$$

-

推导过程

-

平行光必定过焦点,过焦点的光会变成平行光

-

-

忽略中间过透镜中心的光

-

-

可见如下图的几何关系,左侧在光到达透镜前可形成两个相似三角形,右侧也相同

-

-

将两组关系做运算

-

-

散焦模糊(Defocus Blur)(景深)

-

弥散圆(Circle of Confusion)

-

出于解释模糊,我们引入CoC的概念

-

如图左边远处有一个平面(Focal Plane),所有的光经过透镜后都会被聚焦到右边一个平面上(Image)

-
    -
  • 如果物体不在Focal Plane上会出现模糊
  • -
-

-
    -
  • 模糊原因
  • -
-

任何地方有一个点,它穿过透镜后,可以根据上面透镜的公式算出像距,但是如果成像平面不在这个地方,而是离得有一段距离,光线就会在原本成像的地方之后继续传播,那被感光元件接收到的时候就不再是一个点了,而是变成了一个圆(CoC)

-
    -
  • CoC大小计算
  • -
-

与Aperture的大小相关

-

CoC的直径/Aperture的直径 = $d'/Z_i$

-

$$\frac{C}{A} = \frac{d'}{z_i} = \frac{|z_s - z_i|}{z_i}$$

-

可见CoC的大小和透镜本身的大小成正比

-
    -
  • 物体是否模糊取决于光圈的大小
  • -
-

下图光圈f数为1.4,为大光圈,可以看到更模糊的效果

-

-

光圈大小

-

之前的光圈定义实际不准确,F数拥有明确定义

-
    -
  • F数定义
  • -
-

焦距/光圈直径

-

$$N = f/A$$

-
    -
  • 常见F数
  • -
-

1.4,2,2.8,4.0,5.6,8,11,16,22,32

-
    -
  • 写法
  • -
-

常写为f/数字

-
    -
  • 例子
  • -
-

-
    -
  • CoC的大小和F数成反比
  • -
-

-

$$C = A\frac{|z_s - z_i|}{z_i} = \frac{f}{N}\frac{|z_s - z_i|}{z_i}$$

-

光线追踪理想的薄透镜(Ray Tracing Ideal Thin Lenses)

-

之前Ray Tracing和Path Tracing都是从相机往任何一个像素中心连线,默认是小孔成像的针孔摄像机的模型

-

但是我们可以模拟薄透镜,给它一个焦距,可以将Sensor放置到离镜头有多远,然后实际去做光线追踪

-
    -
  • 实例
  • -
-

-

具体实现

-
    -
  • 定义场景
  • -
-

确定sensor大小,定义透镜焦距,光圈大小

-

定义透镜和某个平面的距离$Z_o$

-

根据物距$Z_o$和焦距,可计算像距$Z_i$

-

-
    -
  • 使用光线追踪算法渲染
  • -
-

找一些光线能够穿过透镜,打到场景中

-

在成像平面(感光元件,胶片)上选一些点X'

-

在透镜上另选X",两点连线便可知道其方向,且感光元件上的X'处会记录这条线上的Radiance

-

-
    -
  • 景深(Depth of Field)
  • -
-

如下两图,一个用大光圈,一个用小光圈

-

过大的光圈对应大的CoC,一个点会变成更大的圆,所以就会更模糊,但总归在一些地方是不模糊的,即不同光圈大小会影响模糊范围

-

-

如下图中,一个光经透镜会打到一个成像平面,该成像平面附近区域都认为CoC足够小

-

-

景深:实际场景中有一段深度,该深度经透镜后会在成像平面附近形成一段区域,区域内认为CoC是足够小的

-

因此计算景深就是计算CoC在这个很小的一段范围内,认为对应场景是清晰的

-

可简单认为成像平面中的许多像素不是一个点,存在各自的大小,CoC的大小和像素大小差不多或比像素小,都可认为结果是锐利的

-

计算DOF

-

如下图,考虑景深的最远和最近处,分别让它们穿过透镜,到某一地方可以得到右边的范围

-

-

DOF参数效果

-

-
    -
  • 修改焦距
  • -
-

焦距越大,DOF越浅,只有焦点上的成像是清晰的,焦点之前的清晰范围叫前景深,之后的叫后景深

-
    -
  • 改变F数
  • -
-

光圈越小,景深越大,光圈越小意味着越接近小孔,DOF清晰的范围越大

-
    -
  • 调CoC
  • -
-

更大的CoC对应的景深就更深

-

F-stop可简单理解为光圈大小又是透镜大小,本质是遮挡透镜,动态改变透镜大小

- -
- - - - -
- - - - -
- - -updatedupdated2023-06-182023-06-18 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/computergraphic/纹理/index.html b/public/computergraphic/纹理/index.html deleted file mode 100644 index e235702..0000000 --- a/public/computergraphic/纹理/index.html +++ /dev/null @@ -1,763 +0,0 @@ - - - - - - - - - - - - - - - - - - 纹理 | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

纹理

- - - - - - - - - -
-

重心坐标

-
重心坐标定义
-

-

对于一个三角形的三点坐标A,B,C,平面内的一点(x,y)可以写成三点的线性组合式

-

$$(x,y)=\alpha A + \beta B + \gamma C = \alpha + \beta + \gamma = 1$$

-

此时三个顶点的权重($\alpha , \beta , \gamma$)为(x,y)的重心坐标

-

注意:如果三个坐标值都为非负,则这个重心位于三角形内部

-
三角形的几何角度下求解
-

-

将点与三个顶点相连,三个三角形的面积分别为$A_A,A_B,A_C$对应的重心坐标的计算式,

-

$$\alpha = \frac{A_A}{A_A+A_B+A_C}$$

-

$$\beta = \frac{A_B}{A_A+A_B+A_C}$$

-

$$\gamma = \frac{A_C}{A_A+A_B+A_C}$$

-

在已知四点坐标的情况下则可通过行列式的几何意义求解(任意两个二维向量组合成矩阵的行列式的绝对值为这两条向量所围成平行四边形的面积)

-

设任意一点为P(x,y)则

-

$$A_B = \lvert AP,AC \rvert $$ -$$A_C = \lvert AB,AP \rvert $$ -$$A_A = \lvert BC,BP \rvert $$

-

可得出 -$$\gamma = \frac{(y_a - y_b) + (x_b - x_a)y + x_a y_b - x_b y_a }{(y_a - y_b)x_c + (x_b - x_a)y_c + x_a y_b - x_b y_a}$$

-

$$\beta = \frac{(y_a - y_c)x + (x_c - x_a)y + x_a y_c - x_c y_a}{(y_a - y_c)x_b + (x_c - x_a)y_b + x_a y_c - x_c y_a}$$

-

$$\alpha = 1 - \beta - \gamma$$

-
三角形的坐标系角度下求解
-

对于重心坐标系存在另一种等价视角:

-

以A点为原点,AB,AC分别为新的坐标系的单位向量构建坐标系,如图

-

-

给定的任意点P的坐标可表示为$P(\beta , \gamma)$ ,可推出P点坐标满足以下关系

-

$$p = a + \beta(b - a) + \gamma(c - a)$$

-

化简后得

-

$$p = (1 - \beta - \gamma )a + \beta b + \gamma c $$

-

表现为一个线性方程组如下

-

$$ -\begin{bmatrix} -x_b - x_a & x_c - x_a -\\ -y_b - y_a & y_c - y_a -\end{bmatrix} -\begin{bmatrix} -\beta -\\ -\gamma -\end{bmatrix}= -\begin{bmatrix} -x_p - x_a -\\ -y_p - y_a -\end{bmatrix} -$$

-
重心坐标的用处
-

对顶点处的值进行线性插值,如下图

-

-

$$V = \alpha V_A + \beta V_B + \gamma V_C$$

-

$V_A,V_B,V_C$ 可以对应为:

-
    -
  1. 位置
  2. -
  3. 纹理坐标
  4. -
  5. 颜色
  6. -
  7. 法线
  8. -
  9. 深度
  10. -
  11. 材质属性
  12. -
-
插值部分代码实现
-
-
-
-
 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-
-
//三维向量插值
-static Eigen::Vector3f interpolate(float alpha, float beta, float gamma, const Eigen::Vector3f& vert1, const Eigen::Vector3f& vert2, const Eigen::Vector3f& vert3, float weight)
-{
-    return (alpha * vert1 + beta * vert2 + gamma * vert3) / weight;
-}
-
-// 二维向量插值
-static Eigen::Vector2f interpolate(float alpha, float beta, float gamma, const Eigen::Vector2f& vert1, const Eigen::Vector2f& vert2, const Eigen::Vector2f& vert3, float weight)
-{
-    auto u = (alpha * vert1[0] + beta * vert2[0] + gamma * vert3[0]);
-    auto v = (alpha * vert1[1] + beta * vert2[1] + gamma * vert3[1]);
-
-    u /= weight;
-    v /= weight;
-
-    return Eigen::Vector2f(u, v);
-}
-//计算重心
-static std::tuple<float, float, float> computeBarycentric2D(float x, float y, const Vector4f* v){
-    float c1 = (x*(v[1].y() - v[2].y()) + (v[2].x() - v[1].x())*y + v[1].x()*v[2].y() - v[2].x()*v[1].y()) / (v[0].x()*(v[1].y() - v[2].y()) + (v[2].x() - v[1].x())*v[0].y() + v[1].x()*v[2].y() - v[2].x()*v[1].y());
-    float c2 = (x*(v[2].y() - v[0].y()) + (v[0].x() - v[2].x())*y + v[2].x()*v[0].y() - v[0].x()*v[2].y()) / (v[1].x()*(v[2].y() - v[0].y()) + (v[0].x() - v[2].x())*v[1].y() + v[2].x()*v[0].y() - v[0].x()*v[2].y());
-    float c3 = (x*(v[0].y() - v[1].y()) + (v[1].x() - v[0].x())*y + v[0].x()*v[1].y() - v[1].x()*v[0].y()) / (v[2].x()*(v[0].y() - v[1].y()) + (v[1].x() - v[0].x())*v[2].y() + v[0].x()*v[1].y() - v[1].x()*v[0].y());
-    return {c1,c2,c3};
-}
-
-//光栅化时,判断深度之后进行插值计算得出对应的数值
-
-// auto interpolated_color(颜色)
-auto interpolated_color=interpolate(alpha,beta,gamma,t.color[0],t.color[1],t.color[2],1);
-// auto interpolated_normal(法线)
-auto interpolated_normal = interpolate(alpha,beta,gamma,t.normal[0],t.normal[1],t.normal[2],1).normalized();
-// auto interpolated_texcoords(纹理坐标)
-auto interpolated_texcoords = interpolate(alpha,beta,gamma,t.tex_coords[0],t.tex_coords[1],t.tex_coords[2],1);
-// auto interpolated_shadingcoords(着色坐标)
-auto interpolated_shadingcoords = interpolate(alpha,beta,gamma,view_pos[0],view_pos[1],view_pos[2],1);
-
-
-

纹理映射处理

-
简单的纹理映射 : 漫反射颜色
-

伪代码 :

-
for each rasterized screen sample (x,y):
-    (u,v) = evaluate texture coordinate at (x,y)
-    texcolor = texture.sample(u,v);
-    set sample's color to texcolor
-

sample(x,y) : 通常为像素的重心

-

texture coordinate at (x,y):使用重心坐标值

-

sample's color : 通常为漫反射率值 kd

-
纹理放大处理(简单方式)
-

前置知识:

-
    -
  1. 通常不需要进行纹理放大操作,这会导致纹理分辨率不足
  2. -
  3. 纹理的一个像素通常被称为纹理元素或纹素(texel)
  4. -
-

假设我们需要在红点处纹理采样的值f(x,y),黑点为对应的纹理采样点

-

此时我们会选取红点位置周围的四个采样点,同时计算其与周围四个采样点的偏移值(s,t)如下图

-

-

可得相应的计算过程:

-
    -
  1. -

    定义线性插值 -$$lerp(x,v_0,v_1) = v_0 + x(v_1 - v_0)$$

    -
  2. -
  3. -

    计算两个辅助值 -$$u_0 = lerp(s,u_{00},u_{10})$$ -$$u_1 = lerp(s,u_{01},u_{11})$$

    -
  4. -
  5. -

    计算顶点插值得出结果 -$$f(x,y) = lerp(t,u_0,u_1)$$

    -
  6. -
-

采用线性插值的方式进行纹理放大的计算往往能够获得很好的结果和平衡的性能消耗

-
纹理放大至过大的情况
-

此时在点采样下会产生摩尔纹和锯齿,如下图

-

-

通常处理是进行超采样,同时也会有几个问题

-
    -
  1. 超采样能产生质量足够高的结果,带来的性能开销也很高
  2. -
  3. 当纹理极度缩小时,许多纹素会被压缩在内存(texel footprint)里
  4. -
  5. 单一像素中的信号序列过大
  6. -
  7. 需要更高的采样频率
  8. -
-

所以我们更倾向于使用范围序列而非点序列

-

-
Mipmap(支持 Range Query)
-

mipmap 可由下图表示

-

-

对应产生的mip层次结构也由下图表示

-

-

在计算对应层次的mipmap时,我们需要相邻采样点的纹理坐标来估计纹理内存

-

-

如上图所示,我们能够得到两个值

-

$$L = \max \left( \sqrt{(\frac{d_u}{d_X})^2 + (\frac{d_v}{d_X})^2},\sqrt{(\frac{d_u}{d_y})^2 + (\frac{d_v}{d_y})^2} \right) $$

-

$$D = \log_2 L$$

-

在使用时往往D值会四舍五入为整数,这会导致纹理的不连续,因此,我们还需要进行下图所示的Trilinear Interpolation 从而得到一个连续的D值

-

-

在插值处理后的纹理依旧会存在过度模糊(overblur)的现象,但相比于超采样的高性能开销依旧有很大的提升

-
Anisotropic Filtering and EWA filtering
-

Anisotropic Filtering

-
    -
  1. 可以查找轴对齐的矩形区域纹理
  2. -
  3. 对角线纹理处理依旧存在问题
  4. -
-

-

EWA filtering

-
    -
  1. 权重均衡
  2. -
  3. 采用mipmap层次结构
  4. -
  5. 可以处理纹理中的不规则像素(irregular footprints)
  6. -
-

Irregular Pixel Footprint in Texture的产生情况如下图

-

-

纹理的应用

-
纹理的用途
-

在现代GPU中,纹理贴图 = 内存数据 + 范围序列(reang query)即反走样

-

常用的方式是向片元计算中提供相应的数据

-

应用的地方:

-
    -
  1. 环境光
  2. -
  3. 存储微表面
  4. -
  5. 程序化纹理生成
  6. -
  7. 实体建模
  8. -
  9. 立体渲染(体绘制)
  10. -
-
环境光贴图和立方体贴图(Environment and Cube Map)
-

环境光贴图通常指在贴图上绘制模型周围环境光效,实现某些模型反射环境光的效果

-

-

也用于一些镜面反射的物体实现真实光照

-

-

-

在一些球型表面贴图会存在形变问题,如下图的顶部和底部

-

-

立方体贴图则由球体上一个向量沿自身方向映射到立方体上的点获得

-

-

一个立方体使用6个方形纹理贴图来生成纹理

-
Bump Mapping
-

在不提高模型面数的情况下展示表面细节

-
    -
  1. 对表面的每一条法线进行扰动(仅用于着色计算)
  2. -
  3. 高度偏移纹理定义的每个纹素
  4. -
-

扰动法线的计算(平面)

-
    -
  1. 假设原平面法线为$$n(p) = (0,1)$$
  2. -
  3. $ p $点处的导数为 $$dp = c * [h(p + 1) - h(p)]$$
  4. -
  5. 扰动后的法线值为$$n(p) = (-dp,1).normalized()$$
  6. -
-

-

扰动法线的计算(3D)

-
    -
  1. 假设原平面法线为$$n(p) = (0,0,1)$$
  2. -
  3. $p$点处的导数为 -$$\frac{d_p}{d_u} = c_1 * [h(u + 1) - h(u)]$$ -$$\frac{d_p}{d_v} = c_2 * [h(v + 1) - h(v)]$$
  4. -
  5. 扰动后的法线为$$n = (\frac{-d_p}{d_u},\frac{-d_p}{d_v},1).normalized()$$
  6. -
  7. 坐标计算基于本地坐标系
  8. -
-

部份代码实现

-
-
-
-
 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-
-
    float x = normal.x();
-    float y = normal.y();
-    float z = normal.z();
-    Eigen::Vector3f t = Eigen::Vector3f(x*y/sqrt(x*x+z*z),sqrt(x*x+z*z),z*y/sqrt(x*x+z*z));
-    Eigen::Vector3f b = normal.cross(t);
-    Eigen::Matrix3f TBN;
-    TBN <<
-    t.x(),b.y(),normal.x(),
-    t.y(),b.x(),normal.y(),
-    t.z(),b.z(),normal.z();
-
-    float u = payload.tex_coords.x();
-    float v = payload.tex_coords.y();
-    float w = payload.texture->width;
-    float h = payload.texture->height;
-
-    float dU=kh * kn * (payload.texture->getColor(u+1.0f/w,v).norm()-payload.texture->getColor(u,v).norm());
-    float dV=kh * kn * (payload.texture->getColor(u,v+1.0f/h).norm()-payload.texture->getColor(u,v).norm());
-
-    Eigen::Vector3f ln = Eigen::Vector3f(-dU,-dV,1.0f);
-    normal=TBN *ln;
-
-    // Let n = normal = (x, y, z)
-    // Vector t = (x*y/sqrt(x*x+z*z),sqrt(x*x+z*z),z*y/sqrt(x*x+z*z))
-    // Vector b = n cross product t
-    // Matrix TBN = [t b n]
-    // dU = kh * kn * (h(u+1/w,v)-h(u,v))
-    // dV = kh * kn * (h(u,v+1/h)-h(u,v))
-    // Vector ln = (-dU, -dV, 1)
-    // Normal n = normalize(TBN * ln)
-
-
-    Eigen::Vector3f result_color = {0, 0, 0};
-    result_color = normal;
-
-
-
纹理贴图能够影响着色效果
-

Displacement mapping

-
    -
  1. 是Bump mapping的更进一步
  2. -
  3. 与Bump mapping 使用相同纹理贴图
  4. -
  5. 会改变模型顶点坐标
  6. -
-

-

3D程序化噪声和实体建模

-

-

将部分着色效果提前绘制到贴图上

-

-

3D图像纹理和体绘制

-

- -
- - - - -
- - - - -
- - -updatedupdated2023-06-182023-06-18 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/computergraphic/纹理映射/index.html b/public/computergraphic/纹理映射/index.html deleted file mode 100644 index 4dd4456..0000000 --- a/public/computergraphic/纹理映射/index.html +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - - - - - - - - - - - - - 纹理映射 | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

纹理映射

- - - - - - - - - -
-

重心坐标

-
重心坐标定义
-

-

对于一个三角形的三点坐标A,B,C,平面内的一点(x,y)可以写成三点的线性组合式

-

$$(x,y)=\alpha A + \beta B + \gamma C = \alpha + \beta + \gamma = 1$$

-

此时三个顶点的权重($\alpha , \beta , \gamma$)为(x,y)的重心坐标

-

注意:如果三个坐标值都为非负,则这个重心位于三角形内部

-
三角形的几何角度下求解
-

-

将点与三个顶点相连,三个三角形的面积分别为$A_A,A_B,A_C$对应的重心坐标的计算式,

-

$$\alpha = \frac{A_A}{A_A+A_B+A_C}$$

-

$$\beta = \frac{A_B}{A_A+A_B+A_C}$$

-

$$\gamma = \frac{A_C}{A_A+A_B+A_C}$$

-

在已知四点坐标的情况下则可通过行列式的几何意义求解(任意两个二维向量组合成矩阵的行列式的绝对值为这两条向量所围成平行四边形的面积)

-

设任意一点为P(x,y)则

-

$$A_B = \lvert AP,AC \rvert $$ -$$A_C = \lvert AB,AP \rvert $$ -$$A_A = \lvert BC,BP \rvert $$

-

可得出 -$$\gamma = \frac{(y_a - y_b) + (x_b - x_a)y + x_a y_b - x_b y_a }{(y_a - y_b)x_c + (x_b - x_a)y_c + x_a y_b - x_b y_a}$$

-

$$\beta = \frac{(y_a - y_c)x + (x_c - x_a)y + x_a y_c - x_c y_a}{(y_a - y_c)x_b + (x_c - x_a)y_b + x_a y_c - x_c y_a}$$

-

$$\alpha = 1 - \beta - \gamma$$

-
三角形的坐标系角度下求解
-

对于重心坐标系存在另一种等价视角:

-

以A点为原点,AB,AC分别为新的坐标系的单位向量构建坐标系,如图

-

-

给定的任意点P的坐标可表示为$P(\beta , \gamma)$ ,可推出P点坐标满足以下关系

-

$$p = a + \beta(b - a) + \gamma(c - a)$$

-

化简后得

-

$$p = (1 - \beta - \gamma )a + \beta b + \gamma c $$

-

表现为一个线性方程组如下

-

$$ -\begin{bmatrix} -x_b - x_a & x_c - x_a -\\ -y_b - y_a & y_c - y_a -\end{bmatrix} -\begin{bmatrix} -\beta -\\ -\gamma -\end{bmatrix}= -\begin{bmatrix} -x_p - x_a -\\ -y_p - y_a -\end{bmatrix} -$$

-
重心坐标的用处
-

对顶点处的值进行线性插值,如下图

-

-

$$V = \alpha V_A + \beta V_B + \gamma V_C$$

-

$V_A,V_B,V_C$ 可以对应为:

-
    -
  1. 位置
  2. -
  3. 纹理坐标
  4. -
  5. 颜色
  6. -
  7. 法线
  8. -
  9. 深度
  10. -
  11. 材质属性
  12. -
-
插值部分代码实现
-
-
-
-
 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-
-
//三维向量插值
-static Eigen::Vector3f interpolate(float alpha, float beta, float gamma, const Eigen::Vector3f& vert1, const Eigen::Vector3f& vert2, const Eigen::Vector3f& vert3, float weight)
-{
-    return (alpha * vert1 + beta * vert2 + gamma * vert3) / weight;
-}
-
-// 二维向量插值
-static Eigen::Vector2f interpolate(float alpha, float beta, float gamma, const Eigen::Vector2f& vert1, const Eigen::Vector2f& vert2, const Eigen::Vector2f& vert3, float weight)
-{
-    auto u = (alpha * vert1[0] + beta * vert2[0] + gamma * vert3[0]);
-    auto v = (alpha * vert1[1] + beta * vert2[1] + gamma * vert3[1]);
-
-    u /= weight;
-    v /= weight;
-
-    return Eigen::Vector2f(u, v);
-}
-//计算重心
-static std::tuple<float, float, float> computeBarycentric2D(float x, float y, const Vector4f* v){
-    float c1 = (x*(v[1].y() - v[2].y()) + (v[2].x() - v[1].x())*y + v[1].x()*v[2].y() - v[2].x()*v[1].y()) / (v[0].x()*(v[1].y() - v[2].y()) + (v[2].x() - v[1].x())*v[0].y() + v[1].x()*v[2].y() - v[2].x()*v[1].y());
-    float c2 = (x*(v[2].y() - v[0].y()) + (v[0].x() - v[2].x())*y + v[2].x()*v[0].y() - v[0].x()*v[2].y()) / (v[1].x()*(v[2].y() - v[0].y()) + (v[0].x() - v[2].x())*v[1].y() + v[2].x()*v[0].y() - v[0].x()*v[2].y());
-    float c3 = (x*(v[0].y() - v[1].y()) + (v[1].x() - v[0].x())*y + v[0].x()*v[1].y() - v[1].x()*v[0].y()) / (v[2].x()*(v[0].y() - v[1].y()) + (v[1].x() - v[0].x())*v[2].y() + v[0].x()*v[1].y() - v[1].x()*v[0].y());
-    return {c1,c2,c3};
-}
-
-//光栅化时,判断深度之后进行插值计算得出对应的数值
-
-// auto interpolated_color(颜色)
-auto interpolated_color=interpolate(alpha,beta,gamma,t.color[0],t.color[1],t.color[2],1);
-// auto interpolated_normal(法线)
-auto interpolated_normal = interpolate(alpha,beta,gamma,t.normal[0],t.normal[1],t.normal[2],1).normalized();
-// auto interpolated_texcoords(纹理坐标)
-auto interpolated_texcoords = interpolate(alpha,beta,gamma,t.tex_coords[0],t.tex_coords[1],t.tex_coords[2],1);
-// auto interpolated_shadingcoords(着色坐标)
-auto interpolated_shadingcoords = interpolate(alpha,beta,gamma,view_pos[0],view_pos[1],view_pos[2],1);
-
-
-
-
- - - - - - - - - -
- - - - -
- - -updatedupdated2022-07-112022-07-11 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/computergraphic/走样与反走样/index.html b/public/computergraphic/走样与反走样/index.html deleted file mode 100644 index 808217f..0000000 --- a/public/computergraphic/走样与反走样/index.html +++ /dev/null @@ -1,504 +0,0 @@ - - - - - - - - - - - - - - - - - - 走样与反走样 | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

走样与反走样

- - - - - - - - - -
-

走样

-

从像素角度

-

屏幕是由一个个像素组成,在光栅化时,只有中心被三角形覆盖的像素会被着色,而且被覆盖的像素点的分布往往是离散的,自然而然地形成如下图斜线形成的阶梯状的锯齿

-

-
-

从信号角度

-
采样和滤波理论(Sampling and Filtering Theory)
-
采样(sample)
-

采样就是将连续信号转换成离散信号(采样信号),经过滤波后会被恢复成重建信号

-

-

如果采样的频率过低,则会发生走样或混叠(aliasing),如图中,蓝色的为原信号,红色为采样点,绿色虚线为重建后的信号

-

过低的采样频率会使重建的信号成为低频信号 -

-

若采样频率恰好是原信号的两倍,重建信号则表现为一条直线 -

-

采样理论(sampling theorem):采样频率必须为原信号频率的两倍以上,才能完整地重建原始信号,存在一个最大频率,因而采样频率有频带限制 -
奎斯特率(Nyquist rate): 频率为原信号频率两倍的采样频率

-
重建(reconstruction)
-

重建时需要采样信号进行滤波,通常使用下图中的三种滤波器(box filter,tent filter,sinc filter),且滤波器的面积必须为1以确保恢复的信号不会被放大或缩小

-

-

box filter 对信号进行滤波并重建信号的过程如下图 -
直接将采样点位置替换为box filter波形的方式会因 box filter 本身的不连续使重建信号产生不平滑的现象
-但仍然因其易于实现的特性被用于重建

-

-
-

tent filter 在滤波时会对每个相邻的采样点之间使用线性插值,一次重建的信号更加平滑,但采样点位置会发生斜率突变,所以tent filter 并不完美

-

-
-

出于让重建信号保持平滑的目的,我们必须使用一个理想低通滤波器

-

基于傅立叶变换理论的解释:理想低通滤波器在频域中的表现类似于box filter,在频域中相乘时会过滤掉所有超过这个滤波器宽度的频率,在频域的box fliter 转换到空域的时候会是一个sinc filter ,在频域相乘也等价于在空域中进行卷积,卷积即为滤波 -

-

例如sinc filter就能够实现过滤高频信号,保留低频信号的理想低通滤波器效果

-

-

对于sinc filter 在假设采样频率为$f_s$,采样点间隔为$\frac{1}{f_S}$的情况下,它会过滤掉超过$\frac{f_S}{2}$的所有高频信息,因此,sinc filter 在采样频率为1.0会是一个理想低通滤波器,此时采样信号的最大频率应当小于$\frac{1}{2}$,但是由于sinc filter 有无限的滤波范围,所以它会在某些范围内出现负值

-

尽管负值的出现不常见,但在实践时我们更倾向于使用无负值的lobes(常见的有高斯滤波器(Gaussian filter)),并且使用重采样(resample)的方式对重建信号进行放大或者缩小

-

注:如果对于卷积为主的各类滤波感到不解可见【官方双语】那么……什么是卷积?

-
-

重采样

-

设采样信号灯的采样间隔为整数列,间隔为1,则我们可以通过重采样来将采样点间隔变为a,当$a>1$时会缩小信号(downsampling),$a<1$时会放大信号(upsampling)

-

如图,对重建信号使用双倍采样率进行重采样便实现了信号放大 -

-

这种方法不适用于信号缩小,易使信号过于高频

-

对于信号缩小的情况,我们需要先对1间隔采样信号使用$sinc(\frac{x}{2})$ filter 滤波产生一个连续信号,再重采样2间隔,由于频谱范围更大的低通滤波器才能过滤更多的高频信号,类似于对图像进行第一次模糊再重采样产生一个低分辨率图像

-

-

由下图可见,滤波可以对三角形的边缘产生模糊,进而产生一定的反走样效果 - -

-

反走样

-

现代反走样技术

-
Screen-Based Antialiasing
-

对于我们之前提到的采样,我们只对像素正方形的中心进行是否在三角形内部的判断,这意味着对于边缘的像素正方形,无论覆盖面积有多大,只要不包含中心点都会被判定在三角形外,从而不被渲染,当采样率提升,如下图的4spp(sample per pixel)以某种方式混合计算获得更好的像素效果

-

-

Screen-Based Antialiasing 通常在屏幕空间区域使用采样图案来采样从而对颜色进行如下的加权计算

-

对整个像素内颜色的平均计算遵循: -$$p(x,y)=\sum_{i=1}^nw_ic(i,x,y)$$ -$n:$每个像素内采样点的数量

-

$c(i,x,y):$ 计算采样位置在屏幕坐标系上的坐标$(x,y)$并填充颜色,也可以视为两个方程,$f(i,n)$定位屏幕上需要采样的位置$(x_f,y_f)$,第二个方程计算填充的颜色

-

$w_i:$每个采样点所占的权重,通常为uniform形式,由外界输入

-
Supersamping Antialiasing (SSAA) 超采样抗锯齿
-

在每一个像素里计算多个采样的算法往往被称为超采样(supersample)或过采样(oversample)

-

SSAA又被称为全屏幕抗锯齿(full-screen antialiasing,FSAA),也叫超采样抗锯齿(supersampling antialiasing,SSAA)

-

主要在于渲染比目标分辨率大的图像后,过滤邻近的像素点来采样至目标分辨率

-

例如:

-

当目标图像分辨率为1280$\times$1024时,渲染2560$\times$2048的图像后进行2$\times$2像素的采样,得到目标图像

-

劣势:

-

性能开销大,每次都需要对子样本进行完整的包含深度测试的采样,当然也可以减少采样点($2\times1或1\times2$)来减少部分开销

-

与超采样相关的累计缓存(accumulation buffer)也可以起到减少开销的作用,主要在于使用一个与生成图像分辨率相同的buffer,但每个通道中有更多的颜色bit

-

例如在采样的像素为$2\times2$的情况下,会生成4张图像且每张图都会在X或Y轴上偏移半个像素的距离使得输出像素的采样点正好对应图像的像素点中心

-

优势:

-

实现方式简单,只需要一个高分辨率图像和box filter就可以实现

-

下图是采样点在像素点内位置类型 -

-

案例:NAVIDIA's DSR(dynamic super resolution)

-

渲染4k的图像利用13个采样点的高斯滤波采样回1080p提升画面细节

-
-
MSAA(Multisampling antialiasing)
-

MSAA同样在一个像素中设置多个采样点,在光栅化时计算三角形在像素内对采样点的覆盖率,之后只计算每个片元的像素着色器,采样中心点的位置计算颜色信息再乘上覆盖率,最后输出这个像素的颜色

-

颜色计算与深度判断 -

-

总体流程如下 - -

-

与SSAA不同的是,MSAA只对每个像素计算一次采样,而非对整个图像进行渲染,但计算量依旧倍增

-
-
CSAA(coverage sampling antialiasing) and EQAA(enhanced quality antialiasing)
-

两者前后分别在2006年由NVIDIA和AMD先后提出

-

两种技术都通过提前存储片元的平均效果来提高采样率

-

例如,EQAA在2f4x模式下,会对每四个采样点计算并通过表的形式存储颜色和深度值(如下图),这使得四个采样点只需1bit空间就可以确认像素位置的着色颜色值

-

- -
- - - - -
- - - - -
- - -updatedupdated2023-06-182023-06-18 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/computergraphic/路径追踪/index.html b/public/computergraphic/路径追踪/index.html deleted file mode 100644 index c0f0b8c..0000000 --- a/public/computergraphic/路径追踪/index.html +++ /dev/null @@ -1,764 +0,0 @@ - - - - - - - - - - - - - - - - - - 路径追踪 | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

路径追踪

- - - - - - - - - -
-

概率论基础复习

-

在路径追踪的计算中需要引入部分概率论内容,在此进行部分复习

-

随机变量

-
    -
  • -

    随机变量:一个值,表示某些事件发生

    -
  • -
  • -

    $x \backsim p(x)$ :随机变量的分布,随机变量取到某个值的可能性

    -
  • -
-

例如:对于一个骰子,共有6个面,每个面在上面的概率相等,都为1/6

-

概率

-
    -
  • 概率必定为非负
  • -
  • 所有事件的发生概率和为1
  • -
-

$$p_i \geq 0$$

-

$$\sum_{i = 1}^n p_i = 1$$

-

例如:对于上述的骰子,概率为$p_i = \frac{1}{6}$

-

随机变量的期望

-

如图,对于这四个可供选择的长方形,每一个选择有一个值为$X_i$,每一个选择都对应一个概率为$p_i$,那么期望则为将所有值乘以其对应的概率后累加得到的数值

-

-

可见上图的期望值为

-

$$E[X] = \sum_{i = 1} ^ n x_ip_i$$

-

例如:一个骰子可以取值1、2、3、4、5、6,每一个取值的概率都是1/6,期望为

-

$$E[X] = \sum_{i=1}^n \frac{i}{6} = (1+2+3+4+5+6)/6 = 3.5$$

-

概率密度函数

-

随机变量的取值可以是一些固定的值(离散型),也可以是下图所示一些连续的值(连续型)

-

-

某一位置的概率为其周围一小段微元与曲线相连线形成的梯形面积

-

上面这条曲线P(x)即为概率密度函数(简称PDF)

-

概率密度在所有值上的积分等于1,与概率和为1类似

-

期望的计算则是用任意一个取值乘以概率密度,并加以积分

-

对于满足下列条件的P(x) -$$p(x) \geq 0 \ \ and \int p(x)dx = 1$$

-

期望值为

-

$$E[X] = \int x P(x)dx$$

-

当一个函数本身是随机变量时:

-

例如一个随机变量满足一定的PDF -$$X \backsim p(x)$$

-

另外一个函数为

-

$$Y = f(X)$$

-

此时Y的期望为

-

$$E[Y] = E[f(X)] = \int f(x)p(x)dx$$

-
-

蒙特卡洛积分(Monte Carlo Integration)

-

使用理由

-

计算给定函数的定积分时,如果$f(x) = x^2$,就可以计算出不定积分为$\frac{1}{3}X^3 + 常数$,之后利用不定积分即可求出它在a和b的值,两者相减即得积分

-

若函数较为复杂,如下图所示,不便于使用解析方法,就要使用数值的方法计算(蒙特卡洛积分)

-

-

大致流程

-

黎曼积分:

-

将上图a和b之间均匀拆分为100份,取每一份的中间位置,找到对应的Y(即将整个曲线下方面积分解为各个小长方形面积之和)

-

蒙特卡洛积分:

-
    -
  • 在a和b之间随便取一个数,找到这个数对应的f(x)
  • -
  • 假设整个曲线为一个长方形,长方形高度为刚才去的值的对应位置高度,长方形宽度视为a到b的长度,利用长方形面积近似曲线下围面积
  • -
  • 将第二步重复多次,在a到b区间采样多次,将得到的长方形面积平均求值,就可以得到相对准确的结果
  • -
-

定义

-

定积分f(x),即从a到b的值:

-

$$\int_a^b f(x)dx$$

-

x的积分域在ab区间,对概率密度函数随机采样一个变量,得到Xi

-

$$随机变量 \ \ \ X_i \backsim p(x)$$

-

蒙特卡洛积分可近似为下列式子,即$f(Xi)/p(xi)$的平均

-

$$F_N = \frac{1}{N} \sum_{i = 1}^N {\frac{f(X_i)}{p(X_i)}}$$

-

特殊情况

-
    -
  • 在a到b之间均匀采样时,我们使用的概率密度函数(PDF)在各处的值相等,即为一个常数,又已知PDF在积分域上的积分值为1,此PDF可解出值为$\frac{1}{(b-a)}$
  • -
-

-
    -
  • 采用蒙特卡洛积分计算时,需要知道f(Xi)和p(Xi),随机采样得到的值为Xi,蒙特卡洛积分只需计算f(Xi)除以p(Xi)的平均值,p(Xi)的值始终为$\frac{1}{(b-a)}$
  • -
-

$$F_N = \frac{b-a}{N}\sum_{i=1}^Nf(X_i)$$

-

总结

-

蒙特卡洛积分:

-

只需积分域内使用一个PDF采样,得到该样本的f(Xi)和概率密度P(Xi)的值,两者相除后取平均值

-

注意:

-
    -
  1. N越大(采样次数越多),得到的结果越精准
  2. -
  3. 积分域是定义在X上的积分,所以采样目标一定是X
  4. -
-

路径追踪(path tracing)

-

Whitted-Style Ray Tracing 存在的问题

-
    -
  • Whitted-style Ray Tracing 对Specular(镜面)材质的表现效果是正确的,而glossy(磨砂)材质的效果则表现不正确
  • -
-

Specular材质:光线在物体表面能发生镜面反射则称为此材质,光线在打在表面时,会沿着镜面反射方向离去,也是镜面能够映出周围环境光的原因

-

Glossy材质:有镜面反射的样子,但又有些许模糊,类似毛玻璃效果,有一定粗糙度但能产生高光

-

-
    -
  • whitted-style ray tracing 在遇到漫反射时会停止光线弹射直接做相应的shading
  • -
-

这种情况会忽视漫反射物体和漫反射物体之间的光线都不被渲染,也不符合漫反射将光线均匀地反射到各个不同方向上的物理定义

-

两个示例中左侧为直接光照,右侧为全局光照,都采用路径追踪的方式计算得到

-

-

可见在场景中只有上面一个光源的情况下,在直接光照里,天花板为黑色,但实际上光线会发生多次弹射,天花板应是亮的,右侧才是我们想要的效果

-

Color bleeding: 左侧全局光照图中高立方体左侧是红,光线在弹射到墙面后再反射到这个面,之后到达摄像头(眼睛),z这种现象就为Color bleeding

-

Cornell box真实存在,3D模型也是存在的,广泛用于测试各种全局光照效果

-
-

两中表现效果错误来自于Whitted-style ray tracing的光线弹射计算

-
    -
  1. 光线打到specular的物体上,会沿着镜面方向反射或沿着折射方向折射
  2. -
  3. 光线打到diffuse(漫反射)的物体上,这条光线就停止了
  4. -
-

虽然存在错误,但完全按照物理量推算的渲染方程是完全正确的,为了正确计算,我们要解出这个渲染方程

-

$$L_o(p,w_o) = L_e(p,w_o) + \int_{\Omega+} {L_i(p,w_i)f_r(p,w_i,w_o)(n\cdot w_i)dw_i}$$

-

蒙特卡洛积分分解渲染方程

-
直接光照
-

假设存在下图场景,我们认为各个方向进来的光$\omega i$ 均匀分布在球面上

-

-
    -
  • 假设该点不发光,因而直接光照强度结果来自于四面八方入射来的光照强度
  • -
-

忽略渲染方程发光项后的形式

-

$$L_o(p,w_o) =\int_{\Omega+} {L_i(p,w_i)f_r(p,w_i,w_o)(n\cdot w_i)dw_i}$$

-
使用蒙特卡洛积分求解
-
    -
  • 通过蒙特卡洛求解我们需要在不同方向上采样,考虑对应的f(x)和PDF的值
  • -
-

着色点为p点时,从P点反射到摄像头的辐射为

-

$$L_o(p,w_o) =\int_{\Omega+} {L_i(p,w_i)f_r(p,w_i,w_o)(n\cdot w_i)dw_i}$$

-

蒙特卡洛为了算积分会在积分域上进行采样获得样本X,计算f(x)/p(x),再求平均

-

$$\int_a^b f(x)dx \approx \frac{1}{N}\sum_{k=1}^N \frac{f(X_k)}{p(X_k)}$$

-

$$X_k \backsim p(x)$$

-
    -
  • 求出f(x)
  • -
-

将蒙特卡洛积分的方法迁移到解渲染方程上,则f(x)就是渲染方程中积分的所有计算式

-

$$L_i(p,w_i)f_r(p,w_i,w_o)(n\cdot w_i)$$

-
    -
  • PDF的值
  • -
-

PDF涉及对积分域进行采样,这里为对半球进行采样

-

使用最简单的均匀采样,认为半球上采样到任何一个方向上的概率密度是相同,PDF为一个常数

-

$$p(\omega_i) = \frac{1}{2\pi}$$

-

球面面积为$4\pi$,半球面面积为$2\pi$,半球对应立体角为$2\pi$,均匀采样使PDF的所在角度积分为1,因此PDF为$\frac{1}{2\pi}$

-
    -
  • 将渲染方程改写成蒙特卡洛形式
  • -
-

每次均匀地在半球上采样,取一个入射方向$\omega_i$,将上值代入可得下列式子

-

$$L_o(p,w_o) =\int_{\Omega+} {L_i(p,w_i)f_r(p,w_i,w_o)(n\cdot w_i)dw_i}$$

-

$$\approx \frac{1}{N}\sum_{i=1}^N \frac{L_i(p,w_i)f_r(p,w_i,w_o)(n\cdot w_i)}{p(\omega_i)}$$

-

由此可写出以下着色算法

-
着色点p,方向为w0
-    随机选择PDF采样得到的N个方向wi
-    初始化结果Lo
-    对于选中的wi
-        从p点连出一条光线
-        如果光线打到了光源
-            Lo+=(1/N) * Li * fr * cosine/pdf(wi)
-    返回Lo
-

-
shade(p, wo)
-    Randomly choose N directions wi~pdf
-    Lo = 0.0
-    For each wi
-        Trace a ray r(p, wi)
-        If ray r hit the light
-            Lo += (1 / N) * L_i * f_r * cosine / pdf(wi)
-    Return Lo
-
全局光照
-

全局光照下,我们需要考虑反射面反射过来的光,计算从Q反射到P点反射了多少辐射能

-

-

只需在直接光照的算法中添加分支便可支持全局光照

-
着色点p,方向为w0
-    随机选择PDF采样得到的N个方向wi
-    初始化结果Lo
-    对于选中的wi
-        从p点连出一条光线
-        如果光线打到了光源
-            Lo+=(1/N) * Li * fr * cosine/pdf(wi)
-        如果光线打到了q点的物体
-            Lo +=(1/N) * shade(q,-wi) * fr * cosine/pdf(wi)
-    返回Lo
-

-
shade(p, wo)
-    Randomly choose N directions wi~pdf
-    Lo = 0.0
-    For each wi
-        Trace a ray r(p, wi)
-        If ray r hit the light
-            Lo += (1 / N) * L_i * f_r * cosine / pdf(wi)
-        Else If ray r hit an object at q
-            Lo += (1 / N) * shade(q, -wi) * f_r * cosine / pdf(wi)
-        
-Return Lo
-

打到物体上是需要考虑q点反射过来的能量,即在q点-wi方向看过去的直接光照

-
-
上述算法存在的问题
-
    -
  • 这种方式打出不同光线再以递归的方式计算,会使光线的数量呈指数爆炸增长
  • -
-

如下图,打到第一个物体上后反射出N根光线,打到第二个物体后会再发出N个光线,即变成$N^2$条光线,会超出处理能力

-

-

解决方法:

-
    -
  1. 取N等于1,但是会产生较大噪声
  2. -
  3. 采用N=1来做蒙特卡洛积分,即为路径追踪,(N!=1时为分布式光线追踪,会产生指数爆炸)
  4. -
  5. N=1的情况下会产生噪声,但需要得到的只是一个像素的Radiance,所以只需计算穿过一个像素的多个path再求平均即可得到目标Radiance
  6. -
-

path:一条完整连接视点和光源的路径

-

算法:

-
ray_generation(camPos, pixel)
-    Uniformly choose N sample positions within the pixel
-    pixel_radiance = 0.0
-    For each sample in the pixel
-        Shoot a ray r(camPos, cam_to_sample)
-        If ray r hit the scene at p
-            pixel_radiance += 1 / N * shade(p, sample_to_cam)
-    Return pixel_radiance
-
    -
  • 递归算法永远不停
  • -
-

真实世界中光线本身弹射次数也是不停的,但计算机不能无限模拟,也不能提前限制弹射次数,这样会损失多次弹射的能量

-

解决方案:

-

用Russian Roulette(俄罗斯轮盘赌)的方法来决定以一定概率去停止光线继续弹射

-

俄罗斯轮盘思想:

-
    -
  1. 某一着色点出射的Radiance是$L_o$
  2. -
  3. 自定一个概率p(0< p < 1)
  4. -
  5. 以一定的概率p往某一方向打一条光线
  6. -
  7. 得到一定结果后取$L_o/p$为返回值
  8. -
  9. 在1-p的概率内就不打光线,返回值为0
  10. -
-

可视为取两个值的离散型随机变量,可以通过概率乘以值并加起来计算期望

-

$$E = P*(L_o/p) + (1-p)*0 = L_o$$

-

对应修改后的着色算法

-

指定概率$P_RR$

-

随意在0到1中取一个数ksi

-

如果$ksi>P_RR$,意味着不该往外把一根光线

-

其他情况下正常打出光线,最后结果需除以$P_RR$

-
shade(p, wo)
-    Manually specify a probability P_RR
-    Randomly select ksi in a uniform dist. in [0, 1]
-    If (ksi > P_RR) return 0.0;
-    Randomly choose ONE direction wi~pdf(w)
-    Trace a ray r(p, wi)
-    If ray r hit the light
-        Return L_i * f_r * cosine / pdf(wi) / P_RR
-    Else If ray r hit an object at q
-        Return shade(q, -wi) * f_r * cosine / pdf(wi) / P_RR
-

至此得出不太高效的正确path tracing算法

-
-

Samples(采样率)可认为是path,SPP(samples per pixel)就是一个像素打出多少path

-

low SPP下,计算速度快,图片噪声多

-

High SPP下,计算速度慢,图片噪声少

-

-
算法依旧不高效的原因
-

-

光线能否打到光源上取决于运气,当光源小时往往会浪费过多光线,需要改用更好的PDF用来采样,而非简单的均匀采样

-
光源上采样
-

蒙特卡洛允许许多采样方法,我们可以直接在光源上采样

-

-

n'为光源本身朝向,在与着色点连线后可得$\theta$(连线和着色点法线的夹角) $\theta$'(连线和光源法线的夹角),此时若在视为二维平面的光源上均匀采样,则PDF为$\frac{1}{A}$

-

此时得到一个定义在光源上的积分,需要将渲染方程改写

-
    -
  • 将对$d\omega$的积分改为对$dA$的积分
  • -
-

dA: 光源上的一个小平面

-

$d\omega$:是上面小的表面投影到单位球上形成的面积(单位球半径为1,立体角为dA投影到单位球上的面积除以1的平方)

-

$d\omega$和dA的关系:dA的朝向不一定朝向着色点,则需要计算$dAcos\theta'$,将光源所在平面垂直地和着色点连线,除以距离绝对值的平方,得出$d\omega$

-

$$d\omega = \frac{dAcos\theta'}{||x' - x||^2}$$

-

重写后的渲染方程为:

-

$$L_o(x,\omega_o) = \int_{\Omega+} L_i(x,\omega_i)f_r(x,\omega_i,\omega_o)\cos \theta d\omega_i$$

-

$$\int_A L_i(x,\omega_i)f_r(x,\omega_i,\omega_o)\frac{dAcos\theta'}{||x' - x||^2} dA$$

-

即可使用蒙特卡洛积分进行计算,此时的PDF为1/A

-
改进后的算法
-

着色点的着色结果来源于两个部分:

-
    -
  • 光源的贡献(直接光源,无需进行俄罗斯轮盘赌剔除)
  • -
-

均匀地在光源上采样后对改写后的渲染方程使用蒙特卡洛积分计算

-
    -
  • 非光源贡献(间接光源,需要进行俄罗斯轮盘赌剔除)
  • -
-

如果通过了俄罗斯轮盘赌测试,就发出一条射线,打到了一个非光源的点q时将其贡献加入

-

算法:

-
shade(p, wo)
-    # Contribution from the light source.
-    Uniformly sample the light at x’ (pdf_light = 1 / A)
-    L_dir = L_i * f_r * cos θ * cos θ’ / |x’ - p|^2 / pdf_light 
-
-
-    # Contribution from other reflectors.
-    L_indir = 0.0
-    Test Russian Roulette with probability P_RR
-    Uniformly sample the hemisphere toward wi (pdf_hemi = 1 / 2pi)
-    Trace a ray r(p, wi)
-    If ray r hit a non-emitting object at q
-        L_indir = shade(q, -wi) * f_r * cos θ / pdf_hemi / P_RR
-    Return L_dir + L_indir
-
处理光源遮挡
-

上述算法中,光源采样并未考虑光源遮挡问题

-

发生下图蓝色物体遮挡在光源和着色点之间时,需要判断光源能否贡献到着色点

-

-

判断方式:

-

着色点到光源上的采样点取一根连线,从着色点往这根连线的方向打出一根光线,判断是否会打到某个物体,自然可以直接判断直接光照是否被遮挡,不被遮挡时,直接光照可直接计算,被遮挡时,自然为0

-

改进后算法:

-
shade(p, wo)
-    # Contribution from the light source.
-    Uniformly sample the light at x' (pdf_light = 1 / A)
-    Shoot a ray from p to x’
-    If the ray is not blocked in the middle
-        L_dir = L_i * f_r * cos θ * cos θ’ / |x' - p|^2 / pdf_light 
-
-
-    # Contribution from other reflectors.
-    L_indir = 0.0
-    Test Russian Roulette with probability P_RR
-    Uniformly sample the hemisphere toward wi (pdf_hemi = 1 / 2pi)
-    Trace a ray r(p, wi)
-    If ray r hit a non-emitting object at q
-        L_indir = shade(q, -wi) * f_r * cos θ / pdf_hemi / P_RR
-    Return L_dir + L_indir
-

最终path tracing的出的效果

-

-

可见,path tracing 与照片相比能够做到几乎百分百相似

-
光线追踪新旧计算算法
-

早期多是Whitted-style Ray Tracing

-

现代:

-

可理解为所有光线传播方式的集合

-
    -
  • (Unidirectional & bidirectional) path tracing
  • -
  • Photon mapping
  • -
  • Metropolis light transport
  • -
  • VCM / UPBP…
  • -
-

当然,现在还做不到完美的实时光线追踪,也是现在探讨前沿

-
-
补充问题
-
    -
  • 蒙特卡洛积分应该选择什么样的PDF?
  • -
-

重要性采样理论

-
    -
  • 随机数是否有质量之分?
  • -
-

存在质量之分,不同的随机数有各自特点,如low discrepancy sequences、TAA中使用的Halton sequence

-
    -
  • 是否可以将采样半球和采样光源这两种采样方法结合起来,使其效果更好?
  • -
-

存在,称为multiple imp Sampling,简称MIS

-
    -
  • 我们算出了一个像素的Radiance,可是我们最后看到的是颜色,这个Radiance是不是颜色?
  • -
-

颜色与Radiance并非一一对应关系,将Radiance换算为颜色需要经过gamma校正

- -
- - - - -
- - - - -
- - -updatedupdated2023-06-182023-06-18 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/computergraphic/辐射度量学/index.html b/public/computergraphic/辐射度量学/index.html deleted file mode 100644 index 1ae405c..0000000 --- a/public/computergraphic/辐射度量学/index.html +++ /dev/null @@ -1,507 +0,0 @@ - - - - - - - - - - - - - - - - - - 辐射度量学基础(Basic radiometry) | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

辐射度量学基础(Basic radiometry)

- - - - - - - - - -
-

本文建议与以下链接结合观看,便于理解

-

光照与阴影

-

辐射度量学

-
    -
  1. 辐射度量学是一个物理上准确定义光照的方法,定义了一系列单位和方法描述光照
  2. -
  3. 给光照定义了不同空间中的属性:辐射通量(Radiant flux)、强度(intensity)、辐照度(irradiance)、辐射度(radiance)
  4. -
  5. 基于几何光学,认为光沿直线传播,没有波动性
  6. -
-

引入辐射度量学的目的

-
    -
  • Whitted-style的光线追踪实际上不符合真实物理
  • -
-

Whitted-style采用的Blinn-Phong模型实际假设了反射为完美的镜面反射,忽略光线在反射后的能量损失

-
    -
  • 辐射度量学是一个精准的给我们一系列物理量的方法
  • -
-

辐射度量学精准地定义出物体表面与光的作用、光源、材质、光线传播,确保得到正确的结果

-

辐射量和辐射通量(Radiant Energy and Flux)

-

辐射量(Radiant Energy):电磁辐射的能量,单位为焦耳

-

$$Q[J = Joule]$$

-

辐射通量(Radiant Flux):每单位时间的能量,在物理上为功率,单位为瓦特,光学上单位为流明(lumen)

-

$$\Phi \equiv \frac{d_Q}{d_t} [W = Watt] [lm = lumen]$$

-

辐射通量同时可以表示为在单位时间内通过一个感光平面的光子数量

-

-

辐射强度(Radiant Intensity)

-

定义:单位时间内,单位立体角辐射的能量

-

-

坎德拉(Candela): 发光强度的SI单位。一坎德拉是光源在给定方向上的发光强度,该光源发出540 $\times $1012Hz的单色辐射,并且在该方向上的辐射强度为1/683瓦/球面度

-

角度:圆上圆弧长度与半径的比值

-
    -
  • $\theta = \frac{l}{r}$
  • -
  • 圆的最大角度为$2\pi$
  • -
-

立体角:球面对向面积与半径平方的比值

-
    -
  • $\Omega = \frac{A}{r^2}$
  • -
  • 球体的最大角度为$4\pi$
  • -
-

微分立体角:球面上当立体角的方向与Z轴的夹角($\theta$)、绕着Z轴旋转的角($\phi$)发生改变时,会在对应方向的球面上框出一片区域,该区域对应的立体角即为微分立体角

-

-

对于球体$S^2$: -$$\Omega = \int_{S^2} {d\omega} = \int_0^{2\pi} \int_0^{\pi} {\sin\theta d{\theta} d{\phi}} = 4\pi$$

-

在辐射度量中,我们也会用$\omega$表示三维空间中的一个方向,可以使用$\theta和\phi$的方式来定义其位置,并利用$\sin \theta d_{\theta} d_{\phi}$来计算微分立体角

-

-

光强(Intensity)

-

定义一个点光源的亮度可以定义其Flux,所以光强即为这个光源在任何一个方向上的亮度

-

对所有方向上单位立体角的光强进行积分就可以得到Flux(poweer)

-

$$\Phi = \int_{S^2} {Id\omega} = 4\pi I$$

-

对于各向同性光源(点光源向各个方向均匀地辐射出能量)

-

$$I = \frac{\Phi}{4\pi}$$

-

-

现代LED灯实例

-

对于下图中的LED灯,可见:

-

标注输出815流明,11瓦功率相当于白炽灯60瓦功率

-

假设其为各向同性光源

-

Itensity = 815 lumens / 4pi sr = 65 candelas

-

-

辐照度(Irradiance)

-

定义:单位面积内的能量

-

-

单位面积需与入射光线垂直才算是接收到的范围,否则要将其投影到垂直的方向

-

例如Lambert's Cosine Law中平行光打到单位面上如果垂直则可以接收到6根光线,平面若倾斜则只能接收到三个光线,接收到的能量要乘以$\cos \theta$

-

-
-

基于辐照度来理解光照衰减

-

定义光源的power为$\phi$,认为其往各个方向都是均等地辐射出能量

-

之前普遍理解为能量分布在球壳上,壳越大则每个地方分布的能量越少

-

采用辐照度则认为对于最中间的球壳来说,其半径为1,则下图中该点出的辐照度为$E = \phi / (4\pi 1^2 )$,球壳半径为r时,辐照度为$\phi / (4 \pi r^2)$,也就等于$E/r^2$

-

-

由此可得出并非Idensity在衰减,而是Irradiance在衰减

-

辐射(Radiance)

-

定义:单位立体角下每单位面积下的power

-

-

由此可知power需要进行两次微分,一次立体角,一次投影后单位面积

-

intensity、radiance和irradiance的联系

-

Intensity:每单位角power

-

Irradiance:每单位投影面积的power

-

Radiance:每单位投影面积的Intensity

-

Radiance: 每单位角的Irradiance

-

入射辐射(Incident Radiance)

-

从一个方向打到一个很小的面上的能量,即为入射辐射

-

-

是沿着给定光线到达表面的光(给定表面上的点和入射方向)

-

出射辐射(Exiting Radiance)

-

王某一个方向(立体角)辐射的能量即为出射辐射

-

-

是沿着给定光线到达表面的光(给定表面上的点和出射方向)

-

irradiance 和 Radiance 的区别

-

irradiance: dA收到的所有能量

-

radiance: dA从某一个方向收到的能量

-

E(p)即为irradiance,等于所有方向上的Radiance的和

-

- -
- - - - -
- - - - -
- - -updatedupdated2023-06-182023-06-18 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/computergraphic/采样与光栅化/index.html b/public/computergraphic/采样与光栅化/index.html deleted file mode 100644 index 4837f89..0000000 --- a/public/computergraphic/采样与光栅化/index.html +++ /dev/null @@ -1,567 +0,0 @@ - - - - - - - - - - - - - - - - - - 采样与光栅化 | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

采样与光栅化

- - - - - - - - - -
-

屏幕空间

-

屏幕空间可以被看做是由一组像素点构成,每个像素点可以被视为中心为$(x+0.5,y+0.5)$的一个正方形,

-

-
-

模型的面

-

大多数模型的面(mesh)以三角形为主(也有一些不同的面) -选择三角形的原因:

-
    -
  1. 大多数多边形最终都可以被分割为三角形
  2. -
  3. 边界清晰,便于判定某个点是否位于面内(与采样有关)
  4. -
  5. 对于三角形的每个顶点值有清晰的插值方式(质心插值)
  6. -
-
-

采样的功能(光栅化)

-

遍历整个屏幕上所有的像素点,如果某个像素点的中心位于三角形内,则对这个像素点进行采样

-

伪代码

-
-
-
-
1
-2
-3
-
-
for(int x = 0 ; x < xmax; ++x)
-    for(int y = 0; y< xmax ; ++y)
-        image[x][y] = inside(tri,x+0.5,y+0.5);
-
-
-

可视化过程如图

-

-
-

判断像素点在三角形内部

-

inside的判断主要由叉乘(cross product)来实现

-

计算三角形各边的向量和目标测试点与三角形三个顶点的向量,将各边向量分别与测试点与顶点的向量进行叉乘,得出三个值,如果三个值得符号相同,则目标测试点位于三角形内,相反则测试点在三角形外

-

代码实现

-
-
-
-
 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-
-
//判断测试点是否在三角形内
-static bool insideTriangle(int x, int y, const Vector3f* _v)
-{
-	// TODO : Implement this function to check if the point (x, y) is inside
-    // the triangle represented by _v[0], _v[1], _v[2]
-
-	//测试点的坐标为(x, y)
-	//三角形三点的坐标分别为_v[0], _v[1], _v[2]
-
-	//叉乘公式为(x1, y1)X(x2, y2) = x1*y2 - y1*x2
-
-	//准备三角形各边的的向量
-	Eigen::Vector2f side1;
-	side1 <- _v[1].x() - _v[0].x(), _v[1].y() - _v[0].y();
-	Eigen::Vector2f side2;
-	side2 <- _v[2].x() - _v[1].x(), _v[2].y() - _v[1].y();
-	Eigen::Vector2f side3;
-	side3 <- _v[0].x() - _v[2].x(), _v[0].y() - _v[2].y();
-
-	//计算测量点和三角形各点连线的向量
-	Eigen::Vector2f v1;
-	v1 <- x - _v[0].x(), y - _v[0].y();
-	Eigen::Vector2f v2;
-	v2 <- x - _v[1].x(), y - _v[1].y();
-	Eigen::Vector2f v3;
-	v3 <- x - _v[2].x(), y - _v[2].y();
-
-	//三角形各边的的向量叉乘测量点和三角形各点连线的向量
-	float z1 = side1.x() * v1.y() - side1.y() * v1.x();
-	float z2 = side2.x() * v2.y() - side2.y() * v2.x();
-	float z3 = side3.x() * v3.y() - side3.y() * v3.x();
-
-	//判断叉乘结果是否有相同的符号
-	if ((z1 > 0 && z2 > 0 && z3 > 0) || (z1 < 0 && z2 < 0 && z3 < 0))
-	{
-		return true;
-	}
-	else
-	{
-		return false;
-	}
-}
-
-
-

加速算法

-
Bounding box
-

每一次判断屏幕上的像素点是否在三角形内都检测所有在屏幕上像素点会带来额外的性能开销和渲染时间

-

使用包围盒将三角形包围后,只判断包围盒内的像素点是否在三角形内能够减少这种情况的出现

-

-

代码实例

-
-
-
-
1
-2
-3
-4
-5
-6
-
-
    auto v = t.toVector4();//包含三角形三个顶点的结构体
-//利用三角形的三个顶点,计算三角形的包围盒
-    float min_x = std::min(v[0].x(), std::min(v[1].x(), v[2].x()));
-	float max_x = std::max(v[0].x(), std::max(v[1].x(), v[2].x()));
-	float min_y = std::min(v[0].y(), std::min(v[1].y(), v[2].y()));
-	float max_y = std::max(v[0].y(), std::max(v[1].y(), v[2].y()));
-
-
-
incremental triangle Traversal
-

对于每一行像素点,只遍历三角形最左到最右的像素点,只适用于较窄的且经过旋转的三角形

-

- -
- - - - -
- - - - -
- - -updatedupdated2023-06-182023-06-18 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/computergraphic/高级光线传播与复杂外观建模/index.html b/public/computergraphic/高级光线传播与复杂外观建模/index.html deleted file mode 100644 index d06b0e5..0000000 --- a/public/computergraphic/高级光线传播与复杂外观建模/index.html +++ /dev/null @@ -1,795 +0,0 @@ - - - - - - - - - - - - - - - - - - 高级光线传播与复杂外观建模 | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

高级光线传播与复杂外观建模

- - - - - - - - - -
-

无偏的光线传播方法(Unbiased light transport methods)

-

双向路径追踪(Bidirectional Path Tracing)

-

双向路径追踪是对之前路径追踪的扩展,生成两个子路径

-

从光源打出一些sub-path,从摄像机出发也可以生成另外一系列的子路径。双向路径追踪会将这些子路径的端点连接起来形成一条完整的路径

-

-

BDPT适用的场景

-

图例中,左图为路径追踪,右图为双向路径追踪,适用的都是每个像素32个采样点,但可见双向路径追踪能产生更好的效果

-

-

原因:

-

在如图场景中,光线追踪难以找到一条带有大量能量的路径。此场景中光源往上方角落打出,整个场景都是被间接光所照亮的,此时光线从摄像机出发后第一次打到的地方往往是diffuse的,导致其不好控制它打到之后能量集中的区域

-

缺点:

-

实现较难,相对计算速度慢

-

Metropolis Light Transport(MLT)

-

使用统计学上采样的工具--- 马尔可夫链(当前有一个样本,马尔可夫链可以根据当前样本生成和它靠近的下一个样本,并用这些样本估计函数的值)

-

与均匀采样不同,均匀采样时在a和b之间以均等概率选择一个x,且相互独立

-

给定足够的时间,马尔可夫链的蒙特卡洛方法可以生成一系列以任意的函数形状为PDF生成的样本

-

使用马尔可夫方法的原因

-

蒙特卡洛方法实际上在采样的PDF(p(x))和要积分的函数(f(x))形状一致的时候是最合适的,此时variance是最小的

-

任何未知的函数都可以通过马尔可夫链的方法生成一系列分布和被积函数形状一致的样本

-
马尔可夫方法具有局部性
-

马尔可夫方法是一个局部的方法,当给出一个路径时,可以生成它周围跟它相似的路径

-

如图中蓝色光路,对该光路做出微笑扰动就可以得到一条新路径

-

不断在一个path周围产生更多path就可以找到所有的path

-

-

MLT方法与BDPT的效果对比

-
    -
  • 优点
  • -
-

在下图中类似的场景下MLT的效果很好,其适合做复杂、困难的光线传播

-

-

Caustics是光线经过聚焦打在游泳池底,然后被人眼看见。光线要穿过水的表面(凹凸不平,还有浪),会被聚焦到一系列的地方(水面有办法将光线聚焦到一系列的线上)。这种情况渲染起来非常困难,因为假设游泳池底是diffuse的,光线会先经过一个specular的水面,游泳池底被我们看见也要经过一个specular(这种路径简称SDS(specular-diffuse-specular))

-
    -
  • 缺点
  • -
-

MLT难以在理论上预估最后收敛的速度(path tracing中使用的蒙特卡洛积分可以分析variance,从而预估渲染收敛的时间)

-

所有操作都是局部的,有些像素收敛快,有的像素收敛慢,使渲染出来的结果图像看上去比较脏

-

-

不适用于渲染动画,因为不同连续帧的收敛速度不同,画面会产生严重抖动

-
-

有偏的光线传播方法(biased light transport methods)

-

光子映射(Photon Mapping)

-

尤其适用于渲染Caustics和Specular-Diffuse-Specular(SDS)

-

-

实现方法

-
    -
  • 从光源出发,光子碰到物体后计算所有反射和折射,直到光子打到diffuse的物体上停止,此时整理所有光子即可得到光子位置信息
  • -
-

-
    -
  • -

    从眼睛或相机开始,往各个不同方向打出各种各样的子路径,计算反射和折射直到打在diffuse的物体上

    -
  • -
  • -

    结合上述两步结果计算局部密度估计

    -
  • -
-

局部密度估计是建立在上面的观察上的,一开始打了很多光子,光子分布在物体表面了,从相机出发的一堆光线也打到物体表面上了,那我们看到的物体表面,光子分布越集中的地方就越亮,越不集中就越不亮,当第二趟打到各种不同的物体表面的时候就要做一个局部的密度估计

-

具体解法:

-
    -
  • 将所有的光子组织成自上而下的加速结构模式,然后可以迅速定位到一个着色点周围有多少个光子,找它最近的一些
  • -
  • 计算N个光子所占的面的面积
  • -
  • 计算密度:用光子的数量N除以它们占的面积
  • -
-

-

N的取值

-

如果用很少的光子的数量,就会得到一个很有噪声的图,如果用更多的光子,结果虽然会好一些,但是得到的结果会糊

-

-
产生取值问题的原因(有偏的原因)
-
    -
  • 计算密度时,我们认为密度时当前这个点的周围取一个微小的面积dA,它里面有多少个光子
  • -
-

$$dN/dA$$

-
    -
  • 实际计算密度为给定光子数计算实际面积
  • -
-

$$\delta N/\delta A$$

-
    -
  • 正常情况下两者接近但不同(光子数量和周围覆盖面积都是有限的)
  • -
-

$$dN/dA != \delta N/\delta A $$

-

因此密度的估计并不正确,dA无限小时才是正确的计算

-

当实际的面积足够小(打出的光子数量足够多),结果就越接近于正确

-

所以该方法是有偏(biased)但一致(consistent)的

-

有偏(biased):得到的结果相比正确的结果只要有任何一点的模糊(blurry),就是有偏的

-

一致(consistent):虽然有模糊,但是只要样本足够多,就会最后让它收敛到不模糊的结果

-

Vertex Connection and Merging(VCM)

-

双向路径追踪和光子映射的结合

-

BDPT中,生成两个sub-path再将端点连起来,如果有的path满足下述性质就用光子映射将虚线圆内的两个sub-path的贡献结合在一起

-

性质:左边path和右边path的端点在同一个面上,此时可认为其中一半是光子

-

往往用于电影行业渲染

-

-

实时辐射度算法(Instant Radiosity(IR))

-

有时又称为多光源算法(many-light approaches)

-

之前的光线传播往往不区分光的来源(反射或自己发出),实时辐射度算法中就将已经被照亮的区域认为是光源,用于照亮其他区域

-

计算方法

-
    -
  • -

    从光源打出很多光线子路径(light sub-path),这些光会停在某些地方,认为停的位置就变成了新的光源(VPL)

    -
  • -
  • -

    看到如下图中的着色点后就用新的光源来照亮(相当于实际考虑光线弹射两次)

    -
  • -
-

-

优缺点

-
    -
  • 优点(下图左)
  • -
-

快速,往往会在漫反射场景中有良好的效果

-
    -
  • 缺点(下图右)
  • -
-

在窄的缝隙或接缝处会出现发光

-

VPL不能做glossy的物体

-

窄缝发光问题与距离平方向有关,在计算light sampling时,更改立体角的采样为对面积的采样,所以产生了面积乘以cos除以两个点之间的距离的值,当两个点距离极近时就会得到一个非常大的结果

-

-

高级外观建模

-

散射介质/参与介质(participating media)

-

定义在空间中而非简单的表面上,如:

-

-

-

-

-
-

光在前进的路径上如果穿进了散射介质则会发生散射和吸收

-
    -
  1. 如云中间有光源则其本身会发光
  2. -
  3. 光线路径上如果有很多小的晶体则会把光线随机反射到其他方向上去
  4. -
  5. 传播的过程中也可能会接收到从其他方向反射过来的光
  6. -
-

-

散射计算

-

类比与物体表面,物体为diffuse的才会认为光线被均匀地反射到各个不同的方向上去,散射介质也是相同,任何一点都会发生散射,使用Phase Function(相位函数)定义散射计算

-

下图相位函数决定了散射的方式和方向(与BRDF类似,BRDF决定如何反射,相位函数决定如何散射)

-

-

散射介质渲染

-

光线在散射介质内部能传播多远是有这个介质的吸收能力决定,当传播停止后再考虑光线的反射方向,与光在物体表面的弹射类似,只是中间的任何一个点都有可能会发生方向的改变。但始终会找到一个path,在将弹射点和光源相连,计算整个路径的贡献(不考虑Rendering equation,因为渲染方程描述物体表面与物体的作用而非体积间的相互作用)

-

应用

-

超能特工队

-

-

游戏:刺客信条

-

-

巧克力(流体模拟)

-

-

毛发建模(Hair/fur/fiber)缩写:BCSDF

-

如下图中所示,头发往往是一根一根的,若梳理平整还可暂且视为表面,但大多数情况下,头发都是飘散的

-

可见头发会有两种高光,一种无色发白,一种有色

-

-

高光计算

-

如下图中的模型,一根光线打到圆柱上(毛发模型)会散射出一个圆柱,且同时有光线散射到各个方向上

-
    -
  • kajiya-Kay Model
  • -
-

-

但表现却不太符合现实,与Blinn-Phong类似

-

-
    -
  • Marschner Model
  • -
-

该模型广泛使用,考虑了光线打到圆柱上的情形

-
    -
  1. 有部分光被反射,记为R
  2. -
  3. 一部分会穿透到头发里发生折射,可记为T,一根光线要穿透一根头发需要穿透两次,因而产生TT的光线传播方式
  4. -
  5. 光线发生一次穿透进入头发内部,在头发内壁上发生一次反射后返回,返回时再发生一次穿透,记为TRT
  6. -
-

-

在这一模型中(下图左),我们会将头发认为是一个玻璃的圆柱(总体可认为是扭曲,但局部必定是直的),包含两种结构,外层cuticle(表层),内层cortex(皮层)

-

头发内部存在有色素,光线穿透后会有部分被吸收再向外传播

-

-

该模型也考虑了三种光线和模型之间的相互作用(上图右)

-

将计算结果综合后可得到一个十分拟真的效果

-

-

当然上述过程只定义了单根头发与光线的相互作用,与多根头发作用时需要额外计算多次散射

-

多次散射:光线打到一根头发穿透两次再和第二根,第三根$\dotsb$直到光线进入摄像机(被看见),计算量庞大

-

应用:

-

最终幻想15(ff15)

-

-

疯狂动物城

-

-
-

动物毛发的计算

-

人的毛发计算模型往往不能用于动物毛发计算,如下图,左侧为人的毛发模型计算结果,可见其不足以描述光线与动物毛发的相互作用

-

-
    -
  • 生物结构
  • -
-

人的毛发与动物毛发的共同点:

-

都有三个结构,cuticle(表皮)、cotex(皮层)、Medulla(髓质,复杂内部结构,光线进入后会反射到各个方向)

-

不同点:

-

动物毛发中的髓质更大,光线进入后更容易发生反射

-

-

由此可见,Marschner Model中忽略髓质在动物毛发计算中并不适用

-

-

有无髓质的对比

-

-

双层圆柱模型(Double Cylinder Model)

-

该模型中加入了对髓质的精确描述

-

-

光线在打到表面后依旧会发生反射,穿过结构后也可能无法到达髓质或是到达后没有发生反射,与Marschner Model中一样,存在R、TT、TRT

-

同样会有部分光穿过髓质的时候发散到各个方向上去(TTs),TRT也相同,在穿过髓质的过程中,两次都有可能被散射,形成TRTs

-

-

可以使用5个不同的分量,在原来的3个模型上加上2个散射的结果

-

-
应用
-

下图中的仓鼠,由60万根毛发组成,在每像素中有1024个采样点的采样率下,每帧需要渲染36.9分钟

-

-

猩球崛起

-

-

狮子王

-

-

颗粒材质(Granular Material)

-

如香料、盐、糖等等

-

-

计算量很大,但可以做些简化

-

比如一个沙子城堡,每一单元上由不同石子构成,各自成分占比也可得出,渲染结果在离得近的时候可以看到一粒一粒的,离得远的情况下就会是一个沙丘

-

-

-

-
-

表面模型(Surface Models)

-

半透明材质(Translucent Material)

-

翻译有些许错误,Translucent不应为半透明,semitransparent才是半透明,两者存在些许差别

-

光线在穿过透明介质时会涉及到吸收,本身还涉及到散射,说明光线可以从某一个地方进入这一个表面再从另一个地方出这个表面

-

即并非沿着一个方向传播并被吸收,可以被传导到其他方向上去

-

-

-

在物理上,常常认为光线在某一个点进入某一个表面,在里面发生了大量散射,从另一个点钻出

-

-

次表面散射(Subsurface Scattering)

-

出于描述上述反射过程的目的,将其定义为次表面散射

-
次表面散射可理解为对BRDF概念的延伸
-

BRDF: 光线打到这个点,并从这个点出来,所有作用都发生在一个点上

-

BSSRDF:可理解为吧BRDF的概念延伸到从一个点以任意方向进来再从任意一个其他的地方以任意方向出去

-

-
    -
  • 定义
  • -
-

和BRDF概念一致,只是在中间加入了一个Subsurface Scattering,次表面反射对应的BSSRDF规定了光线从哪个点和方向进,从哪个点和方向出

-

$$S(x_i,\omega_i,x_o,\omega_o)$$

-
    -
  • 渲染方程
  • -
-

需要额外考虑从各个方向进入其他点的光,因此需要对方向和面积进行积分

-

$$L(x_o,\omega_o) = \int_A\int_{H^2} {S(x_i,\omega_i,x_o,\omega_o)L_i(x_i,\omega_i)\cos\theta_id\omega_idA}$$

-
    -
  • Dipole Approximation
  • -
-

以上算法稍显复杂,我们可以采用一下方式进行简化

-

光线打到物体上与物体底部出现光源类似,会从底部照亮着色点周围的一片,为了物理上的真实,推出一个光源不够,还要对应上方有一个光源,还要对应上方存在一个光源,相当于有两个光源照亮周围着色点的一块

-

-
    -
  • 效果
  • -
-

BRDF,类石膏材质效果

-

-

BSSRDF,类大理石

-

-

如图,BRDF渲染的皮肤效果显得干燥,BSSRDF则能有很好的效果

-

-
    -
  • 应用
  • -
-

人脸渲染

-

-

布料(cloth)

-
    -
  • 布料组成
  • -
-

由一系列缠绕的纤维构成,有几个不同的层级

-

纤维(fiber)是最基础的,纤维可以缠绕成不同的股(ply),不同的股再经过不同的缠绕形成线(yarn)

-

-

Woven or Knitted(编织或针织)

-

一种是机器织的,一根压一根的,像桌布之类的做法

-

一种是手工织的,像打毛衣一样

-

对于布来说,它是纤维缠绕而成的,所以算它的表面模型就非常麻烦,因为与针织或纺织的方向有关

-

可以通过编织图案计算BRDF模型

-
    -
  • 问题
  • -
-

布料模型大多数并非在一个表面上,难以使用BRDF来表示

-

-
    -
  • 解决方案1
  • -
-

所以将织物认为是在空间中分布的体积,然后可以将其划分成超级细小的格子,每一个格子里面大概知道纤维的朝向、分布、复杂程度等等,那就可以将这些性质转化成光线的吸收和散射。将这些性质转换成对云烟雾这种反射介质的渲染,不再将布料当成一个面,而是当成一个体积,体积中任何一个微小的块都知道它的性质

-

计算量庞大,计算时间长

-

-
    -
  • 解决方案2
  • -
-

布料本身是纤维,渲染每一根纤维也能产生很好的效果,计算量同样惊人

-

-
    -
  • 应用
  • -
-

-

有细节的材质(Detailed Appearance)

-

如下图,渲染结果不错但并不真实,因为结果过于完美

-

-

真实情况下车上会有高光,高光周围会有类似于蜘蛛网结构的划痕。鼠标上则会有由很多小的凸起形成的高光

-

-

下图由微表面模型渲染得出,结果完美但不真实

-

-

加入了实际可能产生不完美的地方

-

-

模拟被同方向刷出的各项异性材质

-

-
    -
  • 微表面模型中的法线分布
  • -
-

微表面模型中重要的是微表面的法线分布,描述分布时,往往使用非常简单的模型(正态分布、高斯),得到的自然是没有什么细节的结果(法线分布没有体现各种各样的变化和细节)

-

-

在蜗牛壳上贴了一个大的法线贴图,每个面都可以产生高光,所有高光形成一起就可以变成一个大高光

-

-

Metallic flakes:可替换别的模型,例如很多人在车漆中添加的亮片,亮片会形成很多不同的方向,不同方向会形成不同的反光

-

-

虽然能够定义各种细节,但渲染十分困难,需要渲染接近一个月才能得到这个结果

-

-
    -
  • 渲染困难的原因:
  • -
-

认为每一个微表面是一个镜面,如下图场景中有一个针孔摄像机和一个点光源,那从摄像机打根光线过去,打到哪个表面,就可以知道它的法线,也就可以知道它的镜面反射方向,所以也就很难通过反射的方式让光线打到光源上。从光源打过来也是同理,打到一个微表面,并且知道如何反射,但就是反射不到摄像机上去

-

-

解决: -由于一个像素会覆盖很多的微表面,如果将一个小的范围内的微表面的法线分布计算出来便可代替原本光滑的分布并用在微表面模型里

-

-
    -
  • P-NDF的形状:
  • -
-

如果考虑像素覆盖的范围,就可以得到各种各样神奇的法线分布(NDF)。可以想象一个像素覆盖了非常多的微表面,那这些微表面自然会显示出一些统计学的规律,那如果覆盖的范围小,就会显示出一些很独特的性质,法线分布就会看上去很有特点

-

-

不同类型的法线贴图会引起不同的法线分布

-

-
    -
  • 例子和应用
  • -
-

-

-

游戏中的应用-古墓丽影中的雪地

-

-

波动光学

-

引入细节后,还用几何光学解释就不对,物理上当物体非常小,小到和光的波长相当时,就不能假设光线是沿直线传播的,而必须假设这个光是一个波,这就会涉及到衍射和干涉现象的发生

-

-

比如在黑屋里,用点光源照亮一个金属片,会在本身只有一个颜色的金属片上看到各种各样的颜色

-

-

-

白光照射后反射出来的便为白光,如果不是白的就一定有波动光学(Wave Optics)

-

波动光学得出的BRDF与几何光学的BRDF很像但具有不连续的特点(光会发生干涉,会引起部分区域加强或减弱)

-

-

以下为波动关系渲染的结果

-

-

-
-

程序化材质生成(Procedural Appearance)

-

用一定的方式指导生成,无需真正地生成,可以动态查询

-

如下图可定义各种各样的花纹,花瓶打碎后可见花瓶内部纹理,可定义一个三维纹理

-

-

存储量在三维下会变得很大,可利用noise函数(x,y,z),给定任何x,y,z可得到对应的值,这样可以实现什么时候用就什么时候去查

-

-

procedural更多意味着不生成,需要时再查询

-
    -
  • 车上的锈
  • -
-

可生成一系列噪声,可对噪声做出一系列操作(二值化(binary noise));铁锈往往是不同区域有不同分布,这个噪声如果为0到1,当函数值大于0.8时认为是1,小于0.8就认为是0

-

-

应用最广泛的是柏林(Perlin)噪声

-
    -
  • 生成地形
  • -
-

-
    -
  • 生成海浪
  • -
-

-
    -
  • 生成木头纹理
  • -
-

-

常用Houdini来做程序化材质,且是先程序化生成再拿去使用

-
- -
- - - - -
- - - - -
- - -updatedupdated2023-06-182023-06-18 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/css/meme.min.12a3541920a798d49c1bca858f15c53090f14ce9367a34faa2bb51dd38299730.css b/public/css/meme.min.12a3541920a798d49c1bca858f15c53090f14ce9367a34faa2bb51dd38299730.css deleted file mode 100644 index 73030fc..0000000 --- a/public/css/meme.min.12a3541920a798d49c1bca858f15c53090f14ce9367a34faa2bb51dd38299730.css +++ /dev/null @@ -1,10 +0,0 @@ -html{scroll-behavior:smooth}html,body{margin:0;width:100%;height:100%;font-size:16px;text-size-adjust:none;-webkit-text-size-adjust:none;-moz-text-size-adjust:none}body{-moz-tab-size:4;tab-size:4;color:var(--color-contrast-high);background-color:var(--color-bg);overflow-wrap:break-word;word-wrap:break-word;line-height:1.618;transition:all .5s}.container{min-height:100%;min-width:100%;position:relative}.main{padding:2em 1em 15em;display:block}.main{padding-top:7em}.main-inner{margin:0 auto;display:block}.icon{width:1.05em;height:1em;fill:currentColor;display:inline-block}svg{vertical-align:middle}h1,h2,h3,h4,h5,h6{margin:1.618em 0 1em;color:var(--color-contrast-higher)}h1 a,h2 a,h3 a,h4 a,h5 a,h6 a{text-decoration:none !important;color:var(--color-contrast-higher)}h1{font-size:2em}h2{font-size:1.8em}h3{font-size:1.6em}h4{font-size:1.4em}h5{font-size:1.2em}h6{font-size:1em}a{color:var(--color-contrast-high);text-decoration:none;transition:all .5s}a:hover{color:var(--color-primary)}::selection{background-color:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.3)}::-webkit-scrollbar{width:0.5rem;height:0.5rem}::-webkit-scrollbar-track{background-color:var(--color-bg)}::-webkit-scrollbar-thumb{background-color:var(--color-contrast-low)}::-webkit-scrollbar-thumb:hover{background-color:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.5)}::-webkit-scrollbar-thumb:active{background-color:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.75)}::-webkit-scrollbar-corner{background-color:var(--color-bg)}.list-title,.term-title,.list-year,.list-month,.post-title,.post-subtitle,.related-title,.post-nav,thead,dt{font-family:"glyph-correction","Noto Serif SC","EB Garamond",serif}.post-body h1,.post-body h2,.post-body h3,.post-body h4,.post-body h5,.post-body h6{font-family:"glyph-correction","Noto Serif SC","EB Garamond",serif}.contents-title{font-family:"glyph-correction","Noto Serif SC","EB Garamond",serif}code,pre,sup,.post-meta,.updated-badge,.post-gitinfo,.minimal-footer,.minimal-footer-about,.busuanzi-site-uv-and-pv,.copy-button{font-family:"glyph-correction","Source Code Pro","Noto Serif SC",monospace}body{font-family:"glyph-correction","EB Garamond","Noto Serif SC",serif}@font-face{font-family:'glyph-correction';font-display:swap;src:url("/fonts/glyph-correction.woff2") format("woff2"),url("/fonts/glyph-correction.woff") format("woff"),url("/fonts/glyph-correction.ttf") format("truetype"),url("/fonts/glyph-correction.eot") format("embedded-opentype");unicode-range:U+00B7, U+2014, U+2022, U+2026;font-weight:inherit;font-style:inherit}.drop-cap{margin-top:1rem !important}.emphasis-point{font-style:normal;text-emphasis:'•';-webkit-text-emphasis:'•';-moz-text-emphasis:'•';text-emphasis-position:under;-webkit-text-emphasis-position:under;-moz-text-emphasis-position:under}[data-indent="true"] .contents-title{text-align:center}[data-indent="true"] .post-body p{text-indent:2em;margin:0}[data-indent="true"] .post-body .caption{text-indent:0;margin:0 0 1em}[data-indent="true"] .post-body blockquote{margin:1em 0;padding:0;border:none}[data-indent="true"] .post-body img,[data-indent="true"] .post-body video{margin:1em auto}[data-indent="true"] .post-body table{margin:1em 0}[data-indent="true"] .post-body pre,[data-indent="true"] .post-body .highlight{margin:1rem 0}[data-indent="true"] .post-body h1,[data-indent="true"] .post-body h2,[data-indent="true"] .post-body h3,[data-indent="true"] .post-body h4,[data-indent="true"] .post-body h5,[data-indent="true"] .post-body h6{text-align:center}[data-indent="true"] .post-body .anchor-link{position:relative;transform:none;display:block;float:none}[data-indent="true"] .post-body ol,[data-indent="true"] .post-body ul{margin:0;padding-left:4em}[data-indent="true"] .post-body ol p,[data-indent="true"] .post-body ul p{text-indent:0}[data-indent="true"] .post-body li ol,[data-indent="true"] .post-body li ul{padding-left:2em}[data-indent="true"] .post-body dl{text-indent:2em}[data-indent="true"] .post-body dl dd{text-indent:0;margin-left:4em}[data-indent="true"] .post-body dl p{text-indent:0}@media (prefers-color-scheme: light){:root:not([data-theme]){--theme-name: "light";--color-primary:hsl(220, 90%, 56%);--color-primary-h:220;--color-primary-s:90%;--color-primary-l:56%;--color-bg:hsl(0, 0%, 100%);--color-bg-h:0;--color-bg-s:0%;--color-bg-l:100%;--color-contrast-lower:hsl(0, 0%, 95%);--color-contrast-lower-h:0;--color-contrast-lower-s:0%;--color-contrast-lower-l:95%;--color-contrast-low:hsl(240, 1%, 83%);--color-contrast-low-h:240;--color-contrast-low-s:1%;--color-contrast-low-l:83%;--color-contrast-medium:hsl(240, 1%, 48%);--color-contrast-medium-h:240;--color-contrast-medium-s:1%;--color-contrast-medium-l:48%;--color-contrast-high:hsl(240, 4%, 20%);--color-contrast-high-h:240;--color-contrast-high-s:4%;--color-contrast-high-l:20%;--color-contrast-higher:hsl(240, 8%, 12%);--color-contrast-higher-h:240;--color-contrast-higher-s:8%;--color-contrast-higher-l:12%;--chroma-line-numbers-background: #ffffcc;--chroma-line-numbers-color: #7f7f7f;--chroma-keyword-color: #006699;--chroma-name-color: #9999ff;--chroma-attribute-color: #330099;--chroma-literal-color: #cc3300;--chroma-number-color: #ff6600;--chroma-comment-color: #0099ff;--chroma-deleted-color: #ffcccc;--chroma-output-color: #aaaaaa}:root:not([data-theme]) .theme-icon-light{display:inline-block}:root:not([data-theme]) .theme-icon-dark{display:none}:root:not([data-theme]) img{filter:none}}:root{--theme-name: "light";--color-primary:hsl(220, 90%, 56%);--color-primary-h:220;--color-primary-s:90%;--color-primary-l:56%;--color-bg:hsl(0, 0%, 100%);--color-bg-h:0;--color-bg-s:0%;--color-bg-l:100%;--color-contrast-lower:hsl(0, 0%, 95%);--color-contrast-lower-h:0;--color-contrast-lower-s:0%;--color-contrast-lower-l:95%;--color-contrast-low:hsl(240, 1%, 83%);--color-contrast-low-h:240;--color-contrast-low-s:1%;--color-contrast-low-l:83%;--color-contrast-medium:hsl(240, 1%, 48%);--color-contrast-medium-h:240;--color-contrast-medium-s:1%;--color-contrast-medium-l:48%;--color-contrast-high:hsl(240, 4%, 20%);--color-contrast-high-h:240;--color-contrast-high-s:4%;--color-contrast-high-l:20%;--color-contrast-higher:hsl(240, 8%, 12%);--color-contrast-higher-h:240;--color-contrast-higher-s:8%;--color-contrast-higher-l:12%;--chroma-line-numbers-background: #ffffcc;--chroma-line-numbers-color: #7f7f7f;--chroma-keyword-color: #006699;--chroma-name-color: #9999ff;--chroma-attribute-color: #330099;--chroma-literal-color: #cc3300;--chroma-number-color: #ff6600;--chroma-comment-color: #0099ff;--chroma-deleted-color: #ffcccc;--chroma-output-color: #aaaaaa}:root .theme-icon-light{display:inline-block}:root .theme-icon-dark{display:none}:root img{filter:none}@media (prefers-color-scheme: dark){:root:not([data-theme]){--theme-name: "dark";--color-primary:hsl(201, 65%, 62%);--color-primary-h:201;--color-primary-s:65%;--color-primary-l:62%;--color-bg:hsl(231, 14%, 10%);--color-bg-h:231;--color-bg-s:14%;--color-bg-l:10%;--color-contrast-lower:hsl(230, 12%, 18%);--color-contrast-lower-h:230;--color-contrast-lower-s:12%;--color-contrast-lower-l:18%;--color-contrast-low:hsl(240, 2%, 37%);--color-contrast-low-h:240;--color-contrast-low-s:2%;--color-contrast-low-l:37%;--color-contrast-medium:hsl(80, 2%, 69%);--color-contrast-medium-h:80;--color-contrast-medium-s:2%;--color-contrast-medium-l:69%;--color-contrast-high:hsl(69, 9%, 84%);--color-contrast-high-h:69;--color-contrast-high-s:9%;--color-contrast-high-l:84%;--color-contrast-higher:hsl(60, 6%, 90%);--color-contrast-higher-h:60;--color-contrast-higher-s:6%;--color-contrast-higher-l:90%;--chroma-line-numbers-background: #ffffcc;--chroma-line-numbers-color: #7f7f7f;--chroma-keyword-color: #ff79c6;--chroma-name-color: #8be9fd;--chroma-attribute-color: #50fa7b;--chroma-literal-color: #f1fa8c;--chroma-number-color: #bd93f9;--chroma-comment-color: #6272a4;--chroma-deleted-color: #8b080b;--chroma-output-color: #44475a}:root:not([data-theme]) .theme-icon-light{display:none}:root:not([data-theme]) .theme-icon-dark{display:inline-block}:root:not([data-theme]) img{filter:brightness(75%)}}:root[data-theme="dark"]{--theme-name: "dark";--color-primary:hsl(201, 65%, 62%);--color-primary-h:201;--color-primary-s:65%;--color-primary-l:62%;--color-bg:hsl(231, 14%, 10%);--color-bg-h:231;--color-bg-s:14%;--color-bg-l:10%;--color-contrast-lower:hsl(230, 12%, 18%);--color-contrast-lower-h:230;--color-contrast-lower-s:12%;--color-contrast-lower-l:18%;--color-contrast-low:hsl(240, 2%, 37%);--color-contrast-low-h:240;--color-contrast-low-s:2%;--color-contrast-low-l:37%;--color-contrast-medium:hsl(80, 2%, 69%);--color-contrast-medium-h:80;--color-contrast-medium-s:2%;--color-contrast-medium-l:69%;--color-contrast-high:hsl(69, 9%, 84%);--color-contrast-high-h:69;--color-contrast-high-s:9%;--color-contrast-high-l:84%;--color-contrast-higher:hsl(60, 6%, 90%);--color-contrast-higher-h:60;--color-contrast-higher-s:6%;--color-contrast-higher-l:90%;--chroma-line-numbers-background: #ffffcc;--chroma-line-numbers-color: #7f7f7f;--chroma-keyword-color: #ff79c6;--chroma-name-color: #8be9fd;--chroma-attribute-color: #50fa7b;--chroma-literal-color: #f1fa8c;--chroma-number-color: #bd93f9;--chroma-comment-color: #6272a4;--chroma-deleted-color: #8b080b;--chroma-output-color: #44475a}:root[data-theme="dark"] .theme-icon-light{display:none}:root[data-theme="dark"] .theme-icon-dark{display:inline-block}:root[data-theme="dark"] img{filter:brightness(75%)}#theme-switcher{color:var(--color-contrast-medium);transition:color .5s;z-index:4}#theme-switcher:hover{color:var(--color-primary)}#theme-switcher .icon{margin-right:0 !important}.header{z-index:3}.header{position:fixed;width:100vw}.header-wrapper{padding:1em 0;-webkit-backdrop-filter:saturate(180%) blur(1em);backdrop-filter:saturate(180%) blur(1em);background:linear-gradient(90deg, rgba(247,149,51,0.101961) 0, rgba(243,112,85,0.101961) 15%, rgba(239,78,123,0.101961) 30%, rgba(161,102,171,0.101961) 44%, rgba(80,115,184,0.101961) 58%, rgba(16,152,173,0.101961) 72%, rgba(7,179,155,0.101961) 86%, rgba(109,186,130,0.101961) 100%);transition:background .5s}.header-inner{display:flex;justify-content:space-between;align-items:center;margin:0 auto;max-width:36em}.header-inner.list{max-width:36em}.site-brand{margin-right:1em}.brand{font-size:1em;color:var(--color-contrast-high);text-decoration:none}.brand:hover{color:var(--color-contrast-high)}:root{--header-height: calc( - max( - /* brand */ - 25.888px, - /* menu */ - 19.2px /* {.nav font-size} * {.menu line-height} */ - ) - /* .header-wrapper top+bottom margin */ - + 32px - )}*[id]{scroll-margin-top:var(--header-height)}#nav-toggle{display:none}.nav-toggle{display:none;position:absolute;top:1em;right:1em;margin-right:1em;width:1em;height:1em;cursor:pointer}.nav-toggle-inner{padding:1em;display:inline-block}.nav-toggle span{display:block;position:absolute;height:0.1em;width:1em;background-color:var(--color-contrast-high);transition:all .5s}.nav-toggle span:nth-child(1){top:0.4em}.nav-toggle span:nth-child(2){top:0.7em}.nav-toggle span:nth-child(3){top:1em}.nav-toggle.open span:nth-child(1){top:75%;transform:rotate(225deg)}.nav-toggle.open span:nth-child(2){width:0;opacity:0;transform:rotate(-135deg)}.nav-toggle.open span:nth-child(3){top:75%;transform:rotate(-45deg)}.nav-curtain{height:100vh;width:100vw;-webkit-backdrop-filter:saturate(180%) blur(1em);backdrop-filter:saturate(180%) blur(1em);background:linear-gradient(90deg, rgba(247,149,51,0.101961) 0, rgba(243,112,85,0.101961) 15%, rgba(239,78,123,0.101961) 30%, rgba(161,102,171,0.101961) 44%, rgba(80,115,184,0.101961) 58%, rgba(16,152,173,0.101961) 72%, rgba(7,179,155,0.101961) 86%, rgba(109,186,130,0.101961) 100%) rgba(0,0,0,0.5)}.nav{z-index:3;position:relative}.menu{padding:0;margin:0;list-style:none;line-height:1.5;font-weight:500}.menu-item{display:inline-block}.menu-item a{color:var(--color-contrast-medium)}.menu-item a:hover{color:var(--color-primary)}.active a{color:var(--color-primary)}.nav{text-align:right;font-size:80%}.menu-item{margin-left:0.5em}.menu-item .icon{margin:0 0.3em 0.2em 0}.list .main-inner{width:36em}.list-title{text-align:center}.list ul{list-style:none;padding:0}.list-item-title{flex:1}.list-item-time{text-align:right;margin-left:1em}.list-item{line-height:2;position:relative;transition:border .5s;border-bottom:1px dashed var(--color-contrast-low);margin-top:1em;padding-bottom:0.5em;display:flex;align-items:baseline}.list-item:hover{border-bottom-color:var(--color-primary)}.list-item:hover ::before{background:var(--color-primary)}.list-item ::before{content:" ";position:absolute;left:0.618em;top:0.618em;width:5.33333333px;height:5.33333333px;background:var(--color-contrast-low);border-radius:50%;border:1px solid var(--color-bg);transition:background .5s;font-size:1rem}.list-item-title{margin:0 0.618em 0 2em;font-size:1.2em;line-height:1.5}.list-item-time{margin:0 0.618em 0 2em;color:var(--color-contrast-medium);line-height:1.5}.list-read-more{margin-top:1em;font-size:1.2em;line-height:1.5}.list-year{display:flex;justify-content:space-between;align-items:baseline}.term-count{color:var(--color-contrast-medium);font-size:0.7em}.single .main-inner{width:36em}.post-title{text-align:center}.post-subtitle{font-size:1.8em;text-align:center;font-weight:700;margin-top:-0.618em}.post-description{text-align:center;margin:1rem 0;font-size:90%}.post-body{margin-top:5em !important}.post-body a{text-decoration:underline;text-decoration-color:var(--color-contrast-low)}.post-body a:hover{text-decoration-color:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.5)}.post p{margin:1em 0;line-height:2}.post img{display:block;margin:2em auto;max-width:100%;border:1px solid var(--color-contrast-lower);clear:both}.post video{display:block;max-width:100%;margin:2em auto;clear:both}.post sup{font-size:70%;vertical-align:super}.post sup a{text-decoration:none}.post ol,.post ul{margin:0;padding-left:2em;line-height:2}.post hr{border:none;margin:2.427em 0 1.5em;text-align:center}.post hr::after{content:"···";letter-spacing:2em;padding-left:2em}blockquote{margin:2em 0;padding-left:1em;color:var(--color-contrast-medium);border-left:3px solid var(--color-contrast-low)}blockquote a{color:var(--color-contrast-medium)}blockquote a:hover{color:var(--color-primary)}.drop-cap{float:left;font-size:48px;margin-right:16px;margin-top:8px;line-height:32px}.caption{display:block;text-align:center;margin:-1em 0 0;font-size:90%;color:var(--color-contrast-medium)}.contents{margin-top:5em}.contents ol,.contents ul{list-style:none}ol.toc,ul.toc{padding:0;overflow:auto hidden;white-space:nowrap}.footnotes{font-size:90%;margin-top:5rem}.footnotes hr{margin:0;height:1px;border:none;background-color:var(--color-contrast-medium)}.footnotes hr::after{content:none}.footnotes ol{margin:1.618rem 0 0 !important;padding:0 1rem 0 2rem !important}.footnote-icon{fill:hsla(var(--color-contrast-high-h), var(--color-contrast-high-s), var(--color-contrast-high-l), 0.5);transition:fill .5s;margin-bottom:0.3em}.footnote-icon:hover{fill:var(--color-primary)}.anchor-link{position:absolute;transform:translate(-150%)}.anchor-icon{width:0.75em;height:0.75em;vertical-align:baseline}:root{--anchor-opacity: 0}.anchor-link{opacity:var(--anchor-opacity);transition:all .25s}.post h1:hover,.post h2:hover,.post h3:hover,.post h4:hover,.post h5:hover,.post h6:hover,.post .anchor-link:hover{--anchor-opacity: 1}.table-container{margin:2em 0;overflow-x:auto}table{width:100%;border-collapse:collapse;border-spacing:0;border-color:var(--color-contrast-lower)}th{font-weight:700}th,td{font-size:0.9em;padding:0.4em;border:1px solid var(--color-contrast-lower)}table>tbody>tr:nth-of-type(odd){background-color:hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), 0.5)}table>tbody>tr:hover{background-color:var(--color-contrast-lower)}dt{font-weight:700}dd{margin-left:2em}code{padding:2px 4px;background-color:hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), 0.5);font-size:80%}pre{overflow:auto;overflow-wrap:normal;word-wrap:normal;font-size:0.8rem;margin:2rem 0;padding:1em;line-height:1.618;background-color:hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), 0.5)}pre code{background-color:unset;font-size:0.8rem;padding:0}pre{max-height:40em}.copy-button{position:absolute;top:0;right:0;border:0;font-size:inherit;color:var(--color-bg);background-color:hsla(var(--color-contrast-medium-h), var(--color-contrast-medium-s), var(--color-contrast-medium-l), 0.5);transition:all .5s;cursor:pointer}.copy-button:hover{background-color:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.5)}.copy-button{visibility:hidden;opacity:0}.katex-display,mjx-container[jax="CHTML"][display="true"]{overflow:auto hidden;text-indent:0}.footer{position:absolute;bottom:0;width:100%;font-size:90%;color:hsla(var(--color-contrast-medium-h), var(--color-contrast-medium-s), var(--color-contrast-medium-l), 0.8)}.footer a{color:hsla(var(--color-contrast-medium-h), var(--color-contrast-medium-s), var(--color-contrast-medium-l), 0.8)}.footer a:hover{color:var(--color-primary)}.footer-inner{padding:1em;text-align:center}.footer-icon{margin:0 0.25em 0.3em}.footer-icon{fill:#f06292}@keyframes heartbeat{0%,100%{transform:scale(1)}10%,30%{transform:scale(0.9)}20%,40%,50%,60%,70%,80%{transform:scale(1.1)}}.footer-icon{animation:heartbeat 1.33s ease-in-out infinite}.post-copyright{margin:0;list-style:none;margin-top:5em !important;padding:0.5em 1em;background-color:hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), 0.5);border-left:3px solid hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.5);line-height:2}.copyright-item{line-height:1.5;margin:0.5em 0}.copyright-item-text{font-weight:500}.updated-badge-container{margin-top:5em;text-align:center}.updated-badge-left{fill:var(--color-contrast-low)}.updated-badge-right{fill:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.5)}.post-tags{margin-top:5rem;text-align:center;font-size:90%}.post-tags-link{color:hsla(var(--color-contrast-medium-h), var(--color-contrast-medium-s), var(--color-contrast-medium-l), 0.9);margin:0 0.5em;line-height:2;display:inline-block}.tag-icon{margin-right:0.3em;font-size:80%}.post-nav{list-style:none;padding:0;display:flex;justify-content:space-between;border-top:1px solid var(--color-contrast-lower);font-weight:700;margin-top:5em;padding-top:0.618em}.post-nav-prev{margin-right:auto;max-width:42%}.post-nav-next{margin-left:auto;text-align:right;max-width:42%}.back-to-top{position:fixed;right:0;z-index:1}.back-to-top a{display:block;padding:1em;color:var(--color-contrast-medium)}.back-to-top a:hover{color:var(--color-primary)}.back-to-top{bottom:-3.6em;transition:bottom 0.3s ease-in-out}.back-to-top.show{bottom:0}.highlight{font-size:0.8rem;margin:2rem 0}.highlight pre{margin:0 !important;max-height:unset}.highlight .lntd pre{background-color:unset;overflow:visible}.highlight table>tbody>tr:nth-of-type(odd){background-color:inherit}.highlight table>tbody>tr:hover{background-color:inherit}span.lnt{user-select:none;display:block;margin-right:-1em !important;padding:0 !important;text-align:right}.chroma{color:var(--color-contrast-high);background-color:hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), 0.5)}.lntable,.highlight>pre{max-height:40em}.chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}.chroma .lntable{border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block}.chroma .hl{display:block;width:100%;background-color:var(--chroma-line-numbers-background)}.chroma .lnt{margin-right:0.4em;padding:0 0.4em 0 0.4em;color:var(--chroma-line-numbers-color)}.chroma .ln{margin-right:0.4em;padding:0 0.4em 0 0.4em;color:var(--chroma-line-numbers-color)}.chroma .k{color:var(--chroma-keyword-color)}.chroma .kc{color:var(--chroma-keyword-color)}.chroma .kd{color:var(--chroma-declaration-color);font-style:italic}.chroma .kn{color:var(--chroma-name-color)}.chroma .kp{color:var(--chroma-keyword-color)}.chroma .kr{color:var(--chroma-keyword-color)}.chroma .kt{color:var(--chroma-name-color)}.chroma .na{color:var(--chroma-attribute-color)}.chroma .nb{color:var(--chroma-name-color);font-style:italic}.chroma .nc{color:var(--chroma-attribute-color)}.chroma .nf{color:var(--chroma-attribute-color)}.chroma .nl{color:var(--chroma-name-color);font-style:italic}.chroma .nt{color:var(--chroma-keyword-color)}.chroma .nv{color:var(--chroma-name-color);font-style:italic}.chroma .vc{color:var(--chroma-name-color);font-style:italic}.chroma .vg{color:var(--chroma-name-color);font-style:italic}.chroma .vi{color:var(--chroma-name-color);font-style:italic}.chroma .s{color:var(--chroma-literal-color)}.chroma .sa{color:var(--chroma-literal-color)}.chroma .sb{color:var(--chroma-literal-color)}.chroma .sc{color:var(--chroma-literal-color)}.chroma .dl{color:var(--chroma-literal-color)}.chroma .sd{color:var(--chroma-literal-color)}.chroma .s2{color:var(--chroma-literal-color)}.chroma .se{color:var(--chroma-literal-color)}.chroma .sh{color:var(--chroma-literal-color)}.chroma .si{color:var(--chroma-literal-color)}.chroma .sx{color:var(--chroma-literal-color)}.chroma .sr{color:var(--chroma-literal-color)}.chroma .s1{color:var(--chroma-literal-color)}.chroma .ss{color:var(--chroma-literal-color)}.chroma .m{color:var(--chroma-number-color)}.chroma .mb{color:var(--chroma-number-color)}.chroma .mf{color:var(--chroma-number-color)}.chroma .mh{color:var(--chroma-number-color)}.chroma .mi{color:var(--chroma-number-color)}.chroma .il{color:var(--chroma-number-color)}.chroma .mo{color:var(--chroma-number-color)}.chroma .o{color:var(--chroma-keyword-color)}.chroma .ow{color:var(--chroma-keyword-color)}.chroma .c{color:var(--chroma-comment-color)}.chroma .ch{color:var(--chroma-comment-color)}.chroma .cm{color:var(--chroma-comment-color)}.chroma .c1{color:var(--chroma-comment-color)}.chroma .cs{color:var(--chroma-comment-color)}.chroma .cp{color:var(--chroma-keyword-color)}.chroma .cpf{color:var(--chroma-keyword-color)}.chroma .gd{color:var(--chroma-deleted-color)}.chroma .ge{text-decoration:underline}.chroma .gh{font-weight:bold}.chroma .gi{font-weight:bold}.chroma .go{color:var(--chroma-output-color)}.chroma .gu{font-weight:bold}.chroma .gl{text-decoration:underline}.socials{padding:0;margin:0;list-style:none}.socials-item{display:inline-block;margin:0.5em;border-radius:50%;background-color:var(--color-contrast-medium);transition:background-color .5s}.socials-item:hover{background-color:var(--color-primary)}.social-icon{fill:var(--color-bg);padding:0.5em}.home{text-align:center}.home .poetry{font-size:1em;width:auto;max-width:26em;margin:0 auto;padding:5em 1em 10em}.home .links{position:absolute;bottom:10%;left:5%;right:5%;font-size:1.5em}.home .links-item{padding:1em;display:inline-block}.home .life{color:#f37055}.home .tech{color:#a166ab}.home .about{color:#07b39b}.tree{overflow:auto hidden;white-space:nowrap}.tree ul{padding-left:2.4em}.tree>ul{padding:0}.list-categories>li{position:relative}.list-categories>li::before{content:" ";position:absolute;top:2.4em;left:0.1em;width:0.2em;height:calc(100% - 2.8em);background:var(--color-contrast-lower)}.category-item{color:var(--color-primary);font-size:1.2em}.category-item:hover{color:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.75)}.category-count{color:var(--color-contrast-medium)}.category-post:hover{color:var(--color-contrast-medium)}.tag-cloud{text-align:center}.tag-cloud-item{margin:0.5rem;display:inline-block}.fof::before{background-image:url();background-repeat:no-repeat;background-size:cover;background-position:50% 50%;content:" ";position:fixed;width:100%;height:100%;top:0;left:0;z-index:1}.fof .main-inner{background:rgba(0,0,0,0.25);min-height:100%;min-width:100%;position:absolute;z-index:3}.fof video{position:fixed;top:50%;left:50%;min-width:100%;min-height:100%;width:auto;height:auto;z-index:2;transform:translateX(-50%) translateY(-50%)}.fof h1{font-size:3rem;text-transform:uppercase;letter-spacing:0.3rem;text-align:center;top:15%;left:5%;right:5%;position:absolute;color:#fff;margin:0.67em 0}.fof .fof-footer{font-size:2rem;position:absolute;bottom:15%;left:10%;right:10%;text-align:center}.fof a{color:#eee}.fof a:hover{color:#fff}@media only screen and (max-device-width: 1024px){.fof #bgvid{display:none}}.medium-zoom-overlay,.medium-zoom-image--opened{z-index:5}:root{--max-width: 656px}@media (max-width: 656px){.main-inner{width:auto !important}.anchor-link{position:relative;transform:none;float:right}#back-to-top{display:none}.header-inner{width:100%}.site-brand{margin-left:1em}.header-inner{display:block;margin:0;max-width:none}.nav-toggle{display:block}.nav{display:none;text-align:center;margin:2em 0}.menu{display:grid;grid-template-columns:1fr 1fr 1fr;align-items:center}.menu-item{margin:0;padding:1em}.menu-item .icon{margin:0}.menu-item-name{display:block}.header.open .nav{display:block;animation:appear .5s;animation-iteration-count:1;animation-fill-mode:forwards}@keyframes appear{0%{opacity:0;height:0;margin:0;transform:scaleY(0);transform-origin:top}100%{opacity:1;height:9em;margin:2em 0;transform:scaleY(1);transform-origin:top}}.header.open .nav-curtain{animation:appearCurtain .5s;animation-iteration-count:1;animation-fill-mode:forwards}@keyframes appearCurtain{0%{visibility:hidden;opacity:0}100%{visibility:visible;opacity:1}}.header.fade .nav{display:block;animation:fade .5s;animation-iteration-count:1;animation-fill-mode:forwards}@keyframes fade{0%{opacity:1;height:9em;margin:2em 0;transform:scaleY(1);transform-origin:top}100%{opacity:0;height:0;margin:0;transform:scaleY(0);transform-origin:top}}.header.fade .nav-curtain{animation:fadeCurtain .5s;animation-iteration-count:1;animation-fill-mode:forwards}@keyframes fadeCurtain{0%{visibility:visible;opacity:1}100%{visibility:hidden;opacity:0}}#langs li{width:auto}}[data-small-caps="true"] .post-body h1,[data-small-caps="true"] .post-body h2,[data-small-caps="true"] .post-body h3,[data-small-caps="true"] .post-body h4,[data-small-caps="true"] .post-body h5,[data-small-caps="true"] .post-body h6{font-variant:small-caps}[data-small-caps="true"] .contents-title{font-variant:small-caps}[data-align="justify"] .post-body p,[data-align="justify"] .post-body li,[data-align="justify"] .post-body dd{text-align:justify;text-justify:distribute}[data-align="justify"] .footnotes a{word-break:break-all}[data-align="center"] .post-body p{text-align:center}[data-type="poetry"] .post-body{display:table;margin:0 auto}[data-type="poetry"] .post-body p{margin:0 0 1em}[data-type="poetry"] .post-body>p:first-child img,[data-type="poetry"] .post-body>p:first-child video{margin-top:0}[data-type="poetry"] .post-body>blockquote:first-child{margin-top:0}[data-type="poetry"] .post-body>blockquote:last-child{margin-bottom:0}[data-type="poetry"] .post-body>p:last-child{margin:0}[data-type="poetry"] .post-body>p:last-child img,[data-type="poetry"] .post-body>p:last-child video{margin-bottom:0}[data-type="poetry"] .post-body>p:last-child .caption{margin:1em 0 0}[data-type="poetry"] section.footnotes>ol>li:last-child>p:last-child{margin:0}[data-toc-num="true"] .contents ol{counter-reset:item}[data-toc-num="true"] .contents ol li::before{counter-increment:item;margin-right:0.5em}[data-toc-num="true"] .contents>ol>li::before{content:counters(item, ".") "."}[data-toc-num="true"] .contents li>ol>li::before{content:counters(item, ".")}@supports not ((backdrop-filter: none) or (-webkit-backdrop-filter: none)){.header-wrapper{background-color:var(--color-bg)}} diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index 9f6cb23..0000000 Binary files a/public/favicon.ico and /dev/null differ diff --git a/public/fonts/glyph-correction.eot b/public/fonts/glyph-correction.eot deleted file mode 100644 index 1750ee5..0000000 Binary files a/public/fonts/glyph-correction.eot and /dev/null differ diff --git a/public/fonts/glyph-correction.ttf b/public/fonts/glyph-correction.ttf deleted file mode 100644 index e01d2e3..0000000 Binary files a/public/fonts/glyph-correction.ttf and /dev/null differ diff --git a/public/fonts/glyph-correction.woff b/public/fonts/glyph-correction.woff deleted file mode 100644 index 7e39b24..0000000 Binary files a/public/fonts/glyph-correction.woff and /dev/null differ diff --git a/public/fonts/glyph-correction.woff2 b/public/fonts/glyph-correction.woff2 deleted file mode 100644 index 4513ec1..0000000 Binary files a/public/fonts/glyph-correction.woff2 and /dev/null differ diff --git a/public/icons/android-chrome-512x512.png b/public/icons/android-chrome-512x512.png deleted file mode 100644 index 8917630..0000000 Binary files a/public/icons/android-chrome-512x512.png and /dev/null differ diff --git a/public/icons/apple-touch-icon.png b/public/icons/apple-touch-icon.png deleted file mode 100644 index e30c038..0000000 Binary files a/public/icons/apple-touch-icon.png and /dev/null differ diff --git a/public/icons/mstile-150x150.png b/public/icons/mstile-150x150.png deleted file mode 100644 index cb3d97b..0000000 Binary files a/public/icons/mstile-150x150.png and /dev/null differ diff --git a/public/icons/safari-pinned-tab.svg b/public/icons/safari-pinned-tab.svg deleted file mode 100644 index 2b63cdc..0000000 --- a/public/icons/safari-pinned-tab.svg +++ /dev/null @@ -1,1176 +0,0 @@ - - - - -Created by potrace 1.14, written by Peter Selinger 2001-2017 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/images/11LK4(_2S}Q~OIDMGM6$XNK.jpg b/public/images/11LK4(_2S}Q~OIDMGM6$XNK.jpg deleted file mode 100644 index 40937f4..0000000 Binary files a/public/images/11LK4(_2S}Q~OIDMGM6$XNK.jpg and /dev/null differ diff --git a/public/images/3D_texture_and_volume.png b/public/images/3D_texture_and_volume.png deleted file mode 100644 index ac1f1a5..0000000 Binary files a/public/images/3D_texture_and_volume.png and /dev/null differ diff --git a/public/images/3I~K5PRW$Y5JLF3}RC@RE0P.png b/public/images/3I~K5PRW$Y5JLF3}RC@RE0P.png deleted file mode 100644 index e8ea612..0000000 Binary files a/public/images/3I~K5PRW$Y5JLF3}RC@RE0P.png and /dev/null differ diff --git a/public/images/3O_1NAGAMER%[EP6T91$LBO.png b/public/images/3O_1NAGAMER%[EP6T91$LBO.png deleted file mode 100644 index 55bf5bd..0000000 Binary files a/public/images/3O_1NAGAMER%[EP6T91$LBO.png and /dev/null differ diff --git a/public/images/60000_fur_fibers_hamster.png b/public/images/60000_fur_fibers_hamster.png deleted file mode 100644 index baf7016..0000000 Binary files a/public/images/60000_fur_fibers_hamster.png and /dev/null differ diff --git a/public/images/Algebraic_Surfaces.png b/public/images/Algebraic_Surfaces.png deleted file mode 100644 index de8e46c..0000000 Binary files a/public/images/Algebraic_Surfaces.png and /dev/null differ diff --git a/public/images/Anisotropic_filtering.png b/public/images/Anisotropic_filtering.png deleted file mode 100644 index fc1d174..0000000 Binary files a/public/images/Anisotropic_filtering.png and /dev/null differ diff --git a/public/images/BRDF_define.png b/public/images/BRDF_define.png deleted file mode 100644 index 212f4c6..0000000 Binary files a/public/images/BRDF_define.png and /dev/null differ diff --git a/public/images/BRDF_over_a_pixel.png b/public/images/BRDF_over_a_pixel.png deleted file mode 100644 index a138c49..0000000 Binary files a/public/images/BRDF_over_a_pixel.png and /dev/null differ diff --git a/public/images/BRDF_vs_BSSRDF.png b/public/images/BRDF_vs_BSSRDF.png deleted file mode 100644 index 1fb3cec..0000000 Binary files a/public/images/BRDF_vs_BSSRDF.png and /dev/null differ diff --git a/public/images/BSP-Tree.png b/public/images/BSP-Tree.png deleted file mode 100644 index 3fd78ea..0000000 Binary files a/public/images/BSP-Tree.png and /dev/null differ diff --git a/public/images/BSSRDF_application.png b/public/images/BSSRDF_application.png deleted file mode 100644 index 5cbf242..0000000 Binary files a/public/images/BSSRDF_application.png and /dev/null differ diff --git a/public/images/BVH_Traversal.png b/public/images/BVH_Traversal.png deleted file mode 100644 index abc0c4c..0000000 Binary files a/public/images/BVH_Traversal.png and /dev/null differ diff --git a/public/images/BVH_build_step1.png b/public/images/BVH_build_step1.png deleted file mode 100644 index 5a5b71e..0000000 Binary files a/public/images/BVH_build_step1.png and /dev/null differ diff --git a/public/images/BVH_build_step2.png b/public/images/BVH_build_step2.png deleted file mode 100644 index a18d52e..0000000 Binary files a/public/images/BVH_build_step2.png and /dev/null differ diff --git a/public/images/BVH_build_step3.png b/public/images/BVH_build_step3.png deleted file mode 100644 index 957f6b0..0000000 Binary files a/public/images/BVH_build_step3.png and /dev/null differ diff --git a/public/images/BVH_build_step4.png b/public/images/BVH_build_step4.png deleted file mode 100644 index 2ba3981..0000000 Binary files a/public/images/BVH_build_step4.png and /dev/null differ diff --git a/public/images/BoundingBox.png b/public/images/BoundingBox.png deleted file mode 100644 index c329d88..0000000 Binary files a/public/images/BoundingBox.png and /dev/null differ diff --git a/public/images/Cache_-52135db77ba24310..jpg b/public/images/Cache_-52135db77ba24310..jpg deleted file mode 100644 index 11f6156..0000000 Binary files a/public/images/Cache_-52135db77ba24310..jpg and /dev/null differ diff --git a/public/images/Cache_-82fe908548173bf..jpg b/public/images/Cache_-82fe908548173bf..jpg deleted file mode 100644 index ceca510..0000000 Binary files a/public/images/Cache_-82fe908548173bf..jpg and /dev/null differ diff --git a/public/images/Catmull-Clark_Vertex_Update_Rules.png b/public/images/Catmull-Clark_Vertex_Update_Rules.png deleted file mode 100644 index 6c0b5d3..0000000 Binary files a/public/images/Catmull-Clark_Vertex_Update_Rules.png and /dev/null differ diff --git a/public/images/Collapsing_An_Edge.png b/public/images/Collapsing_An_Edge.png deleted file mode 100644 index 3027174..0000000 Binary files a/public/images/Collapsing_An_Edge.png and /dev/null differ diff --git a/public/images/Constructive_Solid_Geometry.png b/public/images/Constructive_Solid_Geometry.png deleted file mode 100644 index 2454c14..0000000 Binary files a/public/images/Constructive_Solid_Geometry.png and /dev/null differ diff --git a/public/images/Continuity_Piecewise_Bezier_step1.png b/public/images/Continuity_Piecewise_Bezier_step1.png deleted file mode 100644 index 632e7d8..0000000 Binary files a/public/images/Continuity_Piecewise_Bezier_step1.png and /dev/null differ diff --git a/public/images/Continuity_Piecewise_Bezier_step2.png b/public/images/Continuity_Piecewise_Bezier_step2.png deleted file mode 100644 index 9931932..0000000 Binary files a/public/images/Continuity_Piecewise_Bezier_step2.png and /dev/null differ diff --git a/public/images/Continuity_Piecewise_Bezier_step3.png b/public/images/Continuity_Piecewise_Bezier_step3.png deleted file mode 100644 index c2e7288..0000000 Binary files a/public/images/Continuity_Piecewise_Bezier_step3.png and /dev/null differ diff --git a/public/images/Cube_Map.png b/public/images/Cube_Map.png deleted file mode 100644 index e8ac793..0000000 Binary files a/public/images/Cube_Map.png and /dev/null differ diff --git a/public/images/Cubic_Bezier_Basis_Functions.png b/public/images/Cubic_Bezier_Basis_Functions.png deleted file mode 100644 index bc10f54..0000000 Binary files a/public/images/Cubic_Bezier_Basis_Functions.png and /dev/null differ diff --git a/public/images/DOF_demonstration_fyi.png b/public/images/DOF_demonstration_fyi.png deleted file mode 100644 index e2cb578..0000000 Binary files a/public/images/DOF_demonstration_fyi.png and /dev/null differ diff --git a/public/images/David_Baraff.png b/public/images/David_Baraff.png deleted file mode 100644 index 6e73479..0000000 Binary files a/public/images/David_Baraff.png and /dev/null differ diff --git a/public/images/Defining_Bezier_Curve_Tangents.png b/public/images/Defining_Bezier_Curve_Tangents.png deleted file mode 100644 index 157a48f..0000000 Binary files a/public/images/Defining_Bezier_Curve_Tangents.png and /dev/null differ diff --git a/public/images/Demon_Piecewise_Cubic_Bezier_Curve.png b/public/images/Demon_Piecewise_Cubic_Bezier_Curve.png deleted file mode 100644 index b2eb6b0..0000000 Binary files a/public/images/Demon_Piecewise_Cubic_Bezier_Curve.png and /dev/null differ diff --git a/public/images/Depth_map.png b/public/images/Depth_map.png deleted file mode 100644 index 9e768a2..0000000 Binary files a/public/images/Depth_map.png and /dev/null differ diff --git a/public/images/Direct_illumination_eg.png b/public/images/Direct_illumination_eg.png deleted file mode 100644 index 262e34d..0000000 Binary files a/public/images/Direct_illumination_eg.png and /dev/null differ diff --git a/public/images/Displacement_mapping.png b/public/images/Displacement_mapping.png deleted file mode 100644 index b53d13d..0000000 Binary files a/public/images/Displacement_mapping.png and /dev/null differ diff --git a/public/images/EQAA_color_table.png b/public/images/EQAA_color_table.png deleted file mode 100644 index 9b3d597..0000000 Binary files a/public/images/EQAA_color_table.png and /dev/null differ diff --git a/public/images/Environment_Map.png b/public/images/Environment_Map.png deleted file mode 100644 index 5c53d24..0000000 Binary files a/public/images/Environment_Map.png and /dev/null differ diff --git a/public/images/Environmental_Lighting.png b/public/images/Environmental_Lighting.png deleted file mode 100644 index 6d38b2d..0000000 Binary files a/public/images/Environmental_Lighting.png and /dev/null differ diff --git a/public/images/Exiting_radiance_define.png b/public/images/Exiting_radiance_define.png deleted file mode 100644 index dead98c..0000000 Binary files a/public/images/Exiting_radiance_define.png and /dev/null differ diff --git a/public/images/F-Number_exposure_levels.png b/public/images/F-Number_exposure_levels.png deleted file mode 100644 index 92c52cc..0000000 Binary files a/public/images/F-Number_exposure_levels.png and /dev/null differ diff --git a/public/images/GSMEY[N0%25}Z]G)(XY[%7Q.png b/public/images/GSMEY[N0%25}Z]G)(XY[%7Q.png deleted file mode 100644 index b99ab95..0000000 Binary files a/public/images/GSMEY[N0%25}Z]G)(XY[%7Q.png and /dev/null differ diff --git a/public/images/Gourand_shading.png b/public/images/Gourand_shading.png deleted file mode 100644 index 8e17fad..0000000 Binary files a/public/images/Gourand_shading.png and /dev/null differ diff --git a/public/images/Halton_sequence.png b/public/images/Halton_sequence.png deleted file mode 100644 index 0f88b90..0000000 Binary files a/public/images/Halton_sequence.png and /dev/null differ diff --git a/public/images/High_and_low_spp_result.png b/public/images/High_and_low_spp_result.png deleted file mode 100644 index 96cad75..0000000 Binary files a/public/images/High_and_low_spp_result.png and /dev/null differ diff --git a/public/images/ISO_gain_vs_noise_in_canon.png b/public/images/ISO_gain_vs_noise_in_canon.png deleted file mode 100644 index 3bbc936..0000000 Binary files a/public/images/ISO_gain_vs_noise_in_canon.png and /dev/null differ diff --git a/public/images/Ideal_feflective_material.png b/public/images/Ideal_feflective_material.png deleted file mode 100644 index e12080c..0000000 Binary files a/public/images/Ideal_feflective_material.png and /dev/null differ diff --git a/public/images/Incident_radiance_define.png b/public/images/Incident_radiance_define.png deleted file mode 100644 index 3fbd492..0000000 Binary files a/public/images/Incident_radiance_define.png and /dev/null differ diff --git a/public/images/IncrementalTriangleTraversal.png b/public/images/IncrementalTriangleTraversal.png deleted file mode 100644 index 80fbb3a..0000000 Binary files a/public/images/IncrementalTriangleTraversal.png and /dev/null differ diff --git a/public/images/Irradiance_Fallof.png b/public/images/Irradiance_Fallof.png deleted file mode 100644 index bd29ae8..0000000 Binary files a/public/images/Irradiance_Fallof.png and /dev/null differ diff --git a/public/images/Irradiance_define.png b/public/images/Irradiance_define.png deleted file mode 100644 index 36bf9b5..0000000 Binary files a/public/images/Irradiance_define.png and /dev/null differ diff --git a/public/images/Irradiance_vs_radiance.png b/public/images/Irradiance_vs_radiance.png deleted file mode 100644 index 4f80a45..0000000 Binary files a/public/images/Irradiance_vs_radiance.png and /dev/null differ diff --git a/public/images/Isotropic_Point_source.png b/public/images/Isotropic_Point_source.png deleted file mode 100644 index 27ffa20..0000000 Binary files a/public/images/Isotropic_Point_source.png and /dev/null differ diff --git a/public/images/KD-Tree.png b/public/images/KD-Tree.png deleted file mode 100644 index fcb85a6..0000000 Binary files a/public/images/KD-Tree.png and /dev/null differ diff --git a/public/images/KD-Tree_Pre-Processing.png b/public/images/KD-Tree_Pre-Processing.png deleted file mode 100644 index 570e550..0000000 Binary files a/public/images/KD-Tree_Pre-Processing.png and /dev/null differ diff --git a/public/images/Lambert_cosine_law_irradiance.png b/public/images/Lambert_cosine_law_irradiance.png deleted file mode 100644 index f876767..0000000 Binary files a/public/images/Lambert_cosine_law_irradiance.png and /dev/null differ diff --git a/public/images/Level_Set_grid.png b/public/images/Level_Set_grid.png deleted file mode 100644 index ee1c868..0000000 Binary files a/public/images/Level_Set_grid.png and /dev/null differ diff --git a/public/images/MLT_caculate.png b/public/images/MLT_caculate.png deleted file mode 100644 index 77b64e6..0000000 Binary files a/public/images/MLT_caculate.png and /dev/null differ diff --git a/public/images/MLT_cons.png b/public/images/MLT_cons.png deleted file mode 100644 index a633555..0000000 Binary files a/public/images/MLT_cons.png and /dev/null differ diff --git a/public/images/MLT_pros.png b/public/images/MLT_pros.png deleted file mode 100644 index 541d389..0000000 Binary files a/public/images/MLT_pros.png and /dev/null differ diff --git a/public/images/MSAA.png b/public/images/MSAA.png deleted file mode 100644 index 2546528..0000000 Binary files a/public/images/MSAA.png and /dev/null differ diff --git a/public/images/MSAA_color.png b/public/images/MSAA_color.png deleted file mode 100644 index a51eeae..0000000 Binary files a/public/images/MSAA_color.png and /dev/null differ diff --git a/public/images/MSAA_sample.png b/public/images/MSAA_sample.png deleted file mode 100644 index 7dd1a49..0000000 Binary files a/public/images/MSAA_sample.png and /dev/null differ diff --git a/public/images/Möller_Trumbore_Algorithm.png b/public/images/Möller_Trumbore_Algorithm.png deleted file mode 100644 index 7cc7108..0000000 Binary files a/public/images/Möller_Trumbore_Algorithm.png and /dev/null differ diff --git a/public/images/Observations_1.png b/public/images/Observations_1.png deleted file mode 100644 index 2d2eb01..0000000 Binary files a/public/images/Observations_1.png and /dev/null differ diff --git a/public/images/Observations_2.png b/public/images/Observations_2.png deleted file mode 100644 index a183636..0000000 Binary files a/public/images/Observations_2.png and /dev/null differ diff --git a/public/images/Oct-Tree.png b/public/images/Oct-Tree.png deleted file mode 100644 index 3c0f0c4..0000000 Binary files a/public/images/Oct-Tree.png and /dev/null differ diff --git a/public/images/Procedural_noise_and_Solid.png b/public/images/Procedural_noise_and_Solid.png deleted file mode 100644 index 70d351e..0000000 Binary files a/public/images/Procedural_noise_and_Solid.png and /dev/null differ diff --git a/public/images/Provide_precomputed_shading.png b/public/images/Provide_precomputed_shading.png deleted file mode 100644 index c8e7c2e..0000000 Binary files a/public/images/Provide_precomputed_shading.png and /dev/null differ diff --git a/public/images/QQ图片20211228095814.jpg b/public/images/QQ图片20211228095814.jpg deleted file mode 100644 index 71ed83d..0000000 Binary files a/public/images/QQ图片20211228095814.jpg and /dev/null differ diff --git a/public/images/Quadric_Error_Metrics.png b/public/images/Quadric_Error_Metrics.png deleted file mode 100644 index 20c3269..0000000 Binary files a/public/images/Quadric_Error_Metrics.png and /dev/null differ diff --git a/public/images/Radiant_Intensity_define.png b/public/images/Radiant_Intensity_define.png deleted file mode 100644 index 14e894a..0000000 Binary files a/public/images/Radiant_Intensity_define.png and /dev/null differ diff --git a/public/images/Ray-Intersection_With_Box.png b/public/images/Ray-Intersection_With_Box.png deleted file mode 100644 index d6bf3c6..0000000 Binary files a/public/images/Ray-Intersection_With_Box.png and /dev/null differ diff --git a/public/images/Ray_Casting_Generate_Eye_Ray.png b/public/images/Ray_Casting_Generate_Eye_Ray.png deleted file mode 100644 index 1cf3663..0000000 Binary files a/public/images/Ray_Casting_Generate_Eye_Ray.png and /dev/null differ diff --git a/public/images/Ray_Casting_shading_pixel.png b/public/images/Ray_Casting_shading_pixel.png deleted file mode 100644 index 1f40439..0000000 Binary files a/public/images/Ray_Casting_shading_pixel.png and /dev/null differ diff --git a/public/images/Ray_Casting_theory.png b/public/images/Ray_Casting_theory.png deleted file mode 100644 index 197e7f7..0000000 Binary files a/public/images/Ray_Casting_theory.png and /dev/null differ diff --git a/public/images/Ray_Intersection_With_AABB.png b/public/images/Ray_Intersection_With_AABB.png deleted file mode 100644 index d5bc7da..0000000 Binary files a/public/images/Ray_Intersection_With_AABB.png and /dev/null differ diff --git a/public/images/Ray_Intersection_With_Plane.png b/public/images/Ray_Intersection_With_Plane.png deleted file mode 100644 index a4836b6..0000000 Binary files a/public/images/Ray_Intersection_With_Plane.png and /dev/null differ diff --git a/public/images/Ray_Scene_intersection_grid.png b/public/images/Ray_Scene_intersection_grid.png deleted file mode 100644 index 359eeff..0000000 Binary files a/public/images/Ray_Scene_intersection_grid.png and /dev/null differ diff --git a/public/images/Recursive_Ray_Tracing_progress.png b/public/images/Recursive_Ray_Tracing_progress.png deleted file mode 100644 index a6bc670..0000000 Binary files a/public/images/Recursive_Ray_Tracing_progress.png and /dev/null differ diff --git a/public/images/Screen-Based.png b/public/images/Screen-Based.png deleted file mode 100644 index ddf33b8..0000000 Binary files a/public/images/Screen-Based.png and /dev/null differ diff --git a/public/images/Shuntter_exposes_sensor_for_precise_duration.png b/public/images/Shuntter_exposes_sensor_for_precise_duration.png deleted file mode 100644 index b62b69e..0000000 Binary files a/public/images/Shuntter_exposes_sensor_for_precise_duration.png and /dev/null differ diff --git a/public/images/Specular_show.png b/public/images/Specular_show.png deleted file mode 100644 index ba6dda6..0000000 Binary files a/public/images/Specular_show.png and /dev/null differ diff --git a/public/images/Spherical_Environment_Map.png b/public/images/Spherical_Environment_Map.png deleted file mode 100644 index 1313716..0000000 Binary files a/public/images/Spherical_Environment_Map.png and /dev/null differ diff --git a/public/images/Spherical_Map_Problem.png b/public/images/Spherical_Map_Problem.png deleted file mode 100644 index 849f6a3..0000000 Binary files a/public/images/Spherical_Map_Problem.png and /dev/null differ diff --git a/public/images/Traversing_a_KD-Tree_step1.png b/public/images/Traversing_a_KD-Tree_step1.png deleted file mode 100644 index f870f6c..0000000 Binary files a/public/images/Traversing_a_KD-Tree_step1.png and /dev/null differ diff --git a/public/images/Traversing_a_KD-Tree_step2.png b/public/images/Traversing_a_KD-Tree_step2.png deleted file mode 100644 index 40b65e5..0000000 Binary files a/public/images/Traversing_a_KD-Tree_step2.png and /dev/null differ diff --git a/public/images/Traversing_a_KD-Tree_step3.png b/public/images/Traversing_a_KD-Tree_step3.png deleted file mode 100644 index b165a98..0000000 Binary files a/public/images/Traversing_a_KD-Tree_step3.png and /dev/null differ diff --git a/public/images/Traversing_a_KD-Tree_step4.png b/public/images/Traversing_a_KD-Tree_step4.png deleted file mode 100644 index cc19013..0000000 Binary files a/public/images/Traversing_a_KD-Tree_step4.png and /dev/null differ diff --git a/public/images/Traversing_a_KD-Tree_step5.png b/public/images/Traversing_a_KD-Tree_step5.png deleted file mode 100644 index 16501d6..0000000 Binary files a/public/images/Traversing_a_KD-Tree_step5.png and /dev/null differ diff --git a/public/images/Traversing_a_KD-Tree_step6.png b/public/images/Traversing_a_KD-Tree_step6.png deleted file mode 100644 index 91c4e7c..0000000 Binary files a/public/images/Traversing_a_KD-Tree_step6.png and /dev/null differ diff --git a/public/images/Traversing_a_KD-Tree_step7.png b/public/images/Traversing_a_KD-Tree_step7.png deleted file mode 100644 index 6326ddb..0000000 Binary files a/public/images/Traversing_a_KD-Tree_step7.png and /dev/null differ diff --git a/public/images/Traversing_a_KD-Tree_step8.png b/public/images/Traversing_a_KD-Tree_step8.png deleted file mode 100644 index f59ddbe..0000000 Binary files a/public/images/Traversing_a_KD-Tree_step8.png and /dev/null differ diff --git a/public/images/Trilinear_interpolation.png b/public/images/Trilinear_interpolation.png deleted file mode 100644 index 6725c53..0000000 Binary files a/public/images/Trilinear_interpolation.png and /dev/null differ diff --git a/public/images/Visualizing_de_Casteljau.png b/public/images/Visualizing_de_Casteljau.png deleted file mode 100644 index 1158951..0000000 Binary files a/public/images/Visualizing_de_Casteljau.png and /dev/null differ diff --git a/public/images/Wave_optics.png b/public/images/Wave_optics.png deleted file mode 100644 index ff7e181..0000000 Binary files a/public/images/Wave_optics.png and /dev/null differ diff --git a/public/images/Why_Axis-Aligned.png b/public/images/Why_Axis-Aligned.png deleted file mode 100644 index 965e236..0000000 Binary files a/public/images/Why_Axis-Aligned.png and /dev/null differ diff --git a/public/images/X({M{B)24R8DF[AB98E9]@1.png b/public/images/X({M{B)24R8DF[AB98E9]@1.png deleted file mode 100644 index b9defd2..0000000 Binary files a/public/images/X({M{B)24R8DF[AB98E9]@1.png and /dev/null differ diff --git a/public/images/Z-Buffer_test.png b/public/images/Z-Buffer_test.png deleted file mode 100644 index 8294938..0000000 Binary files a/public/images/Z-Buffer_test.png and /dev/null differ diff --git a/public/images/aliasing_pixel.png b/public/images/aliasing_pixel.png deleted file mode 100644 index 12ccb4b..0000000 Binary files a/public/images/aliasing_pixel.png and /dev/null differ diff --git a/public/images/animation_part1_1.png b/public/images/animation_part1_1.png deleted file mode 100644 index 8406aae..0000000 Binary files a/public/images/animation_part1_1.png and /dev/null differ diff --git a/public/images/animation_part1_10.png b/public/images/animation_part1_10.png deleted file mode 100644 index 577a5ad..0000000 Binary files a/public/images/animation_part1_10.png and /dev/null differ diff --git a/public/images/animation_part1_11.png b/public/images/animation_part1_11.png deleted file mode 100644 index 36d2dd4..0000000 Binary files a/public/images/animation_part1_11.png and /dev/null differ diff --git a/public/images/animation_part1_12.png b/public/images/animation_part1_12.png deleted file mode 100644 index 25ec6ea..0000000 Binary files a/public/images/animation_part1_12.png and /dev/null differ diff --git a/public/images/animation_part1_13.png b/public/images/animation_part1_13.png deleted file mode 100644 index 81e7f5f..0000000 Binary files a/public/images/animation_part1_13.png and /dev/null differ diff --git a/public/images/animation_part1_14.png b/public/images/animation_part1_14.png deleted file mode 100644 index 6f0dc73..0000000 Binary files a/public/images/animation_part1_14.png and /dev/null differ diff --git a/public/images/animation_part1_15.png b/public/images/animation_part1_15.png deleted file mode 100644 index 19f119c..0000000 Binary files a/public/images/animation_part1_15.png and /dev/null differ diff --git a/public/images/animation_part1_16.png b/public/images/animation_part1_16.png deleted file mode 100644 index d9fb97a..0000000 Binary files a/public/images/animation_part1_16.png and /dev/null differ diff --git a/public/images/animation_part1_17.png b/public/images/animation_part1_17.png deleted file mode 100644 index 238f348..0000000 Binary files a/public/images/animation_part1_17.png and /dev/null differ diff --git a/public/images/animation_part1_18.png b/public/images/animation_part1_18.png deleted file mode 100644 index b0178c5..0000000 Binary files a/public/images/animation_part1_18.png and /dev/null differ diff --git a/public/images/animation_part1_19.png b/public/images/animation_part1_19.png deleted file mode 100644 index fbbebde..0000000 Binary files a/public/images/animation_part1_19.png and /dev/null differ diff --git a/public/images/animation_part1_2.png b/public/images/animation_part1_2.png deleted file mode 100644 index 85f146e..0000000 Binary files a/public/images/animation_part1_2.png and /dev/null differ diff --git a/public/images/animation_part1_20.png b/public/images/animation_part1_20.png deleted file mode 100644 index ad8aabd..0000000 Binary files a/public/images/animation_part1_20.png and /dev/null differ diff --git a/public/images/animation_part1_21.png b/public/images/animation_part1_21.png deleted file mode 100644 index 0c088b2..0000000 Binary files a/public/images/animation_part1_21.png and /dev/null differ diff --git a/public/images/animation_part1_22.png b/public/images/animation_part1_22.png deleted file mode 100644 index d702f47..0000000 Binary files a/public/images/animation_part1_22.png and /dev/null differ diff --git a/public/images/animation_part1_23.png b/public/images/animation_part1_23.png deleted file mode 100644 index c268aed..0000000 Binary files a/public/images/animation_part1_23.png and /dev/null differ diff --git a/public/images/animation_part1_24.png b/public/images/animation_part1_24.png deleted file mode 100644 index 2a32b1a..0000000 Binary files a/public/images/animation_part1_24.png and /dev/null differ diff --git a/public/images/animation_part1_25.png b/public/images/animation_part1_25.png deleted file mode 100644 index 6d2c672..0000000 Binary files a/public/images/animation_part1_25.png and /dev/null differ diff --git a/public/images/animation_part1_26.png b/public/images/animation_part1_26.png deleted file mode 100644 index 6e111ea..0000000 Binary files a/public/images/animation_part1_26.png and /dev/null differ diff --git a/public/images/animation_part1_27.png b/public/images/animation_part1_27.png deleted file mode 100644 index 9bef889..0000000 Binary files a/public/images/animation_part1_27.png and /dev/null differ diff --git a/public/images/animation_part1_28.png b/public/images/animation_part1_28.png deleted file mode 100644 index 13dcce9..0000000 Binary files a/public/images/animation_part1_28.png and /dev/null differ diff --git a/public/images/animation_part1_29.png b/public/images/animation_part1_29.png deleted file mode 100644 index ff802de..0000000 Binary files a/public/images/animation_part1_29.png and /dev/null differ diff --git a/public/images/animation_part1_3.png b/public/images/animation_part1_3.png deleted file mode 100644 index 6627a6f..0000000 Binary files a/public/images/animation_part1_3.png and /dev/null differ diff --git a/public/images/animation_part1_30.png b/public/images/animation_part1_30.png deleted file mode 100644 index 26a48c3..0000000 Binary files a/public/images/animation_part1_30.png and /dev/null differ diff --git a/public/images/animation_part1_31.png b/public/images/animation_part1_31.png deleted file mode 100644 index db7f344..0000000 Binary files a/public/images/animation_part1_31.png and /dev/null differ diff --git a/public/images/animation_part1_32.png b/public/images/animation_part1_32.png deleted file mode 100644 index 57bd6bc..0000000 Binary files a/public/images/animation_part1_32.png and /dev/null differ diff --git a/public/images/animation_part1_33.png b/public/images/animation_part1_33.png deleted file mode 100644 index 783438c..0000000 Binary files a/public/images/animation_part1_33.png and /dev/null differ diff --git a/public/images/animation_part1_34.png b/public/images/animation_part1_34.png deleted file mode 100644 index cc456cc..0000000 Binary files a/public/images/animation_part1_34.png and /dev/null differ diff --git a/public/images/animation_part1_35.png b/public/images/animation_part1_35.png deleted file mode 100644 index 75fba8f..0000000 Binary files a/public/images/animation_part1_35.png and /dev/null differ diff --git a/public/images/animation_part1_36.png b/public/images/animation_part1_36.png deleted file mode 100644 index 6fc1f1c..0000000 Binary files a/public/images/animation_part1_36.png and /dev/null differ diff --git a/public/images/animation_part1_37.png b/public/images/animation_part1_37.png deleted file mode 100644 index f866394..0000000 Binary files a/public/images/animation_part1_37.png and /dev/null differ diff --git a/public/images/animation_part1_38.png b/public/images/animation_part1_38.png deleted file mode 100644 index 985e967..0000000 Binary files a/public/images/animation_part1_38.png and /dev/null differ diff --git a/public/images/animation_part1_39.png b/public/images/animation_part1_39.png deleted file mode 100644 index 58e7608..0000000 Binary files a/public/images/animation_part1_39.png and /dev/null differ diff --git a/public/images/animation_part1_4.png b/public/images/animation_part1_4.png deleted file mode 100644 index 1854d3e..0000000 Binary files a/public/images/animation_part1_4.png and /dev/null differ diff --git a/public/images/animation_part1_40.png b/public/images/animation_part1_40.png deleted file mode 100644 index 745d1f7..0000000 Binary files a/public/images/animation_part1_40.png and /dev/null differ diff --git a/public/images/animation_part1_41.png b/public/images/animation_part1_41.png deleted file mode 100644 index 729d9dc..0000000 Binary files a/public/images/animation_part1_41.png and /dev/null differ diff --git a/public/images/animation_part1_42.png b/public/images/animation_part1_42.png deleted file mode 100644 index accb163..0000000 Binary files a/public/images/animation_part1_42.png and /dev/null differ diff --git a/public/images/animation_part1_43.png b/public/images/animation_part1_43.png deleted file mode 100644 index 64b90f0..0000000 Binary files a/public/images/animation_part1_43.png and /dev/null differ diff --git a/public/images/animation_part1_44.png b/public/images/animation_part1_44.png deleted file mode 100644 index adcabeb..0000000 Binary files a/public/images/animation_part1_44.png and /dev/null differ diff --git a/public/images/animation_part1_45.png b/public/images/animation_part1_45.png deleted file mode 100644 index a64a3fa..0000000 Binary files a/public/images/animation_part1_45.png and /dev/null differ diff --git a/public/images/animation_part1_46.png b/public/images/animation_part1_46.png deleted file mode 100644 index 9c5ce3e..0000000 Binary files a/public/images/animation_part1_46.png and /dev/null differ diff --git a/public/images/animation_part1_47.png b/public/images/animation_part1_47.png deleted file mode 100644 index 6191f4a..0000000 Binary files a/public/images/animation_part1_47.png and /dev/null differ diff --git a/public/images/animation_part1_48.png b/public/images/animation_part1_48.png deleted file mode 100644 index 2bd8497..0000000 Binary files a/public/images/animation_part1_48.png and /dev/null differ diff --git a/public/images/animation_part1_49.png b/public/images/animation_part1_49.png deleted file mode 100644 index bf94ff7..0000000 Binary files a/public/images/animation_part1_49.png and /dev/null differ diff --git a/public/images/animation_part1_5.png b/public/images/animation_part1_5.png deleted file mode 100644 index 7dd3cb8..0000000 Binary files a/public/images/animation_part1_5.png and /dev/null differ diff --git a/public/images/animation_part1_50.png b/public/images/animation_part1_50.png deleted file mode 100644 index 1b17d40..0000000 Binary files a/public/images/animation_part1_50.png and /dev/null differ diff --git a/public/images/animation_part1_51.png b/public/images/animation_part1_51.png deleted file mode 100644 index 8a26b15..0000000 Binary files a/public/images/animation_part1_51.png and /dev/null differ diff --git a/public/images/animation_part1_52.png b/public/images/animation_part1_52.png deleted file mode 100644 index 1fcc8fa..0000000 Binary files a/public/images/animation_part1_52.png and /dev/null differ diff --git a/public/images/animation_part1_53.png b/public/images/animation_part1_53.png deleted file mode 100644 index b2ecbc1..0000000 Binary files a/public/images/animation_part1_53.png and /dev/null differ diff --git a/public/images/animation_part1_54.png b/public/images/animation_part1_54.png deleted file mode 100644 index 9b1b8fb..0000000 Binary files a/public/images/animation_part1_54.png and /dev/null differ diff --git a/public/images/animation_part1_55.png b/public/images/animation_part1_55.png deleted file mode 100644 index 6029ebb..0000000 Binary files a/public/images/animation_part1_55.png and /dev/null differ diff --git a/public/images/animation_part1_56.png b/public/images/animation_part1_56.png deleted file mode 100644 index fb34968..0000000 Binary files a/public/images/animation_part1_56.png and /dev/null differ diff --git a/public/images/animation_part1_57.png b/public/images/animation_part1_57.png deleted file mode 100644 index c814999..0000000 Binary files a/public/images/animation_part1_57.png and /dev/null differ diff --git a/public/images/animation_part1_58.png b/public/images/animation_part1_58.png deleted file mode 100644 index 0fba343..0000000 Binary files a/public/images/animation_part1_58.png and /dev/null differ diff --git a/public/images/animation_part1_59.png b/public/images/animation_part1_59.png deleted file mode 100644 index 41206ff..0000000 Binary files a/public/images/animation_part1_59.png and /dev/null differ diff --git a/public/images/animation_part1_6.png b/public/images/animation_part1_6.png deleted file mode 100644 index 742243d..0000000 Binary files a/public/images/animation_part1_6.png and /dev/null differ diff --git a/public/images/animation_part1_7.png b/public/images/animation_part1_7.png deleted file mode 100644 index 0e0abc9..0000000 Binary files a/public/images/animation_part1_7.png and /dev/null differ diff --git a/public/images/animation_part1_8.png b/public/images/animation_part1_8.png deleted file mode 100644 index 049f74b..0000000 Binary files a/public/images/animation_part1_8.png and /dev/null differ diff --git a/public/images/animation_part1_9.png b/public/images/animation_part1_9.png deleted file mode 100644 index a9a721a..0000000 Binary files a/public/images/animation_part1_9.png and /dev/null differ diff --git a/public/images/animation_part2_1.png b/public/images/animation_part2_1.png deleted file mode 100644 index bd29052..0000000 Binary files a/public/images/animation_part2_1.png and /dev/null differ diff --git a/public/images/animation_part2_10.png b/public/images/animation_part2_10.png deleted file mode 100644 index be6000c..0000000 Binary files a/public/images/animation_part2_10.png and /dev/null differ diff --git a/public/images/animation_part2_11.png b/public/images/animation_part2_11.png deleted file mode 100644 index ef8a284..0000000 Binary files a/public/images/animation_part2_11.png and /dev/null differ diff --git a/public/images/animation_part2_12.png b/public/images/animation_part2_12.png deleted file mode 100644 index 068f90c..0000000 Binary files a/public/images/animation_part2_12.png and /dev/null differ diff --git a/public/images/animation_part2_13.png b/public/images/animation_part2_13.png deleted file mode 100644 index 0f5d8e2..0000000 Binary files a/public/images/animation_part2_13.png and /dev/null differ diff --git a/public/images/animation_part2_2.png b/public/images/animation_part2_2.png deleted file mode 100644 index 3700e9b..0000000 Binary files a/public/images/animation_part2_2.png and /dev/null differ diff --git a/public/images/animation_part2_3.png b/public/images/animation_part2_3.png deleted file mode 100644 index d9061c8..0000000 Binary files a/public/images/animation_part2_3.png and /dev/null differ diff --git a/public/images/animation_part2_4.png b/public/images/animation_part2_4.png deleted file mode 100644 index c2179cd..0000000 Binary files a/public/images/animation_part2_4.png and /dev/null differ diff --git a/public/images/animation_part2_5.png b/public/images/animation_part2_5.png deleted file mode 100644 index 8e2f9dd..0000000 Binary files a/public/images/animation_part2_5.png and /dev/null differ diff --git a/public/images/animation_part2_6.png b/public/images/animation_part2_6.png deleted file mode 100644 index 7928142..0000000 Binary files a/public/images/animation_part2_6.png and /dev/null differ diff --git a/public/images/animation_part2_7.png b/public/images/animation_part2_7.png deleted file mode 100644 index 50efc38..0000000 Binary files a/public/images/animation_part2_7.png and /dev/null differ diff --git a/public/images/animation_part2_8.png b/public/images/animation_part2_8.png deleted file mode 100644 index 268cc03..0000000 Binary files a/public/images/animation_part2_8.png and /dev/null differ diff --git a/public/images/animation_part2_9.png b/public/images/animation_part2_9.png deleted file mode 100644 index 40e02d3..0000000 Binary files a/public/images/animation_part2_9.png and /dev/null differ diff --git a/public/images/anisotropic_BRDF_nylon.png b/public/images/anisotropic_BRDF_nylon.png deleted file mode 100644 index 267b709..0000000 Binary files a/public/images/anisotropic_BRDF_nylon.png and /dev/null differ diff --git a/public/images/anisotropic_BRDFs_brushed_metal.png b/public/images/anisotropic_BRDFs_brushed_metal.png deleted file mode 100644 index 104b7f4..0000000 Binary files a/public/images/anisotropic_BRDFs_brushed_metal.png and /dev/null differ diff --git a/public/images/anisotropic_materials_theory.png b/public/images/anisotropic_materials_theory.png deleted file mode 100644 index 9f3280a..0000000 Binary files a/public/images/anisotropic_materials_theory.png and /dev/null differ diff --git a/public/images/anistotropic_BRDF_velvet.png b/public/images/anistotropic_BRDF_velvet.png deleted file mode 100644 index b3fb675..0000000 Binary files a/public/images/anistotropic_BRDF_velvet.png and /dev/null differ diff --git a/public/images/another_defination_of_flux.png b/public/images/another_defination_of_flux.png deleted file mode 100644 index 3bcc9ac..0000000 Binary files a/public/images/another_defination_of_flux.png and /dev/null differ diff --git a/public/images/apple_touch_ico(180x180).png b/public/images/apple_touch_ico(180x180).png deleted file mode 100644 index 22ecf26..0000000 Binary files a/public/images/apple_touch_ico(180x180).png and /dev/null differ diff --git a/public/images/average_color.png b/public/images/average_color.png deleted file mode 100644 index a61e504..0000000 Binary files a/public/images/average_color.png and /dev/null differ diff --git a/public/images/average_normal.png b/public/images/average_normal.png deleted file mode 100644 index 16524e2..0000000 Binary files a/public/images/average_normal.png and /dev/null differ diff --git a/public/images/background.png b/public/images/background.png deleted file mode 100644 index f00db62..0000000 Binary files a/public/images/background.png and /dev/null differ diff --git a/public/images/barycentric_coor_interpo.png b/public/images/barycentric_coor_interpo.png deleted file mode 100644 index b4ceea6..0000000 Binary files a/public/images/barycentric_coor_interpo.png and /dev/null differ diff --git a/public/images/barycentric_coordinates.png b/public/images/barycentric_coordinates.png deleted file mode 100644 index a336807..0000000 Binary files a/public/images/barycentric_coordinates.png and /dev/null differ diff --git a/public/images/barycentric_in_coordinates.jpg b/public/images/barycentric_in_coordinates.jpg deleted file mode 100644 index 66dfca9..0000000 Binary files a/public/images/barycentric_in_coordinates.jpg and /dev/null differ diff --git a/public/images/bezier_surface_eg.png b/public/images/bezier_surface_eg.png deleted file mode 100644 index 39e9923..0000000 Binary files a/public/images/bezier_surface_eg.png and /dev/null differ diff --git a/public/images/bidirectional_path_tracing_theory.png b/public/images/bidirectional_path_tracing_theory.png deleted file mode 100644 index cd838c4..0000000 Binary files a/public/images/bidirectional_path_tracing_theory.png and /dev/null differ diff --git a/public/images/bilinear_interpolation.png b/public/images/bilinear_interpolation.png deleted file mode 100644 index e98f972..0000000 Binary files a/public/images/bilinear_interpolation.png and /dev/null differ diff --git a/public/images/blender_detail.png b/public/images/blender_detail.png deleted file mode 100644 index 89d9a2a..0000000 Binary files a/public/images/blender_detail.png and /dev/null differ diff --git a/public/images/blinn-phong_model_cacu.png b/public/images/blinn-phong_model_cacu.png deleted file mode 100644 index 179850a..0000000 Binary files a/public/images/blinn-phong_model_cacu.png and /dev/null differ diff --git a/public/images/box_filter_construct.png b/public/images/box_filter_construct.png deleted file mode 100644 index fa5d6e1..0000000 Binary files a/public/images/box_filter_construct.png and /dev/null differ diff --git a/public/images/caculate_diffuse_material.png b/public/images/caculate_diffuse_material.png deleted file mode 100644 index bd043ad..0000000 Binary files a/public/images/caculate_diffuse_material.png and /dev/null differ diff --git a/public/images/catmull-clark_subdivision1.png b/public/images/catmull-clark_subdivision1.png deleted file mode 100644 index c048d1a..0000000 Binary files a/public/images/catmull-clark_subdivision1.png and /dev/null differ diff --git a/public/images/catmull-clark_subdivision2.png b/public/images/catmull-clark_subdivision2.png deleted file mode 100644 index b589bdf..0000000 Binary files a/public/images/catmull-clark_subdivision2.png and /dev/null differ diff --git a/public/images/circle_of_confusion_for_depth_of_field.png b/public/images/circle_of_confusion_for_depth_of_field.png deleted file mode 100644 index 945c8ec..0000000 Binary files a/public/images/circle_of_confusion_for_depth_of_field.png and /dev/null differ diff --git a/public/images/cloth_application.png b/public/images/cloth_application.png deleted file mode 100644 index 778597b..0000000 Binary files a/public/images/cloth_application.png and /dev/null differ diff --git a/public/images/cloth_render_as_actual_fibers.png b/public/images/cloth_render_as_actual_fibers.png deleted file mode 100644 index 13de577..0000000 Binary files a/public/images/cloth_render_as_actual_fibers.png and /dev/null differ diff --git a/public/images/cloth_render_as_participating_media.png b/public/images/cloth_render_as_participating_media.png deleted file mode 100644 index 3f40565..0000000 Binary files a/public/images/cloth_render_as_participating_media.png and /dev/null differ diff --git a/public/images/cloth_yarn_and_ply.png b/public/images/cloth_yarn_and_ply.png deleted file mode 100644 index adfb767..0000000 Binary files a/public/images/cloth_yarn_and_ply.png and /dev/null differ diff --git a/public/images/coc_vs_aperture_size.png b/public/images/coc_vs_aperture_size.png deleted file mode 100644 index c6e26d4..0000000 Binary files a/public/images/coc_vs_aperture_size.png and /dev/null differ diff --git a/public/images/color_and_perception_1.png b/public/images/color_and_perception_1.png deleted file mode 100644 index 62cd1a2..0000000 Binary files a/public/images/color_and_perception_1.png and /dev/null differ diff --git a/public/images/color_and_perception_10.png b/public/images/color_and_perception_10.png deleted file mode 100644 index 5a75438..0000000 Binary files a/public/images/color_and_perception_10.png and /dev/null differ diff --git a/public/images/color_and_perception_11.png b/public/images/color_and_perception_11.png deleted file mode 100644 index 4757b84..0000000 Binary files a/public/images/color_and_perception_11.png and /dev/null differ diff --git a/public/images/color_and_perception_12.png b/public/images/color_and_perception_12.png deleted file mode 100644 index 2fd3a0a..0000000 Binary files a/public/images/color_and_perception_12.png and /dev/null differ diff --git a/public/images/color_and_perception_13.png b/public/images/color_and_perception_13.png deleted file mode 100644 index 398550b..0000000 Binary files a/public/images/color_and_perception_13.png and /dev/null differ diff --git a/public/images/color_and_perception_14.png b/public/images/color_and_perception_14.png deleted file mode 100644 index c6c7fc5..0000000 Binary files a/public/images/color_and_perception_14.png and /dev/null differ diff --git a/public/images/color_and_perception_15.png b/public/images/color_and_perception_15.png deleted file mode 100644 index ab23da2..0000000 Binary files a/public/images/color_and_perception_15.png and /dev/null differ diff --git a/public/images/color_and_perception_16.png b/public/images/color_and_perception_16.png deleted file mode 100644 index 0dcd252..0000000 Binary files a/public/images/color_and_perception_16.png and /dev/null differ diff --git a/public/images/color_and_perception_17.png b/public/images/color_and_perception_17.png deleted file mode 100644 index c588e2c..0000000 Binary files a/public/images/color_and_perception_17.png and /dev/null differ diff --git a/public/images/color_and_perception_18.png b/public/images/color_and_perception_18.png deleted file mode 100644 index b321932..0000000 Binary files a/public/images/color_and_perception_18.png and /dev/null differ diff --git a/public/images/color_and_perception_19.png b/public/images/color_and_perception_19.png deleted file mode 100644 index cc18c3b..0000000 Binary files a/public/images/color_and_perception_19.png and /dev/null differ diff --git a/public/images/color_and_perception_2.png b/public/images/color_and_perception_2.png deleted file mode 100644 index b05f12e..0000000 Binary files a/public/images/color_and_perception_2.png and /dev/null differ diff --git a/public/images/color_and_perception_20.png b/public/images/color_and_perception_20.png deleted file mode 100644 index 2733e7e..0000000 Binary files a/public/images/color_and_perception_20.png and /dev/null differ diff --git a/public/images/color_and_perception_21.png b/public/images/color_and_perception_21.png deleted file mode 100644 index 37984d6..0000000 Binary files a/public/images/color_and_perception_21.png and /dev/null differ diff --git a/public/images/color_and_perception_22.png b/public/images/color_and_perception_22.png deleted file mode 100644 index 0967123..0000000 Binary files a/public/images/color_and_perception_22.png and /dev/null differ diff --git a/public/images/color_and_perception_23.png b/public/images/color_and_perception_23.png deleted file mode 100644 index 03750d5..0000000 Binary files a/public/images/color_and_perception_23.png and /dev/null differ diff --git a/public/images/color_and_perception_24.png b/public/images/color_and_perception_24.png deleted file mode 100644 index 6df4f32..0000000 Binary files a/public/images/color_and_perception_24.png and /dev/null differ diff --git a/public/images/color_and_perception_25.png b/public/images/color_and_perception_25.png deleted file mode 100644 index 3535cc3..0000000 Binary files a/public/images/color_and_perception_25.png and /dev/null differ diff --git a/public/images/color_and_perception_26.png b/public/images/color_and_perception_26.png deleted file mode 100644 index 35425fa..0000000 Binary files a/public/images/color_and_perception_26.png and /dev/null differ diff --git a/public/images/color_and_perception_27.png b/public/images/color_and_perception_27.png deleted file mode 100644 index 045d727..0000000 Binary files a/public/images/color_and_perception_27.png and /dev/null differ diff --git a/public/images/color_and_perception_28.png b/public/images/color_and_perception_28.png deleted file mode 100644 index c709082..0000000 Binary files a/public/images/color_and_perception_28.png and /dev/null differ diff --git a/public/images/color_and_perception_29.png b/public/images/color_and_perception_29.png deleted file mode 100644 index 7017081..0000000 Binary files a/public/images/color_and_perception_29.png and /dev/null differ diff --git a/public/images/color_and_perception_3.png b/public/images/color_and_perception_3.png deleted file mode 100644 index 8243b2d..0000000 Binary files a/public/images/color_and_perception_3.png and /dev/null differ diff --git a/public/images/color_and_perception_30.png b/public/images/color_and_perception_30.png deleted file mode 100644 index 53f7843..0000000 Binary files a/public/images/color_and_perception_30.png and /dev/null differ diff --git a/public/images/color_and_perception_31.png b/public/images/color_and_perception_31.png deleted file mode 100644 index a0421c4..0000000 Binary files a/public/images/color_and_perception_31.png and /dev/null differ diff --git a/public/images/color_and_perception_32.png b/public/images/color_and_perception_32.png deleted file mode 100644 index 4139986..0000000 Binary files a/public/images/color_and_perception_32.png and /dev/null differ diff --git a/public/images/color_and_perception_33.png b/public/images/color_and_perception_33.png deleted file mode 100644 index 47a6647..0000000 Binary files a/public/images/color_and_perception_33.png and /dev/null differ diff --git a/public/images/color_and_perception_34.png b/public/images/color_and_perception_34.png deleted file mode 100644 index 43663af..0000000 Binary files a/public/images/color_and_perception_34.png and /dev/null differ diff --git a/public/images/color_and_perception_35.png b/public/images/color_and_perception_35.png deleted file mode 100644 index 7fc10ff..0000000 Binary files a/public/images/color_and_perception_35.png and /dev/null differ diff --git a/public/images/color_and_perception_36.png b/public/images/color_and_perception_36.png deleted file mode 100644 index 06cd9e4..0000000 Binary files a/public/images/color_and_perception_36.png and /dev/null differ diff --git a/public/images/color_and_perception_37.png b/public/images/color_and_perception_37.png deleted file mode 100644 index 9569a78..0000000 Binary files a/public/images/color_and_perception_37.png and /dev/null differ diff --git a/public/images/color_and_perception_38.png b/public/images/color_and_perception_38.png deleted file mode 100644 index 8042fd2..0000000 Binary files a/public/images/color_and_perception_38.png and /dev/null differ diff --git a/public/images/color_and_perception_39.png b/public/images/color_and_perception_39.png deleted file mode 100644 index 1d4670a..0000000 Binary files a/public/images/color_and_perception_39.png and /dev/null differ diff --git a/public/images/color_and_perception_4.png b/public/images/color_and_perception_4.png deleted file mode 100644 index 14af91e..0000000 Binary files a/public/images/color_and_perception_4.png and /dev/null differ diff --git a/public/images/color_and_perception_40.png b/public/images/color_and_perception_40.png deleted file mode 100644 index 136cc44..0000000 Binary files a/public/images/color_and_perception_40.png and /dev/null differ diff --git a/public/images/color_and_perception_41.png b/public/images/color_and_perception_41.png deleted file mode 100644 index 1bb8fba..0000000 Binary files a/public/images/color_and_perception_41.png and /dev/null differ diff --git a/public/images/color_and_perception_42.png b/public/images/color_and_perception_42.png deleted file mode 100644 index 956c241..0000000 Binary files a/public/images/color_and_perception_42.png and /dev/null differ diff --git a/public/images/color_and_perception_43.png b/public/images/color_and_perception_43.png deleted file mode 100644 index 9378eb2..0000000 Binary files a/public/images/color_and_perception_43.png and /dev/null differ diff --git a/public/images/color_and_perception_44.png b/public/images/color_and_perception_44.png deleted file mode 100644 index 404e0a5..0000000 Binary files a/public/images/color_and_perception_44.png and /dev/null differ diff --git a/public/images/color_and_perception_45.png b/public/images/color_and_perception_45.png deleted file mode 100644 index 119e0cf..0000000 Binary files a/public/images/color_and_perception_45.png and /dev/null differ diff --git a/public/images/color_and_perception_46.png b/public/images/color_and_perception_46.png deleted file mode 100644 index 29e48d2..0000000 Binary files a/public/images/color_and_perception_46.png and /dev/null differ diff --git a/public/images/color_and_perception_47.png b/public/images/color_and_perception_47.png deleted file mode 100644 index 46c50a0..0000000 Binary files a/public/images/color_and_perception_47.png and /dev/null differ diff --git a/public/images/color_and_perception_48.png b/public/images/color_and_perception_48.png deleted file mode 100644 index 6ca3de3..0000000 Binary files a/public/images/color_and_perception_48.png and /dev/null differ diff --git a/public/images/color_and_perception_49.png b/public/images/color_and_perception_49.png deleted file mode 100644 index b579098..0000000 Binary files a/public/images/color_and_perception_49.png and /dev/null differ diff --git a/public/images/color_and_perception_5.png b/public/images/color_and_perception_5.png deleted file mode 100644 index 7fe8421..0000000 Binary files a/public/images/color_and_perception_5.png and /dev/null differ diff --git a/public/images/color_and_perception_50.png b/public/images/color_and_perception_50.png deleted file mode 100644 index e507f6e..0000000 Binary files a/public/images/color_and_perception_50.png and /dev/null differ diff --git a/public/images/color_and_perception_51.png b/public/images/color_and_perception_51.png deleted file mode 100644 index 2f30012..0000000 Binary files a/public/images/color_and_perception_51.png and /dev/null differ diff --git a/public/images/color_and_perception_52.png b/public/images/color_and_perception_52.png deleted file mode 100644 index 74c5cc3..0000000 Binary files a/public/images/color_and_perception_52.png and /dev/null differ diff --git a/public/images/color_and_perception_53.png b/public/images/color_and_perception_53.png deleted file mode 100644 index 213a578..0000000 Binary files a/public/images/color_and_perception_53.png and /dev/null differ diff --git a/public/images/color_and_perception_54.png b/public/images/color_and_perception_54.png deleted file mode 100644 index a4a97c5..0000000 Binary files a/public/images/color_and_perception_54.png and /dev/null differ diff --git a/public/images/color_and_perception_6.png b/public/images/color_and_perception_6.png deleted file mode 100644 index c8e87ea..0000000 Binary files a/public/images/color_and_perception_6.png and /dev/null differ diff --git a/public/images/color_and_perception_7.png b/public/images/color_and_perception_7.png deleted file mode 100644 index 67a11b5..0000000 Binary files a/public/images/color_and_perception_7.png and /dev/null differ diff --git a/public/images/color_and_perception_8.png b/public/images/color_and_perception_8.png deleted file mode 100644 index 6fcadd7..0000000 Binary files a/public/images/color_and_perception_8.png and /dev/null differ diff --git a/public/images/color_and_perception_9.png b/public/images/color_and_perception_9.png deleted file mode 100644 index 0c7d14d..0000000 Binary files a/public/images/color_and_perception_9.png and /dev/null differ diff --git a/public/images/compute_mip_level_D.png b/public/images/compute_mip_level_D.png deleted file mode 100644 index 40c064b..0000000 Binary files a/public/images/compute_mip_level_D.png and /dev/null differ diff --git a/public/images/computing_circle_of_confusion_size.png b/public/images/computing_circle_of_confusion_size.png deleted file mode 100644 index 1585d65..0000000 Binary files a/public/images/computing_circle_of_confusion_size.png and /dev/null differ diff --git a/public/images/convergence_of_loop_and_catmull.png b/public/images/convergence_of_loop_and_catmull.png deleted file mode 100644 index 1d9acf1..0000000 Binary files a/public/images/convergence_of_loop_and_catmull.png and /dev/null differ diff --git a/public/images/convolution_example1.png b/public/images/convolution_example1.png deleted file mode 100644 index e8c3b4b..0000000 Binary files a/public/images/convolution_example1.png and /dev/null differ diff --git a/public/images/convolution_example2.png b/public/images/convolution_example2.png deleted file mode 100644 index efd8f34..0000000 Binary files a/public/images/convolution_example2.png and /dev/null differ diff --git a/public/images/convolution_theorem.png b/public/images/convolution_theorem.png deleted file mode 100644 index 6144d57..0000000 Binary files a/public/images/convolution_theorem.png and /dev/null differ diff --git a/public/images/cover1.jpg b/public/images/cover1.jpg deleted file mode 100644 index dc7c36d..0000000 Binary files a/public/images/cover1.jpg and /dev/null differ diff --git a/public/images/de_Casteljau_Algorithm_step1.png b/public/images/de_Casteljau_Algorithm_step1.png deleted file mode 100644 index c387c35..0000000 Binary files a/public/images/de_Casteljau_Algorithm_step1.png and /dev/null differ diff --git a/public/images/de_Casteljau_Algorithm_step2.png b/public/images/de_Casteljau_Algorithm_step2.png deleted file mode 100644 index dd3d927..0000000 Binary files a/public/images/de_Casteljau_Algorithm_step2.png and /dev/null differ diff --git a/public/images/de_Casteljau_Algorithm_step3.png b/public/images/de_Casteljau_Algorithm_step3.png deleted file mode 100644 index 9b12fd5..0000000 Binary files a/public/images/de_Casteljau_Algorithm_step3.png and /dev/null differ diff --git a/public/images/de_Casteljau_Algorithm_step4.png b/public/images/de_Casteljau_Algorithm_step4.png deleted file mode 100644 index f86dcb7..0000000 Binary files a/public/images/de_Casteljau_Algorithm_step4.png and /dev/null differ diff --git a/public/images/de_Casteljau_Algorithm_step5.png b/public/images/de_Casteljau_Algorithm_step5.png deleted file mode 100644 index dc91775..0000000 Binary files a/public/images/de_Casteljau_Algorithm_step5.png and /dev/null differ diff --git a/public/images/de_Casteljau_Algorithm_step6.png b/public/images/de_Casteljau_Algorithm_step6.png deleted file mode 100644 index 2394118..0000000 Binary files a/public/images/de_Casteljau_Algorithm_step6.png and /dev/null differ diff --git a/public/images/de_Casteljau_pyramid_of.png b/public/images/de_Casteljau_pyramid_of.png deleted file mode 100644 index e84877d..0000000 Binary files a/public/images/de_Casteljau_pyramid_of.png and /dev/null differ diff --git a/public/images/define_detail1.png b/public/images/define_detail1.png deleted file mode 100644 index 55857c6..0000000 Binary files a/public/images/define_detail1.png and /dev/null differ diff --git a/public/images/depth_of_field.png b/public/images/depth_of_field.png deleted file mode 100644 index 89deee7..0000000 Binary files a/public/images/depth_of_field.png and /dev/null differ diff --git a/public/images/depth_of_filed_fyi.png b/public/images/depth_of_filed_fyi.png deleted file mode 100644 index 8aba82c..0000000 Binary files a/public/images/depth_of_filed_fyi.png and /dev/null differ diff --git a/public/images/detailed_appearance_motivation.png b/public/images/detailed_appearance_motivation.png deleted file mode 100644 index fb335f3..0000000 Binary files a/public/images/detailed_appearance_motivation.png and /dev/null differ diff --git a/public/images/detailed_appearance_motivation1.png b/public/images/detailed_appearance_motivation1.png deleted file mode 100644 index 626741e..0000000 Binary files a/public/images/detailed_appearance_motivation1.png and /dev/null differ diff --git a/public/images/detailed_material_application.png b/public/images/detailed_material_application.png deleted file mode 100644 index a2c5124..0000000 Binary files a/public/images/detailed_material_application.png and /dev/null differ diff --git a/public/images/detailed_material_under_wave_optics.png b/public/images/detailed_material_under_wave_optics.png deleted file mode 100644 index ca08be4..0000000 Binary files a/public/images/detailed_material_under_wave_optics.png and /dev/null differ diff --git a/public/images/detailer_appearance1.png b/public/images/detailer_appearance1.png deleted file mode 100644 index e15bfbc..0000000 Binary files a/public/images/detailer_appearance1.png and /dev/null differ diff --git a/public/images/detailer_appearance2.png b/public/images/detailer_appearance2.png deleted file mode 100644 index 7a0e41e..0000000 Binary files a/public/images/detailer_appearance2.png and /dev/null differ diff --git a/public/images/detailer_appearance3.png b/public/images/detailer_appearance3.png deleted file mode 100644 index 33b4866..0000000 Binary files a/public/images/detailer_appearance3.png and /dev/null differ diff --git a/public/images/details_apperance_3.png b/public/images/details_apperance_3.png deleted file mode 100644 index e186f80..0000000 Binary files a/public/images/details_apperance_3.png and /dev/null differ diff --git a/public/images/different_details2.png b/public/images/different_details2.png deleted file mode 100644 index 2c7d8f0..0000000 Binary files a/public/images/different_details2.png and /dev/null differ diff --git a/public/images/differential_solid_angles1.png b/public/images/differential_solid_angles1.png deleted file mode 100644 index a23163a..0000000 Binary files a/public/images/differential_solid_angles1.png and /dev/null differ diff --git a/public/images/differential_solid_angles_w.png b/public/images/differential_solid_angles_w.png deleted file mode 100644 index c8f9b06..0000000 Binary files a/public/images/differential_solid_angles_w.png and /dev/null differ diff --git a/public/images/difficult_path_sampling_problem.png b/public/images/difficult_path_sampling_problem.png deleted file mode 100644 index f2bf96e..0000000 Binary files a/public/images/difficult_path_sampling_problem.png and /dev/null differ diff --git a/public/images/diffuse_lambertian_material.png b/public/images/diffuse_lambertian_material.png deleted file mode 100644 index 2f75206..0000000 Binary files a/public/images/diffuse_lambertian_material.png and /dev/null differ diff --git a/public/images/dipole_approximation.png b/public/images/dipole_approximation.png deleted file mode 100644 index 802a03e..0000000 Binary files a/public/images/dipole_approximation.png and /dev/null differ diff --git a/public/images/distribution_of_normals.png b/public/images/distribution_of_normals.png deleted file mode 100644 index da22f3d..0000000 Binary files a/public/images/distribution_of_normals.png and /dev/null differ diff --git a/public/images/double_cylinder_model.png b/public/images/double_cylinder_model.png deleted file mode 100644 index 960bd5e..0000000 Binary files a/public/images/double_cylinder_model.png and /dev/null differ diff --git a/public/images/double_cylinder_model_application1.png b/public/images/double_cylinder_model_application1.png deleted file mode 100644 index 0365c7e..0000000 Binary files a/public/images/double_cylinder_model_application1.png and /dev/null differ diff --git a/public/images/double_cylinder_model_application2.png b/public/images/double_cylinder_model_application2.png deleted file mode 100644 index 259b44c..0000000 Binary files a/public/images/double_cylinder_model_application2.png and /dev/null differ diff --git a/public/images/double_cylinder_model_lobes.png b/public/images/double_cylinder_model_lobes.png deleted file mode 100644 index 52a472f..0000000 Binary files a/public/images/double_cylinder_model_lobes.png and /dev/null differ diff --git a/public/images/double_cylinder_model_lobes2.png b/public/images/double_cylinder_model_lobes2.png deleted file mode 100644 index d06a5fc..0000000 Binary files a/public/images/double_cylinder_model_lobes2.png and /dev/null differ diff --git a/public/images/effect_of_focal_length_on_fov.png b/public/images/effect_of_focal_length_on_fov.png deleted file mode 100644 index b653d03..0000000 Binary files a/public/images/effect_of_focal_length_on_fov.png and /dev/null differ diff --git a/public/images/effect_of_sensor_size_on_fov.png b/public/images/effect_of_sensor_size_on_fov.png deleted file mode 100644 index d2fa300..0000000 Binary files a/public/images/effect_of_sensor_size_on_fov.png and /dev/null differ diff --git a/public/images/eg_BRDF_caarve.png b/public/images/eg_BRDF_caarve.png deleted file mode 100644 index 2f1dd14..0000000 Binary files a/public/images/eg_BRDF_caarve.png and /dev/null differ diff --git a/public/images/eg_BSSRDF_carve.png b/public/images/eg_BSSRDF_carve.png deleted file mode 100644 index 6642404..0000000 Binary files a/public/images/eg_BSSRDF_carve.png and /dev/null differ diff --git a/public/images/eg_Distance_Functions.png b/public/images/eg_Distance_Functions.png deleted file mode 100644 index af638d0..0000000 Binary files a/public/images/eg_Distance_Functions.png and /dev/null differ diff --git a/public/images/eg_Factals.png b/public/images/eg_Factals.png deleted file mode 100644 index 02e0800..0000000 Binary files a/public/images/eg_Factals.png and /dev/null differ diff --git a/public/images/eg_Quadric_Error_Mesh_Simplification.png b/public/images/eg_Quadric_Error_Mesh_Simplification.png deleted file mode 100644 index 5115d74..0000000 Binary files a/public/images/eg_Quadric_Error_Mesh_Simplification.png and /dev/null differ diff --git a/public/images/eg_Recursive_Ray_Tracing.png b/public/images/eg_Recursive_Ray_Tracing.png deleted file mode 100644 index 705aaea..0000000 Binary files a/public/images/eg_Recursive_Ray_Tracing.png and /dev/null differ diff --git a/public/images/eg_bidirectional_path_tracing.png b/public/images/eg_bidirectional_path_tracing.png deleted file mode 100644 index 59cb720..0000000 Binary files a/public/images/eg_bidirectional_path_tracing.png and /dev/null differ diff --git a/public/images/eg_expected_value.png b/public/images/eg_expected_value.png deleted file mode 100644 index d630807..0000000 Binary files a/public/images/eg_expected_value.png and /dev/null differ diff --git a/public/images/eg_explict_mapping.png b/public/images/eg_explict_mapping.png deleted file mode 100644 index 8dbf979..0000000 Binary files a/public/images/eg_explict_mapping.png and /dev/null differ diff --git a/public/images/eg_fresnel_reflection.png b/public/images/eg_fresnel_reflection.png deleted file mode 100644 index ceeca51..0000000 Binary files a/public/images/eg_fresnel_reflection.png and /dev/null differ diff --git a/public/images/eg_in_outside_test_easy.png b/public/images/eg_in_outside_test_easy.png deleted file mode 100644 index 8aad085..0000000 Binary files a/public/images/eg_in_outside_test_easy.png and /dev/null differ diff --git a/public/images/eg_kajiya-kay_model.png b/public/images/eg_kajiya-kay_model.png deleted file mode 100644 index 60b83b1..0000000 Binary files a/public/images/eg_kajiya-kay_model.png and /dev/null differ diff --git a/public/images/eg_marschner_model.png b/public/images/eg_marschner_model.png deleted file mode 100644 index e8b4278..0000000 Binary files a/public/images/eg_marschner_model.png and /dev/null differ diff --git a/public/images/eg_material_in_cg.png b/public/images/eg_material_in_cg.png deleted file mode 100644 index 741ec90..0000000 Binary files a/public/images/eg_material_in_cg.png and /dev/null differ diff --git a/public/images/eg_mesh_regularization.png b/public/images/eg_mesh_regularization.png deleted file mode 100644 index 37ef793..0000000 Binary files a/public/images/eg_mesh_regularization.png and /dev/null differ diff --git a/public/images/eg_mesh_simplification.png b/public/images/eg_mesh_simplification.png deleted file mode 100644 index ed56a65..0000000 Binary files a/public/images/eg_mesh_simplification.png and /dev/null differ diff --git a/public/images/eg_mesh_subdivision.png b/public/images/eg_mesh_subdivision.png deleted file mode 100644 index c4c2a67..0000000 Binary files a/public/images/eg_mesh_subdivision.png and /dev/null differ diff --git a/public/images/eg_object_partition.png b/public/images/eg_object_partition.png deleted file mode 100644 index 9d5bd21..0000000 Binary files a/public/images/eg_object_partition.png and /dev/null differ diff --git a/public/images/eg_of_rendering_with_lens_focus.png b/public/images/eg_of_rendering_with_lens_focus.png deleted file mode 100644 index 39e5b33..0000000 Binary files a/public/images/eg_of_rendering_with_lens_focus.png and /dev/null differ diff --git a/public/images/eg_point_cloud.png b/public/images/eg_point_cloud.png deleted file mode 100644 index 2ceb004..0000000 Binary files a/public/images/eg_point_cloud.png and /dev/null differ diff --git a/public/images/eg_polygon_mesh.png b/public/images/eg_polygon_mesh.png deleted file mode 100644 index 89c85a3..0000000 Binary files a/public/images/eg_polygon_mesh.png and /dev/null differ diff --git a/public/images/eg_sample_can_be_hard.png b/public/images/eg_sample_can_be_hard.png deleted file mode 100644 index 3409726..0000000 Binary files a/public/images/eg_sample_can_be_hard.png and /dev/null differ diff --git a/public/images/eg_snell_window.png b/public/images/eg_snell_window.png deleted file mode 100644 index 389fd0f..0000000 Binary files a/public/images/eg_snell_window.png and /dev/null differ diff --git a/public/images/eg_spatial_partition.png b/public/images/eg_spatial_partition.png deleted file mode 100644 index 13e42d9..0000000 Binary files a/public/images/eg_spatial_partition.png and /dev/null differ diff --git a/public/images/eg_specular_refraction.png b/public/images/eg_specular_refraction.png deleted file mode 100644 index 7b75184..0000000 Binary files a/public/images/eg_specular_refraction.png and /dev/null differ diff --git a/public/images/evaluation_of_bezier_surface.png b/public/images/evaluation_of_bezier_surface.png deleted file mode 100644 index 38a75bf..0000000 Binary files a/public/images/evaluation_of_bezier_surface.png and /dev/null differ diff --git a/public/images/example_f-stop_caculations.png b/public/images/example_f-stop_caculations.png deleted file mode 100644 index e3119ed..0000000 Binary files a/public/images/example_f-stop_caculations.png and /dev/null differ diff --git a/public/images/explosion_of_ray_as_ray_go_up.png b/public/images/explosion_of_ray_as_ray_go_up.png deleted file mode 100644 index dd683f2..0000000 Binary files a/public/images/explosion_of_ray_as_ray_go_up.png and /dev/null differ diff --git a/public/images/exposure_aperture_shutter_gain.png b/public/images/exposure_aperture_shutter_gain.png deleted file mode 100644 index 1ed3931..0000000 Binary files a/public/images/exposure_aperture_shutter_gain.png and /dev/null differ diff --git a/public/images/f-stop_vs_shutter_speed.png b/public/images/f-stop_vs_shutter_speed.png deleted file mode 100644 index bdf105d..0000000 Binary files a/public/images/f-stop_vs_shutter_speed.png and /dev/null differ diff --git a/public/images/figure.5.17.png b/public/images/figure.5.17.png deleted file mode 100644 index b0a8598..0000000 Binary files a/public/images/figure.5.17.png and /dev/null differ diff --git a/public/images/figure5.17.1.png b/public/images/figure5.17.1.png deleted file mode 100644 index 16b83f2..0000000 Binary files a/public/images/figure5.17.1.png and /dev/null differ diff --git a/public/images/first_page(100w).png b/public/images/first_page(100w).png deleted file mode 100644 index fc58966..0000000 Binary files a/public/images/first_page(100w).png and /dev/null differ diff --git a/public/images/first_page(150w).png b/public/images/first_page(150w).png deleted file mode 100644 index a24c5b1..0000000 Binary files a/public/images/first_page(150w).png and /dev/null differ diff --git a/public/images/first_page.png b/public/images/first_page.png deleted file mode 100644 index 29852d8..0000000 Binary files a/public/images/first_page.png and /dev/null differ diff --git a/public/images/flat_shading.png b/public/images/flat_shading.png deleted file mode 100644 index 8afcc7f..0000000 Binary files a/public/images/flat_shading.png and /dev/null differ diff --git a/public/images/flight_euler_angle.png b/public/images/flight_euler_angle.png deleted file mode 100644 index f7345dc..0000000 Binary files a/public/images/flight_euler_angle.png and /dev/null differ diff --git a/public/images/focal_length_vs_filed_of_view1.png b/public/images/focal_length_vs_filed_of_view1.png deleted file mode 100644 index 88dff9e..0000000 Binary files a/public/images/focal_length_vs_filed_of_view1.png and /dev/null differ diff --git a/public/images/focle_length_vs_field_of_view2.png b/public/images/focle_length_vs_field_of_view2.png deleted file mode 100644 index c5c95d6..0000000 Binary files a/public/images/focle_length_vs_field_of_view2.png and /dev/null differ diff --git a/public/images/four-bounce_global_illumination_eg.png b/public/images/four-bounce_global_illumination_eg.png deleted file mode 100644 index c956135..0000000 Binary files a/public/images/four-bounce_global_illumination_eg.png and /dev/null differ diff --git a/public/images/fovY.png b/public/images/fovY.png deleted file mode 100644 index b99ab95..0000000 Binary files a/public/images/fovY.png and /dev/null differ diff --git a/public/images/fresnel_term_conductor.png b/public/images/fresnel_term_conductor.png deleted file mode 100644 index e01a810..0000000 Binary files a/public/images/fresnel_term_conductor.png and /dev/null differ diff --git a/public/images/fresnel_term_dielectric.png b/public/images/fresnel_term_dielectric.png deleted file mode 100644 index a520a58..0000000 Binary files a/public/images/fresnel_term_dielectric.png and /dev/null differ diff --git a/public/images/fresnel_term_formule.png b/public/images/fresnel_term_formule.png deleted file mode 100644 index 8112ef5..0000000 Binary files a/public/images/fresnel_term_formule.png and /dev/null differ diff --git a/public/images/fur_appearance_as_human_fur.png b/public/images/fur_appearance_as_human_fur.png deleted file mode 100644 index a81b2be..0000000 Binary files a/public/images/fur_appearance_as_human_fur.png and /dev/null differ diff --git a/public/images/gauss_ray_diagrams.png b/public/images/gauss_ray_diagrams.png deleted file mode 100644 index 66db2af..0000000 Binary files a/public/images/gauss_ray_diagrams.png and /dev/null differ diff --git a/public/images/gauss_ray_tracing_construction.png b/public/images/gauss_ray_tracing_construction.png deleted file mode 100644 index f8899e1..0000000 Binary files a/public/images/gauss_ray_tracing_construction.png and /dev/null differ diff --git a/public/images/gauss_ray_tracing_construction1.png b/public/images/gauss_ray_tracing_construction1.png deleted file mode 100644 index 8474721..0000000 Binary files a/public/images/gauss_ray_tracing_construction1.png and /dev/null differ diff --git a/public/images/gauss_ray_tracing_construction2.png b/public/images/gauss_ray_tracing_construction2.png deleted file mode 100644 index 16ffd98..0000000 Binary files a/public/images/gauss_ray_tracing_construction2.png and /dev/null differ diff --git a/public/images/geometric_barycentric.png b/public/images/geometric_barycentric.png deleted file mode 100644 index eb3caa7..0000000 Binary files a/public/images/geometric_barycentric.png and /dev/null differ diff --git a/public/images/glossy_material.png b/public/images/glossy_material.png deleted file mode 100644 index 8c4e1aa..0000000 Binary files a/public/images/glossy_material.png and /dev/null differ diff --git a/public/images/gonioreflectometer.png b/public/images/gonioreflectometer.png deleted file mode 100644 index 18544a3..0000000 Binary files a/public/images/gonioreflectometer.png and /dev/null differ diff --git a/public/images/granular_material.png b/public/images/granular_material.png deleted file mode 100644 index 1a1b681..0000000 Binary files a/public/images/granular_material.png and /dev/null differ diff --git a/public/images/granular_material_1.png b/public/images/granular_material_1.png deleted file mode 100644 index ab930f2..0000000 Binary files a/public/images/granular_material_1.png and /dev/null differ diff --git a/public/images/granular_material_application1.png b/public/images/granular_material_application1.png deleted file mode 100644 index cfadf66..0000000 Binary files a/public/images/granular_material_application1.png and /dev/null differ diff --git a/public/images/granular_material_application2.png b/public/images/granular_material_application2.png deleted file mode 100644 index bf89e5f..0000000 Binary files a/public/images/granular_material_application2.png and /dev/null differ diff --git a/public/images/grid_build_progress_step1.png b/public/images/grid_build_progress_step1.png deleted file mode 100644 index bfd5f51..0000000 Binary files a/public/images/grid_build_progress_step1.png and /dev/null differ diff --git a/public/images/grid_build_progress_step2.png b/public/images/grid_build_progress_step2.png deleted file mode 100644 index fcdbef4..0000000 Binary files a/public/images/grid_build_progress_step2.png and /dev/null differ diff --git a/public/images/grid_build_progress_step3.png b/public/images/grid_build_progress_step3.png deleted file mode 100644 index 7ef4eda..0000000 Binary files a/public/images/grid_build_progress_step3.png and /dev/null differ diff --git a/public/images/grid_resolution_heuristic.png b/public/images/grid_resolution_heuristic.png deleted file mode 100644 index 26606d1..0000000 Binary files a/public/images/grid_resolution_heuristic.png and /dev/null differ diff --git a/public/images/grid_resolution_one_cell.png b/public/images/grid_resolution_one_cell.png deleted file mode 100644 index bd51e14..0000000 Binary files a/public/images/grid_resolution_one_cell.png and /dev/null differ diff --git a/public/images/grid_resolution_too_many.jpg b/public/images/grid_resolution_too_many.jpg deleted file mode 100644 index 1018f1e..0000000 Binary files a/public/images/grid_resolution_too_many.jpg and /dev/null differ diff --git a/public/images/hair_appearance.png b/public/images/hair_appearance.png deleted file mode 100644 index 0702b00..0000000 Binary files a/public/images/hair_appearance.png and /dev/null differ diff --git a/public/images/hair_appearance_model_application1.png b/public/images/hair_appearance_model_application1.png deleted file mode 100644 index fb7f65c..0000000 Binary files a/public/images/hair_appearance_model_application1.png and /dev/null differ diff --git a/public/images/hair_appearance_model_application2.png b/public/images/hair_appearance_model_application2.png deleted file mode 100644 index 13e74cd..0000000 Binary files a/public/images/hair_appearance_model_application2.png and /dev/null differ diff --git a/public/images/hight-speed_photography1.png b/public/images/hight-speed_photography1.png deleted file mode 100644 index 00936b3..0000000 Binary files a/public/images/hight-speed_photography1.png and /dev/null differ diff --git a/public/images/hight-speed_photography2.png b/public/images/hight-speed_photography2.png deleted file mode 100644 index 7552652..0000000 Binary files a/public/images/hight-speed_photography2.png and /dev/null differ diff --git a/public/images/human_fur_vs_animal_fur.png b/public/images/human_fur_vs_animal_fur.png deleted file mode 100644 index 70dc59f..0000000 Binary files a/public/images/human_fur_vs_animal_fur.png and /dev/null differ diff --git a/public/images/ico(192x192).png b/public/images/ico(192x192).png deleted file mode 100644 index 6d81bde..0000000 Binary files a/public/images/ico(192x192).png and /dev/null differ diff --git a/public/images/ico_32X32.png b/public/images/ico_32X32.png deleted file mode 100644 index d4e0620..0000000 Binary files a/public/images/ico_32X32.png and /dev/null differ diff --git a/public/images/icon_normal.png b/public/images/icon_normal.png deleted file mode 100644 index 29852d8..0000000 Binary files a/public/images/icon_normal.png and /dev/null differ diff --git a/public/images/ideal_thin_lens_focal_point.png b/public/images/ideal_thin_lens_focal_point.png deleted file mode 100644 index b5f8eaa..0000000 Binary files a/public/images/ideal_thin_lens_focal_point.png and /dev/null differ diff --git a/public/images/image-based_BRDF_measurement.png b/public/images/image-based_BRDF_measurement.png deleted file mode 100644 index 27d3190..0000000 Binary files a/public/images/image-based_BRDF_measurement.png and /dev/null differ diff --git a/public/images/image_synthesis_capture.png b/public/images/image_synthesis_capture.png deleted file mode 100644 index 65f6446..0000000 Binary files a/public/images/image_synthesis_capture.png and /dev/null differ diff --git a/public/images/importance_of_medulla.png b/public/images/importance_of_medulla.png deleted file mode 100644 index 9ae4230..0000000 Binary files a/public/images/importance_of_medulla.png and /dev/null differ diff --git a/public/images/importance_of_medulla2.png b/public/images/importance_of_medulla2.png deleted file mode 100644 index 18f8ca2..0000000 Binary files a/public/images/importance_of_medulla2.png and /dev/null differ diff --git a/public/images/inside_the_camera.png b/public/images/inside_the_camera.png deleted file mode 100644 index 3fc64bd..0000000 Binary files a/public/images/inside_the_camera.png and /dev/null differ diff --git a/public/images/instant_radiosity.png b/public/images/instant_radiosity.png deleted file mode 100644 index 8bf6b55..0000000 Binary files a/public/images/instant_radiosity.png and /dev/null differ diff --git a/public/images/instant_radiosity_eg.png b/public/images/instant_radiosity_eg.png deleted file mode 100644 index cd7d0a4..0000000 Binary files a/public/images/instant_radiosity_eg.png and /dev/null differ diff --git a/public/images/introducing_global_illumination.png b/public/images/introducing_global_illumination.png deleted file mode 100644 index d5e5df8..0000000 Binary files a/public/images/introducing_global_illumination.png and /dev/null differ diff --git a/public/images/irregular_pixel_footprint.png b/public/images/irregular_pixel_footprint.png deleted file mode 100644 index fd152fb..0000000 Binary files a/public/images/irregular_pixel_footprint.png and /dev/null differ diff --git a/public/images/is_path_tracing_correct.png b/public/images/is_path_tracing_correct.png deleted file mode 100644 index 348e2a2..0000000 Binary files a/public/images/is_path_tracing_correct.png and /dev/null differ diff --git a/public/images/isotropic_inside_an_elevator.png b/public/images/isotropic_inside_an_elevator.png deleted file mode 100644 index 6f40d50..0000000 Binary files a/public/images/isotropic_inside_an_elevator.png and /dev/null differ diff --git a/public/images/isotropic_materials_theory.png b/public/images/isotropic_materials_theory.png deleted file mode 100644 index 6a772f4..0000000 Binary files a/public/images/isotropic_materials_theory.png and /dev/null differ diff --git a/public/images/kajiya-kay_model.png b/public/images/kajiya-kay_model.png deleted file mode 100644 index 993a600..0000000 Binary files a/public/images/kajiya-kay_model.png and /dev/null differ diff --git a/public/images/lambert'scosine_low.png b/public/images/lambert'scosine_low.png deleted file mode 100644 index 4b6eb2e..0000000 Binary files a/public/images/lambert'scosine_low.png and /dev/null differ diff --git a/public/images/largest_pinhole_photograph.png b/public/images/largest_pinhole_photograph.png deleted file mode 100644 index 494ab11..0000000 Binary files a/public/images/largest_pinhole_photograph.png and /dev/null differ diff --git a/public/images/largest_pinhole_photograph1.png b/public/images/largest_pinhole_photograph1.png deleted file mode 100644 index f6f5deb..0000000 Binary files a/public/images/largest_pinhole_photograph1.png and /dev/null differ diff --git a/public/images/lenses_from_image_on_sensor.png b/public/images/lenses_from_image_on_sensor.png deleted file mode 100644 index aa188b3..0000000 Binary files a/public/images/lenses_from_image_on_sensor.png and /dev/null differ diff --git a/public/images/light_separete.png b/public/images/light_separete.png deleted file mode 100644 index 0773227..0000000 Binary files a/public/images/light_separete.png and /dev/null differ diff --git a/public/images/light_source_blocked_judge.png b/public/images/light_source_blocked_judge.png deleted file mode 100644 index 30d07aa..0000000 Binary files a/public/images/light_source_blocked_judge.png and /dev/null differ diff --git a/public/images/long-exposure_photography1.png b/public/images/long-exposure_photography1.png deleted file mode 100644 index 3057c93..0000000 Binary files a/public/images/long-exposure_photography1.png and /dev/null differ diff --git a/public/images/long-exposure_photography2.png b/public/images/long-exposure_photography2.png deleted file mode 100644 index 0d78ca5..0000000 Binary files a/public/images/long-exposure_photography2.png and /dev/null differ diff --git a/public/images/long-exposure_photography3.png b/public/images/long-exposure_photography3.png deleted file mode 100644 index eccc4f7..0000000 Binary files a/public/images/long-exposure_photography3.png and /dev/null differ diff --git a/public/images/loop_subdivision_new.png b/public/images/loop_subdivision_new.png deleted file mode 100644 index 0591637..0000000 Binary files a/public/images/loop_subdivision_new.png and /dev/null differ diff --git a/public/images/loop_subdivision_old.png b/public/images/loop_subdivision_old.png deleted file mode 100644 index 32c550b..0000000 Binary files a/public/images/loop_subdivision_old.png and /dev/null differ diff --git a/public/images/marschner_model1.png b/public/images/marschner_model1.png deleted file mode 100644 index 835b457..0000000 Binary files a/public/images/marschner_model1.png and /dev/null differ diff --git a/public/images/marschner_model2.png b/public/images/marschner_model2.png deleted file mode 100644 index 82084a0..0000000 Binary files a/public/images/marschner_model2.png and /dev/null differ diff --git a/public/images/measuring_BRDF_motivation.png b/public/images/measuring_BRDF_motivation.png deleted file mode 100644 index 9509bd4..0000000 Binary files a/public/images/measuring_BRDF_motivation.png and /dev/null differ diff --git a/public/images/medium_eg_snell_law.png b/public/images/medium_eg_snell_law.png deleted file mode 100644 index 2f700b5..0000000 Binary files a/public/images/medium_eg_snell_law.png and /dev/null differ diff --git a/public/images/microfacet_BRDF_caculate.png b/public/images/microfacet_BRDF_caculate.png deleted file mode 100644 index 17916d0..0000000 Binary files a/public/images/microfacet_BRDF_caculate.png and /dev/null differ diff --git a/public/images/microfacet_BRDF_diffuse.png b/public/images/microfacet_BRDF_diffuse.png deleted file mode 100644 index 27d6338..0000000 Binary files a/public/images/microfacet_BRDF_diffuse.png and /dev/null differ diff --git a/public/images/microfacet_BRDF_example.png b/public/images/microfacet_BRDF_example.png deleted file mode 100644 index 47cdeb0..0000000 Binary files a/public/images/microfacet_BRDF_example.png and /dev/null differ diff --git a/public/images/microfacet_BRDF_glossy.png b/public/images/microfacet_BRDF_glossy.png deleted file mode 100644 index 0287693..0000000 Binary files a/public/images/microfacet_BRDF_glossy.png and /dev/null differ diff --git a/public/images/microfacet_theory.png b/public/images/microfacet_theory.png deleted file mode 100644 index 19559f2..0000000 Binary files a/public/images/microfacet_theory.png and /dev/null differ diff --git a/public/images/mip_hierarchy.png b/public/images/mip_hierarchy.png deleted file mode 100644 index eb45127..0000000 Binary files a/public/images/mip_hierarchy.png and /dev/null differ diff --git a/public/images/mipmap_information.png b/public/images/mipmap_information.png deleted file mode 100644 index 8436470..0000000 Binary files a/public/images/mipmap_information.png and /dev/null differ diff --git a/public/images/mirror_and_glossy_reflection.png b/public/images/mirror_and_glossy_reflection.png deleted file mode 100644 index 2340017..0000000 Binary files a/public/images/mirror_and_glossy_reflection.png and /dev/null differ diff --git a/public/images/mixed_frequency_content.png b/public/images/mixed_frequency_content.png deleted file mode 100644 index 833f9b0..0000000 Binary files a/public/images/mixed_frequency_content.png and /dev/null differ diff --git a/public/images/modern_LED.png b/public/images/modern_LED.png deleted file mode 100644 index 67ba96f..0000000 Binary files a/public/images/modern_LED.png and /dev/null differ diff --git a/public/images/moire_and_jaggies.png b/public/images/moire_and_jaggies.png deleted file mode 100644 index 7c5860b..0000000 Binary files a/public/images/moire_and_jaggies.png and /dev/null differ diff --git a/public/images/msapplication(270x270).png b/public/images/msapplication(270x270).png deleted file mode 100644 index 4f48bdb..0000000 Binary files a/public/images/msapplication(270x270).png and /dev/null differ diff --git a/public/images/ocean_wave_detail.png b/public/images/ocean_wave_detail.png deleted file mode 100644 index 321b54e..0000000 Binary files a/public/images/ocean_wave_detail.png and /dev/null differ diff --git a/public/images/offset_projection_matrix.png b/public/images/offset_projection_matrix.png deleted file mode 100644 index 4dd61d0..0000000 Binary files a/public/images/offset_projection_matrix.png and /dev/null differ diff --git a/public/images/one-bounce_global_illumination_eg.png b/public/images/one-bounce_global_illumination_eg.png deleted file mode 100644 index daf1969..0000000 Binary files a/public/images/one-bounce_global_illumination_eg.png and /dev/null differ diff --git a/public/images/one_pixel_thick_ghosting.png b/public/images/one_pixel_thick_ghosting.png deleted file mode 100644 index 72f4c5b..0000000 Binary files a/public/images/one_pixel_thick_ghosting.png and /dev/null differ diff --git a/public/images/p-NDF_sharps.png b/public/images/p-NDF_sharps.png deleted file mode 100644 index f0b2bd3..0000000 Binary files a/public/images/p-NDF_sharps.png and /dev/null differ diff --git a/public/images/p-NDFs_have_sharp_features.png b/public/images/p-NDFs_have_sharp_features.png deleted file mode 100644 index 7702bcf..0000000 Binary files a/public/images/p-NDFs_have_sharp_features.png and /dev/null differ diff --git a/public/images/participating_media1.png b/public/images/participating_media1.png deleted file mode 100644 index f58f71b..0000000 Binary files a/public/images/participating_media1.png and /dev/null differ diff --git a/public/images/participating_media2.png b/public/images/participating_media2.png deleted file mode 100644 index b038c94..0000000 Binary files a/public/images/participating_media2.png and /dev/null differ diff --git a/public/images/participating_media_application1.png b/public/images/participating_media_application1.png deleted file mode 100644 index 8859be7..0000000 Binary files a/public/images/participating_media_application1.png and /dev/null differ diff --git a/public/images/participating_media_application2.png b/public/images/participating_media_application2.png deleted file mode 100644 index 53d689a..0000000 Binary files a/public/images/participating_media_application2.png and /dev/null differ diff --git a/public/images/participating_media_cloud.png b/public/images/participating_media_cloud.png deleted file mode 100644 index c614755..0000000 Binary files a/public/images/participating_media_cloud.png and /dev/null differ diff --git a/public/images/participating_media_demo.png b/public/images/participating_media_demo.png deleted file mode 100644 index 45ef6e8..0000000 Binary files a/public/images/participating_media_demo.png and /dev/null differ diff --git a/public/images/participating_media_fog.png b/public/images/participating_media_fog.png deleted file mode 100644 index f7a34d2..0000000 Binary files a/public/images/participating_media_fog.png and /dev/null differ diff --git a/public/images/participating_media_rendering.png b/public/images/participating_media_rendering.png deleted file mode 100644 index fdab520..0000000 Binary files a/public/images/participating_media_rendering.png and /dev/null differ diff --git a/public/images/path_traced_direct_global_illumination.png b/public/images/path_traced_direct_global_illumination.png deleted file mode 100644 index 322b323..0000000 Binary files a/public/images/path_traced_direct_global_illumination.png and /dev/null differ diff --git a/public/images/perfect_specular_reflection_in_physic1.png b/public/images/perfect_specular_reflection_in_physic1.png deleted file mode 100644 index bc57679..0000000 Binary files a/public/images/perfect_specular_reflection_in_physic1.png and /dev/null differ diff --git a/public/images/perfect_specular_reflection_in_physic2.png b/public/images/perfect_specular_reflection_in_physic2.png deleted file mode 100644 index 3dabef8..0000000 Binary files a/public/images/perfect_specular_reflection_in_physic2.png and /dev/null differ diff --git a/public/images/perturb_the_normal.png b/public/images/perturb_the_normal.png deleted file mode 100644 index 2d8a6c0..0000000 Binary files a/public/images/perturb_the_normal.png and /dev/null differ diff --git a/public/images/phong_shading.png b/public/images/phong_shading.png deleted file mode 100644 index 5e319f5..0000000 Binary files a/public/images/phong_shading.png and /dev/null differ diff --git a/public/images/photon_mapping_approach.png b/public/images/photon_mapping_approach.png deleted file mode 100644 index 7326fa3..0000000 Binary files a/public/images/photon_mapping_approach.png and /dev/null differ diff --git a/public/images/photon_mapping_biased.png b/public/images/photon_mapping_biased.png deleted file mode 100644 index ae63e8d..0000000 Binary files a/public/images/photon_mapping_biased.png and /dev/null differ diff --git a/public/images/photon_mapping_cacul.png b/public/images/photon_mapping_cacul.png deleted file mode 100644 index 3269fac..0000000 Binary files a/public/images/photon_mapping_cacul.png and /dev/null differ diff --git a/public/images/photon_mapping_theory.png b/public/images/photon_mapping_theory.png deleted file mode 100644 index e09d131..0000000 Binary files a/public/images/photon_mapping_theory.png and /dev/null differ diff --git a/public/images/physical_shutter.png b/public/images/physical_shutter.png deleted file mode 100644 index 26ddfc3..0000000 Binary files a/public/images/physical_shutter.png and /dev/null differ diff --git a/public/images/pinhole_camera.png b/public/images/pinhole_camera.png deleted file mode 100644 index 28a5081..0000000 Binary files a/public/images/pinhole_camera.png and /dev/null differ diff --git a/public/images/pixel_and_screen_space.png b/public/images/pixel_and_screen_space.png deleted file mode 100644 index e23f60d..0000000 Binary files a/public/images/pixel_and_screen_space.png and /dev/null differ diff --git a/public/images/pixel_result.png b/public/images/pixel_result.png deleted file mode 100644 index e0f629e..0000000 Binary files a/public/images/pixel_result.png and /dev/null differ diff --git a/public/images/point_query_and_range_query.png b/public/images/point_query_and_range_query.png deleted file mode 100644 index aaf6ba0..0000000 Binary files a/public/images/point_query_and_range_query.png and /dev/null differ diff --git a/public/images/post_aliasing.png b/public/images/post_aliasing.png deleted file mode 100644 index 747a5e8..0000000 Binary files a/public/images/post_aliasing.png and /dev/null differ diff --git a/public/images/pre-filter_sample.png b/public/images/pre-filter_sample.png deleted file mode 100644 index b66baad..0000000 Binary files a/public/images/pre-filter_sample.png and /dev/null differ diff --git a/public/images/probability_distribution_function.png b/public/images/probability_distribution_function.png deleted file mode 100644 index 889a9b6..0000000 Binary files a/public/images/probability_distribution_function.png and /dev/null differ diff --git a/public/images/procedural_appearance1.png b/public/images/procedural_appearance1.png deleted file mode 100644 index f633a6b..0000000 Binary files a/public/images/procedural_appearance1.png and /dev/null differ diff --git a/public/images/procedural_appearance2.png b/public/images/procedural_appearance2.png deleted file mode 100644 index f983c87..0000000 Binary files a/public/images/procedural_appearance2.png and /dev/null differ diff --git a/public/images/procedural_appearance3.png b/public/images/procedural_appearance3.png deleted file mode 100644 index 74d714b..0000000 Binary files a/public/images/procedural_appearance3.png and /dev/null differ diff --git a/public/images/procedural_appearance4.png b/public/images/procedural_appearance4.png deleted file mode 100644 index dfbcaee..0000000 Binary files a/public/images/procedural_appearance4.png and /dev/null differ diff --git a/public/images/procedural_appearance5.png b/public/images/procedural_appearance5.png deleted file mode 100644 index eb959a3..0000000 Binary files a/public/images/procedural_appearance5.png and /dev/null differ diff --git a/public/images/procedural_appearance6.png b/public/images/procedural_appearance6.png deleted file mode 100644 index 4f68966..0000000 Binary files a/public/images/procedural_appearance6.png and /dev/null differ diff --git a/public/images/project_to_light.png b/public/images/project_to_light.png deleted file mode 100644 index ce2adab..0000000 Binary files a/public/images/project_to_light.png and /dev/null differ diff --git a/public/images/radiance_define.png b/public/images/radiance_define.png deleted file mode 100644 index e871f74..0000000 Binary files a/public/images/radiance_define.png and /dev/null differ diff --git a/public/images/ray_tracing_for_defocus_blur.png b/public/images/ray_tracing_for_defocus_blur.png deleted file mode 100644 index 222b56d..0000000 Binary files a/public/images/ray_tracing_for_defocus_blur.png and /dev/null differ diff --git a/public/images/ray_tracing_for_defocus_blur1.png b/public/images/ray_tracing_for_defocus_blur1.png deleted file mode 100644 index a517611..0000000 Binary files a/public/images/ray_tracing_for_defocus_blur1.png and /dev/null differ diff --git a/public/images/real_lens_dfsigns_are_comples.png b/public/images/real_lens_dfsigns_are_comples.png deleted file mode 100644 index 223920f..0000000 Binary files a/public/images/real_lens_dfsigns_are_comples.png and /dev/null differ diff --git a/public/images/real_lens_elements_are_not_ideal.png b/public/images/real_lens_elements_are_not_ideal.png deleted file mode 100644 index 640e08a..0000000 Binary files a/public/images/real_lens_elements_are_not_ideal.png and /dev/null differ diff --git a/public/images/reason_for_monte_carlo_integration.png b/public/images/reason_for_monte_carlo_integration.png deleted file mode 100644 index e36f9f8..0000000 Binary files a/public/images/reason_for_monte_carlo_integration.png and /dev/null differ diff --git a/public/images/reason_of_being_inefficient.png b/public/images/reason_of_being_inefficient.png deleted file mode 100644 index 8db3139..0000000 Binary files a/public/images/reason_of_being_inefficient.png and /dev/null differ diff --git a/public/images/reflaction_radiance_irradiance.png b/public/images/reflaction_radiance_irradiance.png deleted file mode 100644 index a83e468..0000000 Binary files a/public/images/reflaction_radiance_irradiance.png and /dev/null differ diff --git a/public/images/render_as_surface_limitation.png b/public/images/render_as_surface_limitation.png deleted file mode 100644 index c6c8cb3..0000000 Binary files a/public/images/render_as_surface_limitation.png and /dev/null differ diff --git a/public/images/render_from_light.png b/public/images/render_from_light.png deleted file mode 100644 index 91d6588..0000000 Binary files a/public/images/render_from_light.png and /dev/null differ diff --git a/public/images/rendering_equation_simplify.png b/public/images/rendering_equation_simplify.png deleted file mode 100644 index fc5ccd0..0000000 Binary files a/public/images/rendering_equation_simplify.png and /dev/null differ diff --git a/public/images/resample_downsampling.png b/public/images/resample_downsampling.png deleted file mode 100644 index 945390c..0000000 Binary files a/public/images/resample_downsampling.png and /dev/null differ diff --git a/public/images/resample_upsample.png b/public/images/resample_upsample.png deleted file mode 100644 index 8c957b3..0000000 Binary files a/public/images/resample_upsample.png and /dev/null differ diff --git a/public/images/revealed_piels_appear_bad.png b/public/images/revealed_piels_appear_bad.png deleted file mode 100644 index 0cb70e6..0000000 Binary files a/public/images/revealed_piels_appear_bad.png and /dev/null differ diff --git a/public/images/rotate_around_point.png b/public/images/rotate_around_point.png deleted file mode 100644 index 984c167..0000000 Binary files a/public/images/rotate_around_point.png and /dev/null differ diff --git a/public/images/sample_and_reconstruct.png b/public/images/sample_and_reconstruct.png deleted file mode 100644 index 1514758..0000000 Binary files a/public/images/sample_and_reconstruct.png and /dev/null differ diff --git a/public/images/sample_point_position.png b/public/images/sample_point_position.png deleted file mode 100644 index 7f9d10d..0000000 Binary files a/public/images/sample_point_position.png and /dev/null differ diff --git a/public/images/sample_progress.png b/public/images/sample_progress.png deleted file mode 100644 index 36bb0c4..0000000 Binary files a/public/images/sample_progress.png and /dev/null differ diff --git a/public/images/sample_resulst.png b/public/images/sample_resulst.png deleted file mode 100644 index 22364e3..0000000 Binary files a/public/images/sample_resulst.png and /dev/null differ diff --git a/public/images/sample_the_light.png b/public/images/sample_the_light.png deleted file mode 100644 index 74abf93..0000000 Binary files a/public/images/sample_the_light.png and /dev/null differ diff --git a/public/images/scttering_functions.png b/public/images/scttering_functions.png deleted file mode 100644 index 91f7939..0000000 Binary files a/public/images/scttering_functions.png and /dev/null differ diff --git a/public/images/sensor_accumulates_irradiance_during_exposure.png b/public/images/sensor_accumulates_irradiance_during_exposure.png deleted file mode 100644 index dfb0b63..0000000 Binary files a/public/images/sensor_accumulates_irradiance_during_exposure.png and /dev/null differ diff --git a/public/images/sensor_size.png b/public/images/sensor_size.png deleted file mode 100644 index d7bf8c1..0000000 Binary files a/public/images/sensor_size.png and /dev/null differ diff --git a/public/images/sensors_without_lenses.png b/public/images/sensors_without_lenses.png deleted file mode 100644 index 8258750..0000000 Binary files a/public/images/sensors_without_lenses.png and /dev/null differ diff --git a/public/images/shading_light_caculate.png b/public/images/shading_light_caculate.png deleted file mode 100644 index 93530f3..0000000 Binary files a/public/images/shading_light_caculate.png and /dev/null differ diff --git a/public/images/side_effect_of_shutter_speed.png b/public/images/side_effect_of_shutter_speed.png deleted file mode 100644 index 344b521..0000000 Binary files a/public/images/side_effect_of_shutter_speed.png and /dev/null differ diff --git a/public/images/side_effect_of_shutter_speed1.png b/public/images/side_effect_of_shutter_speed1.png deleted file mode 100644 index 72ea553..0000000 Binary files a/public/images/side_effect_of_shutter_speed1.png and /dev/null differ diff --git a/public/images/side_effect_of_shutter_speed2.png b/public/images/side_effect_of_shutter_speed2.png deleted file mode 100644 index 00c8e68..0000000 Binary files a/public/images/side_effect_of_shutter_speed2.png and /dev/null differ diff --git a/public/images/signal_high_low_frequ.png b/public/images/signal_high_low_frequ.png deleted file mode 100644 index a74ac90..0000000 Binary files a/public/images/signal_high_low_frequ.png and /dev/null differ diff --git a/public/images/sinc_filter_process.png b/public/images/sinc_filter_process.png deleted file mode 100644 index 8fe3a10..0000000 Binary files a/public/images/sinc_filter_process.png and /dev/null differ diff --git a/public/images/size_of_coc_is_inversely_proportional_to_f-stop.png b/public/images/size_of_coc_is_inversely_proportional_to_f-stop.png deleted file mode 100644 index 79623ce..0000000 Binary files a/public/images/size_of_coc_is_inversely_proportional_to_f-stop.png and /dev/null differ diff --git a/public/images/snell_law_caculation.png b/public/images/snell_law_caculation.png deleted file mode 100644 index 7e6742c..0000000 Binary files a/public/images/snell_law_caculation.png and /dev/null differ diff --git a/public/images/specular_cacular.png b/public/images/specular_cacular.png deleted file mode 100644 index 2c8df52..0000000 Binary files a/public/images/specular_cacular.png and /dev/null differ diff --git a/public/images/specular_value_change_show.png b/public/images/specular_value_change_show.png deleted file mode 100644 index 0198d65..0000000 Binary files a/public/images/specular_value_change_show.png and /dev/null differ diff --git a/public/images/subsurface_scattering.png b/public/images/subsurface_scattering.png deleted file mode 100644 index ec28481..0000000 Binary files a/public/images/subsurface_scattering.png and /dev/null differ diff --git a/public/images/suppose_scene_1.png b/public/images/suppose_scene_1.png deleted file mode 100644 index f102998..0000000 Binary files a/public/images/suppose_scene_1.png and /dev/null differ diff --git a/public/images/tabular_representation.png b/public/images/tabular_representation.png deleted file mode 100644 index eba71b3..0000000 Binary files a/public/images/tabular_representation.png and /dev/null differ diff --git a/public/images/tent_filter_constructed.png b/public/images/tent_filter_constructed.png deleted file mode 100644 index 4cd8b9c..0000000 Binary files a/public/images/tent_filter_constructed.png and /dev/null differ diff --git a/public/images/the_reflection_equation.png b/public/images/the_reflection_equation.png deleted file mode 100644 index 8e43e92..0000000 Binary files a/public/images/the_reflection_equation.png and /dev/null differ diff --git a/public/images/three_filter.png b/public/images/three_filter.png deleted file mode 100644 index 85c06be..0000000 Binary files a/public/images/three_filter.png and /dev/null differ diff --git a/public/images/translucent_material_jade.png b/public/images/translucent_material_jade.png deleted file mode 100644 index ad3694e..0000000 Binary files a/public/images/translucent_material_jade.png and /dev/null differ diff --git a/public/images/translucent_material_jellyfish.png b/public/images/translucent_material_jellyfish.png deleted file mode 100644 index 3e396b8..0000000 Binary files a/public/images/translucent_material_jellyfish.png and /dev/null differ diff --git a/public/images/triangle.png b/public/images/triangle.png deleted file mode 100644 index baa0bae..0000000 Binary files a/public/images/triangle.png and /dev/null differ diff --git a/public/images/two-bounce_global_illumination_eg.png b/public/images/two-bounce_global_illumination_eg.png deleted file mode 100644 index 6f88b4d..0000000 Binary files a/public/images/two-bounce_global_illumination_eg.png and /dev/null differ diff --git a/public/images/understanding_flection_equation1.png b/public/images/understanding_flection_equation1.png deleted file mode 100644 index 451ce5d..0000000 Binary files a/public/images/understanding_flection_equation1.png and /dev/null differ diff --git a/public/images/understanding_reflection_equation2.png b/public/images/understanding_reflection_equation2.png deleted file mode 100644 index 8edca8d..0000000 Binary files a/public/images/understanding_reflection_equation2.png and /dev/null differ diff --git a/public/images/understanding_reflection_equation3.png b/public/images/understanding_reflection_equation3.png deleted file mode 100644 index edc40e0..0000000 Binary files a/public/images/understanding_reflection_equation3.png and /dev/null differ diff --git a/public/images/understanding_rendering_equation1.png b/public/images/understanding_rendering_equation1.png deleted file mode 100644 index 6e90c78..0000000 Binary files a/public/images/understanding_rendering_equation1.png and /dev/null differ diff --git a/public/images/uniform_monte_carlo_estimator.png b/public/images/uniform_monte_carlo_estimator.png deleted file mode 100644 index d583c3a..0000000 Binary files a/public/images/uniform_monte_carlo_estimator.png and /dev/null differ diff --git a/public/images/unresolvable_depth_order.png b/public/images/unresolvable_depth_order.png deleted file mode 100644 index 92835c1..0000000 Binary files a/public/images/unresolvable_depth_order.png and /dev/null differ diff --git a/public/images/vertex_connection_and_merging.png b/public/images/vertex_connection_and_merging.png deleted file mode 100644 index 1ba92b4..0000000 Binary files a/public/images/vertex_connection_and_merging.png and /dev/null differ diff --git a/public/images/visual_evaluation_of_bezier_surface.png b/public/images/visual_evaluation_of_bezier_surface.png deleted file mode 100644 index 8a9ae80..0000000 Binary files a/public/images/visual_evaluation_of_bezier_surface.png and /dev/null differ diff --git a/public/images/wave_optics_application 2.png b/public/images/wave_optics_application 2.png deleted file mode 100644 index 0033db5..0000000 Binary files a/public/images/wave_optics_application 2.png and /dev/null differ diff --git a/public/images/wave_optics_application.png b/public/images/wave_optics_application.png deleted file mode 100644 index b1c2c00..0000000 Binary files a/public/images/wave_optics_application.png and /dev/null differ diff --git a/public/index.html b/public/index.html deleted file mode 100644 index a0c9bba..0000000 --- a/public/index.html +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - - - - - - - - - - - - - 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - - - -
-
- -

人生到处知何似

- -

应似飞鸿踏雪泥

- -

泥上偶然留指爪

- -

鸿飞那复计东西

- -
- -
- - - - - - - - - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/js/meme.min.8b03826e7a2d0128870ee7194c474e922d8ba90a3c170d124dee7af7eff40828.js b/public/js/meme.min.8b03826e7a2d0128870ee7194c474e922d8ba90a3c170d124dee7af7eff40828.js deleted file mode 100644 index 9906fac..0000000 --- a/public/js/meme.min.8b03826e7a2d0128870ee7194c474e922d8ba90a3c170d124dee7af7eff40828.js +++ /dev/null @@ -1 +0,0 @@ -const throttle=(t,n)=>{let s,o,e;return function(){const i=this,a=arguments;s?(clearTimeout(o),o=setTimeout(function(){Date.now()-e>=n&&(t.apply(i,a),e=Date.now())},Math.max(n-(Date.now()-e),0))):(t.apply(i,a),e=Date.now(),s=!0)}},delayTime=420;window.addEventListener("DOMContentLoaded",t=>{const e=document.querySelector(".header");if(e){const t=window.getComputedStyle(e,null).getPropertyValue("height");document.documentElement.style.setProperty("--header-height",t)}},{once:!0}),window.addEventListener("DOMContentLoaded",l=>{const t=document.querySelector(".nav-toggle"),s=document.createElement("div");s.className="nav-toggle-inner",t.appendChild(s);for(let e=0;e<3;e++){const t=document.createElement("span");s.appendChild(t)}const n=document.getElementById("nav-toggle"),e=document.querySelector(".header"),o=document.querySelector(".nav-curtain");n.addEventListener("change",n=>{n.target.checked?(e.classList.add("open"),t.classList.add("open"),e.classList.remove("fade"),o.style="display: block"):(e.classList.remove("open"),t.classList.remove("open"),e.classList.add("fade"))}),o.addEventListener("animationend",e=>{n.checked||e.target.removeAttribute("style")}),window.addEventListener("scroll",throttle(function(){c()},delayTime));const a=window.getComputedStyle(document.documentElement,null).getPropertyValue("--max-width");let r=window.matchMedia(`(max-width: ${a})`);r.addListener(e=>{e.matches||i(!0)});function c(){const e=document.getElementById("search-input");if(e&&e===document.activeElement)return;i()}function i(s){n.checked&&(n.checked=!1,e.classList.remove("open"),t.classList.remove("open"),s?o.removeAttribute("style"):e.classList.add("fade"))}},{once:!0}),window.addEventListener("DOMContentLoaded",t=>{const e=document.getElementById("back-to-top");e!==null&&window.addEventListener("scroll",throttle(function(){window.scrollY>100?e.classList.add("show"):e.classList.remove("show")},delayTime))},{once:!0});const userPrefers=localStorage.getItem("theme");userPrefers==="dark"?changeModeMeta("dark"):userPrefers==="light"&&changeModeMeta("light"),window.matchMedia("(prefers-color-scheme: dark)").addListener(e=>{changeMode()}),window.addEventListener("DOMContentLoaded",t=>{changeMode();const e=document.getElementById("theme-switcher");e&&e.addEventListener("click",e=>{e.preventDefault(),getCurrentTheme()=="dark"?changeModeMeta("light"):changeModeMeta("dark"),changeMode(),storePrefers()})},{once:!0}),window.addEventListener("storage",function(e){if(e.key!=="theme")return;e.newValue==="dark"?changeModeMeta("dark"):changeModeMeta("light"),changeMode()});function getCurrentTheme(){return JSON.parse(window.getComputedStyle(document.documentElement,null).getPropertyValue("--theme-name"))}function changeModeMeta(e){document.documentElement.setAttribute("data-theme",e)}function changeMode(){const e=getCurrentTheme()==="dark",t=e?"#16171d":"#fff";if(document.querySelector('meta[name="theme-color"]').setAttribute("content",t),typeof mermaidConfig!="undefined"){const t=document.querySelectorAll(".mermaid");t.forEach(e=>{e.getAttribute("data-processed")?(e.removeAttribute("data-processed"),e.innerHTML=e.getAttribute("data-graph")):e.setAttribute("data-graph",e.textContent)}),e?(mermaidConfig.theme="dark",mermaid.initialize(mermaidConfig),mermaid.init()):(mermaidConfig.theme="default",mermaid.initialize(mermaidConfig),mermaid.init())}}function storePrefers(){window.localStorage.setItem("theme",getCurrentTheme())}window.addEventListener("DOMContentLoaded",i=>{const e="复制",s="已复制";var t="https://fastly.jsdelivr.net",o="https://cdn.jsdelivr.net";document.querySelectorAll(".post-body > pre").forEach(e=>{let t=document.createElement("div");e.parentNode.replaceChild(t,e),t.appendChild(e)});function n(t){const n=document.querySelectorAll("table.lntable, .highlight > pre, .post-body > div > pre");n.forEach(o=>{o.parentNode.style.position="relative";const n=document.createElement("button");if(n.className="copy-button",n.type="button",n.innerText=e,o.classList.contains("lntable"))var i=o.querySelectorAll(".lntd")[1];else i=o.querySelector("code");n.addEventListener("click",()=>{t.writeText(i.innerText).then(()=>{n.blur(),n.innerText=s,setTimeout(()=>{n.innerText=e},1e3)}).catch(e=>{n.innerText="Error",console.error(e)})}),o.appendChild(n),o.parentNode.addEventListener("mouseover",()=>{n.style="visibility: visible; opacity: 1"}),o.parentNode.addEventListener("mouseout",()=>{n.style="visibility: hidden; opacity: 0"})})}if(navigator&&navigator.clipboard)n(navigator.clipboard);else{const e=document.createElement("script");(t=null)?e.src=o+"/npm/clipboard-polyfill@2.8.6/dist/clipboard-polyfill.min.js":e.src=t+"/npm/clipboard-polyfill@2.8.6/dist/clipboard-polyfill.min.js",e.defer=!0,e.onload=function(){n(clipboard)},document.head.appendChild(e)}},{once:!0}) \ No newline at end of file diff --git a/public/js/meme.min.908b8d39aabea564ae4bd0018a4b01fb0a2b180e678d7e73389fc9f9af126d98.js b/public/js/meme.min.908b8d39aabea564ae4bd0018a4b01fb0a2b180e678d7e73389fc9f9af126d98.js deleted file mode 100644 index 0378962..0000000 --- a/public/js/meme.min.908b8d39aabea564ae4bd0018a4b01fb0a2b180e678d7e73389fc9f9af126d98.js +++ /dev/null @@ -1 +0,0 @@ -const throttle=(b,c)=>{let d,e,a;return function(){const f=this,g=arguments;d?(clearTimeout(e),e=setTimeout(function(){Date.now()-a>=c&&(b.apply(f,g),a=Date.now())},Math.max(c-(Date.now()-a),0))):(b.apply(f,g),a=Date.now(),d=!0)}},delayTime=420;window.addEventListener('DOMContentLoaded',b=>{const a=document.querySelector('.header');if(a){const b=window.getComputedStyle(a,null).getPropertyValue('height');document.documentElement.style.setProperty('--header-height',b)}},{once:!0}),window.addEventListener("DOMContentLoaded",j=>{const b=document.querySelector('.nav-toggle'),d=document.createElement('div');d.className='nav-toggle-inner',b.appendChild(d);for(let a=0;a<3;a++){const b=document.createElement('span');d.appendChild(b)}const c=document.getElementById('nav-toggle'),a=document.querySelector('.header'),e=document.querySelector('.nav-curtain');c.addEventListener('change',c=>{c.target.checked?(a.classList.add('open'),b.classList.add('open'),a.classList.remove('fade'),e.style='display: block'):(a.classList.remove('open'),b.classList.remove('open'),a.classList.add('fade'))}),e.addEventListener('animationend',a=>{c.checked||a.target.removeAttribute('style')}),window.addEventListener('scroll',throttle(function(){i()},delayTime));const g=window.getComputedStyle(document.documentElement,null).getPropertyValue('--max-width');let h=window.matchMedia(`(max-width: ${g})`);h.addListener(a=>{a.matches||f(!0)});function i(){const a=document.getElementById('search-input');if(a&&a===document.activeElement)return;f()}function f(d){c.checked&&(c.checked=!1,a.classList.remove('open'),b.classList.remove('open'),d?e.removeAttribute("style"):a.classList.add('fade'))}},{once:!0}),window.addEventListener("DOMContentLoaded",b=>{const a=document.getElementById('back-to-top');a!==null&&window.addEventListener('scroll',throttle(function(){window.scrollY>100?a.classList.add('show'):a.classList.remove('show')},delayTime))},{once:!0});const userPrefers=localStorage.getItem('theme');userPrefers==='dark'?changeModeMeta('dark'):userPrefers==='light'&&changeModeMeta('light'),window.matchMedia('(prefers-color-scheme: dark)').addListener(a=>{changeMode()}),window.addEventListener("DOMContentLoaded",b=>{changeMode();const a=document.getElementById('theme-switcher');a&&a.addEventListener('click',a=>{a.preventDefault(),getCurrentTheme()=="dark"?changeModeMeta('light'):changeModeMeta('dark'),changeMode(),storePrefers()})},{once:!0}),window.addEventListener('storage',function(a){if(a.key!=='theme')return;a.newValue==='dark'?changeModeMeta('dark'):changeModeMeta('light'),changeMode()});function getCurrentTheme(){return JSON.parse(window.getComputedStyle(document.documentElement,null).getPropertyValue("--theme-name"))}function changeModeMeta(a){document.documentElement.setAttribute('data-theme',a)}function changeMode(){const a=getCurrentTheme()==='dark',b=a?'#16171d':'#fff';if(document.querySelector('meta[name="theme-color"]').setAttribute('content',b),typeof mermaidConfig!='undefined'){const b=document.querySelectorAll('.mermaid');b.forEach(a=>{a.getAttribute('data-processed')?(a.removeAttribute('data-processed'),a.innerHTML=a.getAttribute('data-graph')):a.setAttribute('data-graph',a.textContent)}),a?(mermaidConfig.theme='dark',mermaid.initialize(mermaidConfig),mermaid.init()):(mermaidConfig.theme='default',mermaid.initialize(mermaidConfig),mermaid.init())}}function storePrefers(){window.localStorage.setItem('theme',getCurrentTheme())}window.addEventListener("DOMContentLoaded",f=>{var a,c;const b='复制',e='已复制';a='https://fastly.jsdelivr.net',c='https://cdn.jsdelivr.net',document.querySelectorAll('.post-body > pre').forEach(a=>{let b=document.createElement('div');a.parentNode.replaceChild(b,a),b.appendChild(a)});function d(a){const c=document.querySelectorAll('table.lntable, .highlight > pre, .post-body > div > pre');c.forEach(d=>{var f;d.parentNode.style.position='relative';const c=document.createElement('button');c.className='copy-button',c.type='button',c.innerText=b,d.classList.contains('lntable')?(f=d.querySelectorAll('.lntd')[1]):(f=d.querySelector('code')),c.addEventListener('click',()=>{a.writeText(f.innerText).then(()=>{c.blur(),c.innerText=e,setTimeout(()=>{c.innerText=b},1e3)}).catch(a=>{c.innerText='Error',console.error(a)})}),d.appendChild(c),d.parentNode.addEventListener('mouseover',()=>{c.style='visibility: visible; opacity: 1'}),d.parentNode.addEventListener('mouseout',()=>{c.style='visibility: hidden; opacity: 0'})})}if(navigator&&navigator.clipboard)d(navigator.clipboard);else{const b=document.createElement('script');(a=null)?b.src=c+'/npm/clipboard-polyfill@2.8.6/dist/clipboard-polyfill.min.js':b.src=a+'/npm/clipboard-polyfill@2.8.6/dist/clipboard-polyfill.min.js',b.defer=!0,b.onload=function(){d(clipboard)},document.head.appendChild(b)}},{once:!0}) \ No newline at end of file diff --git a/public/js/meme.min.ac2b48f322cff6a9a8036be3baf3e59e300cd9e4191997a8c3765f79de02bf8d.js b/public/js/meme.min.ac2b48f322cff6a9a8036be3baf3e59e300cd9e4191997a8c3765f79de02bf8d.js deleted file mode 100644 index 07b02a4..0000000 --- a/public/js/meme.min.ac2b48f322cff6a9a8036be3baf3e59e300cd9e4191997a8c3765f79de02bf8d.js +++ /dev/null @@ -1 +0,0 @@ -const throttle=(e,t)=>{let s,o,n;return function(){const i=this,a=arguments;s?(clearTimeout(o),o=setTimeout(function(){Date.now()-n>=t&&(e.apply(i,a),n=Date.now())},Math.max(t-(Date.now()-n),0))):(e.apply(i,a),n=Date.now(),s=!0)}},delayTime=420;window.addEventListener("DOMContentLoaded",e=>{const t=document.querySelector(".header");if(t){const e=window.getComputedStyle(t,null).getPropertyValue("height");document.documentElement.style.setProperty("--header-height",e)}},{once:!0}),window.addEventListener("DOMContentLoaded",e=>{const n=document.querySelector(".nav-toggle"),o=document.createElement("div");o.className="nav-toggle-inner",n.appendChild(o);for(let e=0;e<3;e++){const t=document.createElement("span");o.appendChild(t)}const s=document.getElementById("nav-toggle"),t=document.querySelector(".header"),i=document.querySelector(".nav-curtain");s.addEventListener("change",e=>{e.target.checked?(t.classList.add("open"),n.classList.add("open"),t.classList.remove("fade"),i.style="display: block"):(t.classList.remove("open"),n.classList.remove("open"),t.classList.add("fade"))}),i.addEventListener("animationend",e=>{s.checked||e.target.removeAttribute("style")}),window.addEventListener("scroll",throttle(function(){l()},delayTime));const r=window.getComputedStyle(document.documentElement,null).getPropertyValue("--max-width");let c=window.matchMedia(`(max-width: ${r})`);c.addListener(e=>{e.matches||a(!0)});function l(){const e=document.getElementById("search-input");if(e&&e===document.activeElement)return;a()}function a(e){s.checked&&(s.checked=!1,t.classList.remove("open"),n.classList.remove("open"),e?i.removeAttribute("style"):t.classList.add("fade"))}},{once:!0}),window.addEventListener("DOMContentLoaded",e=>{const t=document.getElementById("back-to-top");t!==null&&window.addEventListener("scroll",throttle(function(){window.scrollY>100?t.classList.add("show"):t.classList.remove("show")},delayTime))},{once:!0});const userPrefers=localStorage.getItem("theme");userPrefers==="dark"?changeModeMeta("dark"):userPrefers==="light"&&changeModeMeta("light"),window.matchMedia("(prefers-color-scheme: dark)").addListener(e=>{changeMode()}),window.addEventListener("DOMContentLoaded",e=>{changeMode();const t=document.getElementById("theme-switcher");t&&t.addEventListener("click",e=>{e.preventDefault(),changeModeMeta(getCurrentTheme()=="dark"?"light":"dark"),changeMode(),storePrefers()})},{once:!0}),window.addEventListener("storage",function(e){if(e.key!=="theme")return;changeModeMeta(e.newValue==="dark"?"dark":"light"),changeMode()});function getCurrentTheme(){return JSON.parse(window.getComputedStyle(document.documentElement,null).getPropertyValue("--theme-name"))}function changeModeMeta(e){document.documentElement.setAttribute("data-theme",e)}function changeMode(){const e=getCurrentTheme()==="dark",t=e?"#16171d":"#fff";if(document.querySelector('meta[name="theme-color"]').setAttribute("content",t),typeof mermaidConfig!="undefined"){const t=document.querySelectorAll(".mermaid");t.forEach(e=>{e.getAttribute("data-processed")?(e.removeAttribute("data-processed"),e.innerHTML=e.getAttribute("data-graph")):e.setAttribute("data-graph",e.textContent)}),e?(mermaidConfig.theme="dark",mermaid.initialize(mermaidConfig),mermaid.init()):(mermaidConfig.theme="default",mermaid.initialize(mermaidConfig),mermaid.init())}}function storePrefers(){window.localStorage.setItem("theme",getCurrentTheme())}window.addEventListener("DOMContentLoaded",e=>{const t="复制",o="已复制";var n="https://fastly.jsdelivr.net",i="https://cdn.jsdelivr.net";document.querySelectorAll(".post-body > pre").forEach(e=>{let t=document.createElement("div");e.parentNode.replaceChild(t,e),t.appendChild(e)});function s(e){const n=document.querySelectorAll("table.lntable, .highlight > pre, .post-body > div > pre");n.forEach(n=>{n.parentNode.style.position="relative";const s=document.createElement("button");if(s.className="copy-button",s.type="button",s.innerText=t,n.classList.contains("lntable"))var i=n.querySelectorAll(".lntd")[1];else i=n.querySelector("code");s.addEventListener("click",()=>{e.writeText(i.innerText).then(()=>{s.blur(),s.innerText=o,setTimeout(()=>{s.innerText=t},1e3)}).catch(e=>{s.innerText="Error",console.error(e)})}),n.appendChild(s),n.parentNode.addEventListener("mouseover",()=>{s.style="visibility: visible; opacity: 1"}),n.parentNode.addEventListener("mouseout",()=>{s.style="visibility: hidden; opacity: 0"})})}if(navigator&&navigator.clipboard)s(navigator.clipboard);else{const e=document.createElement("script");(n=null)?e.src=i+"/npm/clipboard-polyfill@2.8.6/dist/clipboard-polyfill.min.js":e.src=n+"/npm/clipboard-polyfill@2.8.6/dist/clipboard-polyfill.min.js",e.defer=!0,e.onload=function(){s(clipboard)},document.head.appendChild(e)}},{once:!0}) \ No newline at end of file diff --git a/public/manifest.json b/public/manifest.json deleted file mode 100644 index c944ce2..0000000 --- a/public/manifest.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "inksoul's blog", - "short_name": "inksoul", - "icons": [ - { - "src": "./icons/android-chrome-512x512.png", - "sizes": "512x512", - "type": "image/png" - } - ], - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone", - "start_url": "/" -} diff --git a/public/mathematics/index.html b/public/mathematics/index.html deleted file mode 100644 index 2e35fff..0000000 --- a/public/mathematics/index.html +++ /dev/null @@ -1,426 +0,0 @@ - - - - - - - - - - - - - - - - - - Mathematics | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
-
- - -

Mathematics

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

2022

- - - - - - -
-
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/mathematics/公式大全/index.html b/public/mathematics/公式大全/index.html deleted file mode 100644 index 57733ab..0000000 --- a/public/mathematics/公式大全/index.html +++ /dev/null @@ -1,406 +0,0 @@ - - - - - - - - - - - - - - - - - - 《数学一》公式大全 | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
- - - -
- -

《数学一》公式大全

- - - - - - - - - -
-

高等数学

-

函数,极限,连续

-

函数

-

函数的定义

- -
- - - - -
- - - - -
- - -updatedupdated2023-06-182023-06-18 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/robots.txt b/public/robots.txt deleted file mode 100644 index 4f9540b..0000000 --- a/public/robots.txt +++ /dev/null @@ -1 +0,0 @@ -User-agent: * \ No newline at end of file diff --git a/public/rss.xml b/public/rss.xml deleted file mode 100644 index 93b25ed..0000000 Binary files a/public/rss.xml and /dev/null differ diff --git a/public/sitemap.xml b/public/sitemap.xml deleted file mode 100644 index 3a3a177..0000000 --- a/public/sitemap.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - http://www.inksoul.top/408/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E5%8F%91%E5%B1%95%E5%8E%86%E7%A8%8B/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/408/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/mathematics/%E5%85%AC%E5%BC%8F%E5%A4%A7%E5%85%A8/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/mathematics/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/408/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E7%BA%BF%E6%80%A7%E8%A1%A8/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/stuff/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/stuff/result/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/408/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E7%9A%84%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/computergraphic/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/computergraphic/%E5%8A%A8%E7%94%BB/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/computergraphic/%E5%85%89%E5%9C%BA%E9%A2%9C%E8%89%B2%E5%92%8C%E6%84%9F%E7%9F%A5/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/computergraphic/%E7%9B%B8%E6%9C%BA%E4%B8%8E%E9%80%8F%E9%95%9C/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/computergraphic/%E9%AB%98%E7%BA%A7%E5%85%89%E7%BA%BF%E4%BC%A0%E6%92%AD%E4%B8%8E%E5%A4%8D%E6%9D%82%E5%A4%96%E8%A7%82%E5%BB%BA%E6%A8%A1/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/computergraphic/%E6%9D%90%E8%B4%A8%E4%B8%8E%E5%A4%96%E8%A7%82/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/computergraphic/%E8%B7%AF%E5%BE%84%E8%BF%BD%E8%B8%AA/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/computergraphic/%E5%8F%8C%E5%90%91%E5%8F%8D%E5%B0%84%E5%88%86%E5%B8%83%E5%87%BD%E6%95%B0/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/computergraphic/%E8%BE%90%E5%B0%84%E5%BA%A6%E9%87%8F%E5%AD%A6/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/computergraphic/%E5%85%89%E7%BA%BF%E8%BF%BD%E8%B8%AA%E5%8A%A0%E9%80%9F%E7%BB%93%E6%9E%84%E5%92%8C%E7%AE%97%E6%B3%95/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/computergraphic/whitted-style%E5%85%89%E7%BA%BF%E8%BF%BD%E8%B8%AA/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/computergraphic/%E5%87%A0%E4%BD%95geometry/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/computergraphic/%E7%BA%B9%E7%90%86/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/computergraphic/%E5%B8%B8%E7%94%A8%E5%85%89%E7%85%A7%E6%A8%A1%E5%9E%8B/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/algorithm/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/algorithm/%E6%8E%92%E5%BA%8F%E5%90%88%E9%9B%86/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/computergraphic/z-buffer_%E6%B7%B1%E5%BA%A6%E7%BC%93%E5%AD%98/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/computergraphic/taa/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/computergraphic/%E8%B5%B0%E6%A0%B7%E4%B8%8E%E5%8F%8D%E8%B5%B0%E6%A0%B7/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/computergraphic/%E9%87%87%E6%A0%B7%E4%B8%8E%E5%85%89%E6%A0%85%E5%8C%96/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/about/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/algorithm/%E9%80%92%E5%BD%92/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/computergraphic/%E5%9F%BA%E6%9C%AC%E5%8F%98%E6%8D%A2/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/algorithm/%E5%88%86%E6%B2%BB%E6%B3%95/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/categories/ - 2023-06-18T21:19:01+08:00 - - http://www.inksoul.top/tags/ - - diff --git a/public/stuff/index.html b/public/stuff/index.html deleted file mode 100644 index f5a76b3..0000000 --- a/public/stuff/index.html +++ /dev/null @@ -1,426 +0,0 @@ - - - - - - - - - - - - - - - - - - Stuff | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - -
-
-
- - -

Stuff

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

2022

- - - - - - -
-
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/stuff/result/index.html b/public/stuff/result/index.html deleted file mode 100644 index cc09691..0000000 Binary files a/public/stuff/result/index.html and /dev/null differ diff --git a/public/sw.js b/public/sw.js deleted file mode 100644 index 30a5514..0000000 --- a/public/sw.js +++ /dev/null @@ -1,45 +0,0 @@ -/** - References: - - 1. https://developers.google.com/web/fundamentals/primers/service-workers - 2. https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook - 3. https://googlechrome.github.io/samples/service-worker/ - 4. https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers - 5. https://serviceworke.rs/ - 6. https://www.youtube.com/watch?v=baSiSIyTGSk -*/ - -const RUNTIME = 'runtime'; - -self.skipWaiting(); - -self.addEventListener('fetch', (event) => { - // Do nothing if not the same origin - if (!event.request.url.startsWith(self.location.origin)) { - return; - } - - // Network first strategy - event.respondWith( - (async () => { - const cache = await caches.open(RUNTIME); - - try { - const networkResponse = await fetch(event.request); - - // Save/Update cache if network response is ok - if (networkResponse && networkResponse.status === 200) { - cache.put(event.request, networkResponse.clone()); - } - - return networkResponse; - } catch (e) { - const cachedResponse = await cache.match(event.request); - - return cachedResponse; - } - })() - ); -}); - -; diff --git a/public/tags/index.html b/public/tags/index.html deleted file mode 100644 index 2b2321c..0000000 --- a/public/tags/index.html +++ /dev/null @@ -1,326 +0,0 @@ - - - - - - - - - - - - - - - - - - Tags | 飞鸿踏雪 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
- - 飞鸿踏雪 - -
- - - - -
-
- - - - - - - -
- - - - - - - - -
-
-
- -

Tags

- - -
-
-
- - - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -