664 1 分钟

以下为个人学习笔记整理。参考书籍《C++ Primer Plus》 # 文件输入输出 # 文件输入 #include<fstream>// 写文件std::ofstream write_file;// 文件不存在会创建新的。write_file.open("iof_file.txt");write_file << "hello world" << endl << "save the...
562 1 分钟

以下为个人学习笔记整理。参考书籍《C++ Primer Plus》 # 循环和关系表达式 # for 循环 for(int i = 0; i < 100; i++){ // do something...} 基于范围的 for 循环 int lst[100] = {1,2,3,4,5,6,7,8,9,0};// 变量元素for (int x: lst){ cout << x <<endl; // do...
621 1 分钟

以下为个人学习笔记整理。参考书籍《C++ Primer Plus》 # 分支语句和逻辑表达式 # if 语句 int i = 1;if (i > 0){ // do something...}else if (i == 0){ // do something...}else{ // do something...}# 逻辑表达式 或: || 与: && 非: ! # 字符函数库 cctype ispunct(char)...
2.4k 2 分钟

以下为个人学习笔记整理。参考书籍《C++ Primer Plus》 # 复合类型 # 指针、数组、指针算术 # 指针 申明: typeName * pointerName 。 赋值: double* pn,pa;char* pc;double bubble = 3.2;pn = &bubble; // 指向 bubble 的地址。pc = new char; // 分配一个 char 大小的地址空间给 pcpa = new double[30]; // 分配 30 个 double 大小的地址空间给 pa 取值: *pointerName...
4k 4 分钟

以下为个人学习笔记整理,涉及坐标内容统一用右手坐标系,课程官网。 # Animation # Single Particle Simulation 先从单个的粒子开始,假设物体的运动由一个速度矢量场决定,不同位置不同时间粒子会获得不同方向不同大小的速度 v(x,t)v(x,t)v(x,t) 。 # Ordinary Differential Equation(ODE) 定义一个一阶的常微分方程(ODE),用于计算物体的速度 vvv 。 dxdt=x˙=v(x,t)\frac{dx}{dt} = \dot x = v(x,t) dtdx​=x˙=v(x,t) # Solving for...
4.1k 4 分钟

以下为个人学习笔记整理,涉及坐标内容统一用右手坐标系,课程官网。 # Animation # Keyframe Animation 给定了一个动画内几个比较关键的画面,从而推导出整个动画。 # Keyframe Interpolation 可以理解为,每个关键帧上有多个关键点,同一关键点在不同关键字的位置的插值,就能得到中间帧的关键点。 # Keyframe Interpolation of Each Parameter 因此,如何进行插值就是关键帧动画实现的核心。 Linear interpolation:效果往往不是那么理想。 Recall splines for smooth...
2k 2 分钟

以下为个人学习笔记整理,涉及坐标内容统一用右手坐标系,课程官网。 # Physical Basis of Color # The Visible Spectrum of Light # Spectral Power Distribution(SPD) 光谱率密度(SPD)表示:在某个波长下的光线功率。 # Linearity of Spectral Power Distributions 光谱率密度满足线性的特性。两种相关同时照射一个物体,两个光线的「谱光率密度」会叠加。 # What is Color 颜色只是人对于不同波长的光线的一种感知。 # Biological Basis...
5.1k 5 分钟

以下为个人学习笔记整理,涉及坐标内容统一用右手坐标系,课程官网。 # Cameras,Lenses and Light Fields # Camera # Pinholes & Lenses Form Image on Sensor 针孔成像。 # Shutter Exposes Sensor For Precise Duration 快门:控制光线进入相机的时间。 # Sensor Accumulates Irradiance During Exposure 传感器:用于接受经过快门传递进相机的光线照度(Irradiance)。 # Why Not Sensors...
2.8k 3 分钟

以下为个人学习笔记整理,涉及坐标内容统一用右手坐标系,课程官网。 # Advanced Topics in Rendering——Appearance Modeling # Appearance Modeling Non-surface models Participating media Hair / fur / fiber(BCSDF) Granular material Surface models Translucent material(BSSRDF) Cloth Detailed material(non-statistical BRDF) Procedural...
1.8k 2 分钟

以下为个人学习笔记整理,涉及坐标内容统一用右手坐标系,课程官网。 # Advanced Topics in Rendering——Light Transport # Advanced Light Transport 无偏的光线传播(Unbiased light transport methods) Bidirectional path tracing(BDPT) Metropolis light transport(MLT) 有偏的光线传播(Biased light transport methods) Photon mapping Vertex connection and...