资源简介
学校暑期课程科学可视化课程的ppt,需要的拿走。
2018/07/10 13:28 1 - Introduction
2018/07/10 13:29 2 - Transformation
2018/07/17 08:54 3 - OpenGL
2018/07/10 13:32 4 - Perspective Transformation
2018/07/10 13:32 5 - Color and Illumination
2018/07/10 13:32 6 - Visible Surface Determination
2018/07/10 13:32 7 - Clipping
2018/07/31 10:15 8 - VTK
2018/07/10 13:34 9 - Introduction to DVR and SF
代码片段和文件信息
/* CS 551 Assignment 1 skeleton */
/* Brian Clarke */
/*
keyboard controls:
s/S: Positive/negative shoulder rotation
e/E: Positive/negative elbow rotation
O/C: Open/Close the hand -- YOU GET TO IMPLEMENT THIS
x/X: Positive/negative X-axis shift of the model
y/Y: Positive/negative Y-axis shift of the model
UP/DOWN ARROWS: (zoom) Z-axis shift of the model
LEFT/RIGHT ARROWS: Y-axis rotations
PAGE UP/DOWN: X-axis rotations
ESC: exit
*/
#include
#include
#include
#include
#define ESC 27
static GLfloat red[]={100}green[]={010}; /* blue[]={001}; */
static int shoulder=0elbow=0;
static int xrot=0yrot=0zrot=0;
static GLfloat xshift=-1.0yshift=0.0zoom=-3.0;
/* some basic GL initialization */
void init()
{
glClearColor(0.00.00.00.0);
glShadeModel(GL_FLAT);
glEnable(GL_DEPTH_TEST);
glEnable(GL_CULL_FACE);
glCullFace(GL_BACK);
}
/* The display callback */
void draw_stuff()
{
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glPushMatrix();
glTranslatef(xshiftyshiftzoom);
glRotatef((GLfloat)xrot1.00.00.0);
glRotatef((GLfloat)yrot0.01.00.0);
glRotatef((GLfloat)zrot0.00.01.0);
glColor3fv(red);
glPushMatrix();
glTranslatef(-1.00.00.0);
glRotatef((GLfloat)shoulder0.00.01.0);
glTranslatef(1.00.00.0);
glPushMatrix();
glScalef(2.00.41.0);
glutSolidCube(1.0);
glPopMatrix();
glColor3fv(green);
glTranslatef(1.00.00.0);
glRotatef((GLfloat)elbow0.00.01.0);
glTranslatef(1.00.00.0);
glPushMatrix();
glScalef(2.00.41.0);
glutSolidCube(1.0);
glPopMatrix();
/* Put the “hand“ code here...*/
glPopMatrix();
glPopMatrix();
glutSwapBuffers();
}
/* the window-reshape callback */
void reshape(int w int h)
{
glViewport(00(GLsizei)w(GLsizei)h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(65.0(GLfloat)w/(GLfloat)h1.020.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0.00.0-5.0);
}
/* The basic keyboard controls callback for glutKeyboardFunc() */
void kb(unsigned char key int x int y)
{
switch(key)
{
case ‘s‘:
shoulder=(shoulder+5)%360;
glutPostRedisplay();
break;
case ‘S‘:
shoulder=(shoulder-5)%360;
glutPostRedisplay();
break;
case ‘e‘:
elbow=(elbow+5)%360;
glutPostRedisplay();
break;
case ‘E‘:
elbow=(elbow-5)%360;
glutPostRedisplay();
break;
case ‘C‘:
/* close the “hand“ */
break;
case ‘O‘:
/* open the “hand“ */
break;
case ‘x‘:
xshift+=.25;
glutPostRedisplay();
break;
case ‘X‘:
xshift-=.25;
glutPostRedisplay();
break;
case ‘y‘:
yshift+=.25;
glutPostRedisplay();
break;
case ‘Y‘:
yshift-=.25;
glutPostRedisplay();
break;
case ‘r‘:
case ‘R‘:
xrot=yrot=zrot=shoulder=elbow=0;
xshift=-1.0;
yshift=0.0;
zoom=-3.0;
glutPostRedisplay();
break;
case ‘z‘:
zrot=(zrot-1)%360;
glutPostRedisplay();
break;
case ‘Z‘:
zrot=(zrot+1)%360;
glutPostRed
- 上一篇:人物模型带动画
- 下一篇:大话设计模式(带目录完整版).zip
相关资源
- 使用ATLAS探测器在s = 13 $$ \\ sqrt {s} =
- 搜索在s = 13 TeV pp碰撞中在pp碰撞中产
- 使用ATLAS检测器在s = 13 $$ \\ sqrt {s} =
- 使用ATLAS检测器,在s = 7 TeV的pp碰撞中
- W s Z玻色子对生产横截面在pp碰撞中的
- 使用ATLAS探测器在s = 13 TeV的pp碰撞中用
- 使用ATLAS探测器在s = 8 $$ \\ sqrt {s} =
- 在与ATLAS探测器发生s = 8 TeV pp碰撞的
- 使用ATLAS探测器在s = 7TeV的pp碰撞中区
- 使用ATLAS探测器在13 TeV pp碰撞中搜索轨
- 使用ATLAS探测器在s = 8 TeV的质子-质子
- 使用ATLAS探测器在s = 13 $$ \\ sqrt {s} =
- 使用ATLAS探测器在s = 13 TeV的pp碰撞中搜
- 玻色增强,Liouville有效作用以及p-A碰
- Kharzeev-Levin-Nardi模型中的热辐射和包容
- 在s $$ \\ sqrt {s} $$ = 13 TeV的质子-质子碰
- 搜索与s = 13 TeV的光子相关联产生的低
- 非最小的CW膨胀,电弱对称破坏和75
- 750 GeV S -cion:我们还应该在哪里寻找
- 750 GeV及以上的光子,光子射流和暗光
- 750 GeV共振态的对撞机
- 大型强子对撞机上的矢量le夸克和75
- 750-GeV双光子共振能成为保管希格斯三
- 解释750 GeV双光子共振
- 上下跷跷板模型中的750 GeV双光子共振
- 750 GeV复合轴作为LHC双光子共振
- 在回路中由Kaluza-Klein瘦子介导的750
- 从封闭的弦状态更新750 GeV双光子
- VirtualTreeview 最新版支持 XE10.3
- pp→Wγγ和pp→Zγ&gam
评论
共有 条评论