顯示具有 04160711_秦浩恩 標籤的文章。 顯示所有文章
顯示具有 04160711_秦浩恩 標籤的文章。 顯示所有文章

2017年6月6日 星期二

w16
1. 用EXCEL 試內插公式
=A2(時間)*NEWVALUE+(1-A2)*OldVALUE

2.BUILD(a)WORKING 目錄
  INCLUDE,LIB目錄

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);

}

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!