GithubHelp home page GithubHelp logo

computer-graphics's Introduction

Computer Graphics

此 repo 包含计算机图形学的一些练习代码。
欢迎关注我的知乎专栏 https://www.zhihu.com/column/c_1258117348499869696 ,与本 repo 同步更新~

开发环境

  • 运行环境:Windows,Visual Studio 2019
  • 需要 EasyX 图形库,本项目使用版本:20200520(beta)

说明

  • 解决方案内包含多个VS项目,将欲执行项目设为启动项目即可运行。
  • 建议在Release模式下运行。

内容介绍

Chapter 4 - Ray Tracing

4-1 光线生成与相交计算

演示光线追踪的基本原理,包括按像素顺序生成光线、光线与几何图形相交的判断。
修改4-1.cpp的134-144行,可以改变三角形的属性。

4-2 Lambertian 反射

演示 Lambertian 反射。
修改4-2.cpp的192-204行,可以改变几何对象的属性。
修改e_to_ScreenCenter可改变视角方向。
几何对象必须是一个数组,在程序中定义为Surface* s[]
可通过键盘进行交互,详见4-2.cpp:145-187。

4-3 Blinn-Phong 模型

实现 Blinn-Phong 光照模型。
修改4-3.cpp:96-130,可以改变几何对象的属性。
修改e_to_ScreenCenter可改变视角方向。
几何对象必须是一个数组,在程序中定义为Surface* s[]
可通过键盘进行交互,详见4-3.cpp:49-91。

Chapter 8 - The Graphics Pipeline

8-1 二维图元的光栅化绘制

使用光栅化方法绘制直线、三角形等。

8-2 MVP 矩阵变换

尝试对三维三角形进行 MVP 变换。

computer-graphics's People

Stargazers

Keroid avatar  avatar  avatar  avatar zsy avatar AmbiTion_ty avatar Flower Black avatar  avatar  avatar  avatar Lync avatar

Watchers

张英奇 Zhang Yingqi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.