![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
games101作业
czw0723
这个作者很懒,什么都没留下…
展开
-
games101 作业4
cv::Point2f recursive_bezier(const std::vector<cv::Point2f> &control_points, float t) { // TODO: Implement de Casteljau's algorithm if (control_points.size()==2) { auto point = (1.-t)*control_points[0] + t *control_points[1].原创 2022-05-31 10:56:45 · 116 阅读 · 0 评论 -
games101 作业三
注意下面几张PPT: Blinn-phong模型:简单的texture可以直接用重心坐标插值 重心坐标插值: bump mapping: displacement mapping: rasterize_triangle: static bool mySymbol(float x){ return x > 0; } static bool insideTriangle(int x, int y, const Vector3f* _v) { a原创 2022-05-31 01:02:13 · 250 阅读 · 0 评论 -
三角形某点的重心坐标
原创 2022-05-30 17:18:00 · 164 阅读 · 0 评论 -
Games101 作业1
#include "Triangle.hpp" #include "rasterizer.hpp" #include <eigen3/Eigen/Eigen> #include <iostream> #include <opencv2/opencv.hpp> constexpr double MY_PI = 3.1415926; Eigen::Matrix4f get_view_matrix(Eigen::Vector3f eye_pos) { Eigen:.原创 2022-05-03 12:04:42 · 184 阅读 · 0 评论 -
Games101 作业2
需要填写三个地方的代码: main.cpp 里面的get_projection_matrix函数: Eigen::Matrix4f get_projection_matrix(float eye_fov, float aspect_ratio, float zNear, float zFar) { // TODO: Copy-paste your implementation from the previous assignment. Eigen::Matrix4f projecti.原创 2022-05-30 15:12:49 · 266 阅读 · 0 评论