![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
图形学
文章平均质量分 81
miguemath
数学
展开
-
用glut库实现旋转,平移,缩放
平移glTranslate<f,d>(tx,ty,tz),对于二维情形,tz=0.0示例如下:glTranslatef(3.0,2.0f,0.0f);旋转 glRotate<f,d>(theta,vx,vy,vz): theta,vx,vy,vz指定这个旋转物体的矩阵,物体将绕着(0,0,0)到(x,y,z)的直线以逆时针旋转,参数 theta表示旋转的角度。取正时为...原创 2018-05-14 21:26:23 · 3252 阅读 · 0 评论 -
Opengl 绘制“仿太阳系”
代码如下:#include <GL/glut.h> #include <stdlib.h> #include <windows.h> static int year0 = 0 ,year1 = 0,year2=0, year3=0,day = 0; void init(void) { // glClearColor (0.0, 0.0, 0.0, 0.0);...原创 2018-06-06 21:04:12 · 2856 阅读 · 1 评论