2017電腦圖學 Computer Graphics 授課教師: 葉正聖 銘傳大學資訊傳播工程系 每週主題: 程式環境、點線面顏色、移動/旋轉/縮放與矩陣(Matrix)、階層性關節轉動(T-R-T)、做出機器人、打光、貼圖、glu/glut函式、鍵盤、滑鼠、計時器(timer)、讀入3D模型、粒子系統、聲音、特效、投影矩陣、攝影機與運鏡、機器人2.0、期末作品
2017年6月28日 星期三
2017年6月13日 星期二
W17 final pro youtube website
W17 final pro youtube website
https://www.youtube.com/watch?v=rGSgbLTj_y4
https://www.youtube.com/watch?v=rGSgbLTj_y4
2017年5月16日 星期二
w13
2017/5/16考試
glPushMatrix();
glTranslatef(0.6,0.4,0);//(3)
glRotatef(-80,0,0,1);//(2)
glTranslatef(0.3,0.3,0);//(1)
drawHand();//越靠近drawHand()越先執行
glPopMatrix();

glPushMatrix();
glTranslate(0.4,-1.0,0);
glRotatef(angle,0,0,1);
glTranslatef(0.2,-0.5,0);
gldrawLeg();
glPopMatrix();

glPushMatrix();
glTranslatef(-0.5,0.35,0
);
glRotatef(angle,0,0,1);
glTranslatef(-0.3,0,0);
drawArm();
glPopMatrix();



























#include <opencv/highgui.h>
using namespace std;
int main()
{
IplImage * img =cvLoadImage("c:/image.png");
cvShowImage("my2DImage",img);
cvWaitKey(0);
}
glPushMatrix();
glTranslatef(0.6,0.4,0);//(3)
glRotatef(-80,0,0,1);//(2)
glTranslatef(0.3,0.3,0);//(1)
drawHand();//越靠近drawHand()越先執行
glPopMatrix();

glPushMatrix();
glTranslate(0.4,-1.0,0);
glRotatef(angle,0,0,1);
glTranslatef(0.2,-0.5,0);
gldrawLeg();
glPopMatrix();

glPushMatrix();
glTranslatef(-0.5,0.35,0
glRotatef(angle,0,0,1);
glTranslatef(-0.3,0,0);
drawArm();
glPopMatrix();



























#include <opencv/highgui.h>
using namespace std;
int main()
{
IplImage * img =cvLoadImage("c:/image.png");
cvShowImage("my2DImage",img);
cvWaitKey(0);
}
2017年5月9日 星期二
w12
#include "CMP3_MCI.h"///(1) 放在同一個程式碼專案的目錄中哦
CMP3_MCI myMP3;///(2) 宣告一個變數,叫 myMP3
myMP3.Load("yukai.mp3"); /// "C:/dropbox/yukai.mp3"
myMP3.Play();/// (4) Play the file
#include "CMP3_MCI.h"
CMP3_MCI myMP3;
myMP3.Load("C:\\Users\\user\\Desktop\\freeglut\\04160711\\yukai.mp3");
myMP3.Play();
data.zip桌面\windows\data\模型
window.zip桌面windows\projection.exe
glut32.dll桌面\windows\glut32.dll
2017年5月2日 星期二
W11
1.google 3d exploration
2.google jsyeh.org/3dcg10
dowload data
open 3d exploration
save as...
choose app
finish
new file project
open GL
put soccerball.cpp to codeblocks folder
delete main.c and add soccerball.cpp
and let // (LPLOGPALETTE) lpPalette = (LPLOGPALETTE)HeapAlloc (hHeap, 0,
// sizeof (LOGPALETTE) + (nColors * sizeof (PALETTEENTRY)));
disappear
save as type: Wavefront
Objects to Save vISIBLE OBJECTS ONLY
make all sure
and make dolphins1~3
put all dolphins (include mtl and obj )to myGLMsample..data
revise: pmodel = glmReadOBJ("data/dolphins1.obj");
copy GLMmodel* pmodel2 = NULL;
copy codes
and done 2 dolphins
creat dolphins3
and u can see that
revise 3 lines codes
key these code:
glPushMatrix();///body
glTranslatef(0,0,0);
glRotatef(90,0,1,0);
glScalef(0.8,0.8,0.8);
glmDraw(pmodel,GLM_SMOOTH|GLM_MATERIAL);
glPopMatrix();
glPushMatrix();///LEFT HAND
glTranslatef(-0.5,0,0);
glScalef(0.4,0.4,0.4);
glmDraw(pmodel2,GLM_SMOOTH|GLM_MATERIAL);
glPopMatrix();
glPushMatrix();///RIGHT HAND
glTranslatef(0.5,0,0);
glScalef(0.4,0.4,0.4);
glmDraw(pmodel3,GLM_SMOOTH|GLM_MATERIAL);
glPopMatrix();
glPopMatrix();
glutSwapBuffers();
}
And Finish this week!
訂閱:
文章 (Atom)






























