首页
CALL1CE
取消

PAT-Graduate Admission & Cars on Campus & To Buy or Not to Buy

A1080 Graduate Admission #include<iostream> #include<string> #include<vector> #include<algorithm> #include<set> using namespace std; struct stuInfo { int id;//学生...

PAT-The World's Richest & PAT Judge & List Grades

A1055 The World’s Richest #include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; const int maxn = 100001;//最大人数 int Age[201] = {0};/...

GAMES101-Lecture 05 Rasterization 1 (Triangles) & 作业1

Transformation 这一节其实是沿着上一节的viewing讲剩下的一小部分,然后开了个光栅化的头 Perspective Projection aspect ratio = width/height宽高比(r就是right,t就是top) \[aspect=\frac{r}{t}\] field-of-view(fovY)垂直可视角度...

PAT-Are They Equal & A+B in Hogwarts

A1060 Are They Equal //考虑前导0,整数部分、小数部分 #include<iostream> #include<string> using namespace std; //将输入的数字转换成科学计数法的数字 void format(string &num, int N) { int e = 0;//记录指数 //首先判...

GAMES101-Lecture 04 Transformation Cont. & 作业0

这一节其实是一部分变换的内容和观测(Viewing)的内容,按理说变换应该放到上一章,所有的观测放在一章 3D Transforms 再一次使用齐次坐标 3D point =$ (x,y,z,1)^T$ 3D vector =$ (x,y,z,0)^T$ 使用4×4的矩阵表示仿射变换 [\left( \...

PAT-The Black Hole of Numbers & Finding Average & C++字符串转换为数值

A1069 The Black Hole of Numbers #include<iostream> #include<vector> #include<string> #include<cstdio> #include<algorithm> using namespace std; bool cmp(char &a, c...

GAMES101-Lecture 03 Transformation

Transformation Scale [\left[ \begin{matrix} x\prime y\prime \end{matrix}\right]= \left[ \begin{matrix} s_x & 0 0 & s_y \end{matrix}\right] \left[ \begin{matrix} x y \end{matrix}\right]] ...

GAMES101-Lecture 02 Review of Linear Algebra

阅读材料:第 2 章(Miscellaneous Math);第 5 章(Linear Algebra) 1. Graphics’ Dependencies 基础数学:线代、微积分、统计 基础物理:光学、力学 其它:信号处理、数值分析 2. This Course More dependent on li...

PAT-First Contact & Cut Integer

A1139 First Contact #include<iostream> #include<set> #include<utility> #include<unordered_map> #include<vector> using namespace std; struct personInfo { int gende...

GAMES101-Lecture 01 Overview of Computer Graphics

1. What is Computer Graphics?     涉及到的领域: Video Game Movies Animations Design Visualization Virtual Reality Augumented Reality ...