https://chortle.ccsu.edu/VectorLessons/index.html Chapter0 Points and Lines (已看) Chapter1 Vectors, Points, and Column Matrices (已看) Chapter2 Matrix Addition (已看) Chapter3 Vector Addition (已看) Chapter4 Vector Length (已看) Chapter5 Vector Direction (已看)…
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 可视化 参考文献 1 引言 2 数学知识 3 光栅算法 4 信号处理 5 线性代数 6…
http://en.wikipedia.org/wiki/Mesa_(computer_graphics) Mesa (computer graphics) From Wikipedia, the free encyclopedia     Mesa Original author(s) Brian Paul Developer(s) Intel, AMD, VMware(previously Tungsten Graphics)[1] Initial release August 1, 199…
Computer Graphics Research Software Helping you avoid re-inventing the wheel since 2009! Last updated December 5, 2012.Try searching this page for keywords like 'segmentation' or 'PLY'.If you would like to contribute links, please e-mail them to rms@…
最近严重感觉到数学知识的不足! http://bbs.gameres.com/showthread.asp?threadid=10509 [译]Mathematics for Computer Graphics Mathematics for Computer Graphics数学在计算机图形学中的应用Greg Turk, August 1997 “学习计算机图形学需要多少的数学?”这是初学者最经常问的问题.答案取决于你想在计算机图形学领域钻研多深.如果仅仅使用周围唾手可得的图形软件,你不需要知…
Mathematics for Computer Graphics 最近严重感觉到数学知识的不足! http://bbs.gameres.com/showthread.asp?threadid=10509 [译]Mathematics for Computer Graphics Mathematics for Computer Graphics数学在计算机图形学中的应用Greg Turk, August 1997“学习计算机图形学需要多少的数学?”这是初学者最经常问的问题.答案取决于你想在计算机…
A Computer Graphics Problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 43    Accepted Submission(s): 40 Problem Description In this problem we talk about the study of Computer Graphics. Of…
Background Input\Output Image Knowledge Image Digital Image Processing Computer Vision Knowledge Computer Graphics Artificial Intelligence Materials Math Linear Algebra Calculus Differential Geometry Differential Equation & Matrix Equation Probabilit…
Notes of Computer Graphics 2.0: towards end-user-generated contents CG 1.0 Modeling: construct 3D model. Animation: animate dynamic behaviors. Rendering: simulate interactions between the light and the 3D model CG 1.0 CG 2.0 Creators professional use…
题目传送门 /* 水题:看见x是十的倍数就简单了 */ #include <cstdio> #include <iostream> #include <algorithm> #include <cstring> #include <string> #include <cmath> using namespace std; ; const int INF = 0x3f3f3f3f; int main(void) //HDOJ 4716…
Here is one question: how to tile texture? One thing worth to notice: The DirectX and OpenGL stipulate that a texture source(normally a picture)’s texture coordinate is fixed as [0,1], which mean that it’s smallest x and y coordinate is 0, and larges…
A Computer Graphics Problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 336    Accepted Submission(s): 277 Problem Description In this problem we talk about the study of Computer Graphics.…
A Computer Graphics Problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 92    Accepted Submission(s): 80 Problem Description In this problem we talk about the study of Computer Graphics. Of…
1 Introduction 2 Introduction to 2D Graphics Using WPF 3 An Ancient Renderer Made Modern 4 A 2D Graphics Test Bed 5 An Introduction to Human Visual Perception 6 Introduction to Fixed-Function 3D Graphics and Hierarchical Modeling 7 Essential Mathemat…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4716 直接搞.. //STATUS:C++_AC_0MS_288KB #include <functional> #include <algorithm> #include <iostream> //#include <ext/rope> #include <fstream> #include <sstream> #include <…
本节我们将绘制一个3维物体,立方体. 如果要渲染3D物体,我们需要了解MVP(Model View Projection),它表示三个转换矩阵.实际上这个名字不够明确,更加确切的释义如下: Model - Model to World  模型空间到世界空间 View - World to View      世界空间到视图空间 Projection - View to Projection   视图空间到投影空间 要实现这三个转换矩阵,我们需要借助glm数学库提供的一些方便的结构体和函数. 重构…
启用Depth Test OpenGL是个3D绘图API,也就是说不只有xy坐标轴,还有第三个坐标轴z,z轴的方向是垂直于屏幕,指向屏幕内. 靠近人眼的方向是负方向,标准化设备坐标的最小值是-1, 最大正值是1. 在未启用深度测试的情况下,同一个像素如果被绘制两次,后绘制的像素会覆盖先绘制的像素. 如果启用了深度测试,情况则完全不同了.后绘制的像素会对深度做一次比较,如果后绘制的像素深度(z)小于之前的像素深度,则会覆盖,如果大于或者等于之前的像素深度,则不会覆盖. Depth需要在绘制之前启用…
这系列文章是我学习Youtube上一套OpenGL教程的笔记,自己对教程的案例重新制作并且做了一定程度的修改(更有条理,且修正了一些问题).后续将持续更新. Visual Studio 2017工程 教程使用的是visual studio 2012,我电脑上装的是visual studio 2017. 先创建一个Visual C++ Win32 Console Application,命名为GraphicsPad,放在C:\Grphics目录下,不要勾选Create directory for…
2.1 几何数据类型 向量表示两个点之间的移动,点表示位置. 2.2 向量,坐标向量和基 向量$\overrightarrow{v}$ ,坐标向量c,基向量$\overrightarrow{b^{t}}$ 2.5 Rotation xyz-Euler角度…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4716 题目大意不用解释了吧,看案例就能明白 #include<cstdio> #include <iostream> using namespace std; int main() { int t,n; scanf("%d",&t); ]="*------------*"; ]="|............|"; ]=…
在上一节的案例中,我们使用了四个Buffer Object,立方体的VertexBuffer,立方体的索引Buffer,四面体的VertexBuffer,四面体的索引Buffer. 我们这节尝试把两个图形的Vertex Buffer结合,两个图形的索引Buffer结合,形成两个Buffer,让程序更加简化. 先看最终代码: MyGlWindow.cpp: #include <gl\glew.h> #include "MyGlWindow.h" #include <io…
大部分OpenGL教程都会在一开始就讲解VAO,但是该教程的作者认为这是很不合理的,因为要理解它的作用需要建立在我们此前学过的知识基础上.因此直到教程已经进行了一大半,作者才引入VAO这个概念.在我看来这也是非常合理和自然的. 先预览一下最终的代码逻辑: 准备工作 为了讲解后面的内容,我们对代码进行了更改(算是回退吧,改回到以前不使用Instancing的版本): 去掉了sendDataToOpenGL()函数中关于实例化的部分代码 把VertexShader中的MVP矩阵改回Uniform 在…
移动相机需要用到键盘按键,按键事件的引入需要包含头文件 #include <Qt3DInput\qkeyevent.h> 并实现QWidget中定义的虚函数keyPressEvent 我们首先在MyGlWindow中重写这个虚函数. 在MyGlWindow.h加入 void keyPressEvent(QKeyEvent*); 在MyGlWindow.cpp中定义: void MyGlWindow::keyPressEvent(QKeyEvent * e) { switch (e->ke…
在11节我们说过,MVP矩阵中目前只应用了两个矩阵,World to View 矩阵被省略了,这就导致我们的画面没有办法转换视角. 本节我们将添加这一环节,让相机可以旋转. 为了实现这一目的,我们添加一个相机类, Camera类. Camera.h: #pragma once #include <glm\glm.hpp> class Camera { private: glm::vec3 position; glm::vec3 viewDirection; const glm::vec3 UP…
我们使用15节学到的知识来绘制14节的立方体. 在第14节我们使用了两次glDrawElements实现了OpenGL实例化,发现这样仍然不太方便,如果需要绘制成千上万的立方体,就需要手写成千上万次的glDrawElements(). 而15节我们知道了glDrawElementsInstanced函数可以支持批量绘制. 我们需要绘制的多个立方体唯一不同的只是转换矩阵,为了达到这个目的,我们只需要定义一组不同的变换矩阵,采用glDrawElementsInstanced即可达到目的. 构建矩阵的…
友情提示:继续本节之前,需要保存此前的代码,本节为了试验,会对代码做一些修改,但后续的修改需要我们把代码返回之前的进度. OpenGL内置支持Instancing,有专门的函数来处理这件事情. 为了方便,我们先使用最简单的三角形来学习 先修改sendDataToOpenGL()函数: void MyGlWindow::sendDataToOpenGL() { GLfloat tri[] = { -1.0f,+0.0f, -1.0f,+1.0f, -0.9f,+0.0f }; GLuint ver…
如果我们需要绘制两个(或者多个)一样的立方体(或者物体),只是位置.缩放.旋转不一样,那么我们可以不需要多次将这个物体的顶点信息.颜色信息等发送到显卡,而是发送一次,绘制多次,仅仅是每次绘制之前应用不同的转换矩阵.这种方法叫做OpenGL Instancing.它的效率比每次都重新发送一次数据到显卡要高很多. 看具体代码: void MyGlWindow::paintGL() { glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); glView…
上节说过矩阵是可以结合的,而且相乘是按照和应用顺序相反的顺序进行的.我们之前初始化translationMatrix和rotationMatrix的时候,第一个参数都是使用的一个初始矩阵 glm::matrix4(),实际上我们可以对代码稍作优化,让初始化过程精简一些. 对比一下优化之前和优化之后的代码: 之前: glm::mat4 projectionMatrix = glm::perspective(30.0f, ((float)width()) / height(), 0.1f, 10.0…
为了证明我们上节渲染出来的是一个立方体而不是一个平面,我们决定将它旋转一定角度,这样我们就需要一个旋转矩阵(也属于ModelTransformMatrix的一部分) 上一节我们的ModelTransformMatrix中做了一个移动(translation)的操作,所以我们将它重命名为translationMatrix. 先看修改后的paintGL()函数: void MyGlWindow::paintGL() { glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_B…
本节我们将尝试利用三角形制作一个“走马灯”效果. 一个三角形如图示方式,从左向右依次移动. 先看一下代码: MyGlWindow.cpp #include <gl\glew.h> #include "MyGlWindow.h" #include <iostream> #include <fstream> float triangleWidth = 0.1f; ; ; ; void MyGlWindow::sendDataToOpenGL() { //…