[컴퓨터그래픽스] 키보드 마우스 입력을 통한 화면 변경
#include #include #include #define PI 3.141592 #define CCW 0 #define CW 1 using namespace glm; vec3 my_triangle1[3] = { vec3(-10.f, 0.f, 0.f), vec3(10.f, 0.f, 0.f), vec3(0.f, 10.f, 0.f) }; // CCW vec3 my_triangle2[3] = { vec3(10.f, 0.f, 0.f), vec3(-10.f, 0.f, 0.f), vec3(0.f, 10.f, 0.f) }; // CW vec3 faceNorm[2]; vec3 eyeVec; GLfloat angle[2]; GLint culling = 3; // nothing first GLint isTriangle1..
2021. 4. 3.
[컴퓨터그래픽스] 소용돌이 실습 (함수 사용하지 않기)
void RenderScene(void) { glClear(GL_COLOR_BUFFER_BIT); glMatrixMode(GL_MODELVIEW); GLfloat rotation[16] = { cos(30.0), 0, -sin(30.0), 0, 0, 1, 0, 0, sin(30.0), 0, cos(30.0), 0, 0, 0, 0, 1 }; GLfloat translation[16] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, -0.1, 0, 1 }; glPushMatrix(); glColor3f(0.5f, 0.5f, 0.5f); glPointSize(3); glBegin(GL_POINTS); glVertex4f(0.25f, 0.8f, 0.0f, 1.0f); glEnd();..
2021. 4. 3.