顯示具有 04160720_陳享翊 標籤的文章。 顯示所有文章
顯示具有 04160720_陳享翊 標籤的文章。 顯示所有文章

2017年7月1日 星期六

Week10 龜山下智久的迷妹筆記

1


到3D Exploration 1.81 
.



到小葉的網站下載data 3d模型





匯出cpp檔
開openGL



把檔案移過去

開啟原本那個檔
 
檔案執行
拉hw1 把檔名改dolphin1
把海豚分開儲存


2017年6月12日 星期一

Week17 龜山下智久的迷妹筆記


示範 myEarth.zip變 背景貼圖
  freeglut裝桌面\freeglut\include
                                        \lib
                                        \bin
  openCV2.1裝C:\OpenCV2.1\include
                                                 \lib
                                                 \bin
把display裡 註解掉(///) 畫地球
glBegin(GL_POLYGON)
   glTexCoord2f(0,0);glVertex3f(-1,+1,0);
   

glTexCoord2f(1,0);glVertex3f(+1,+1,0);
  
 glTexCoord2f(1,1);glVertex3f(+1,-1,0);
  
 glTexCoord2f(0,1);glVertex3f(-1,-1,0);
 
 glEnd();








youtube連結


2017年6月5日 星期一

Week16 龜山下智久的迷妹筆記

1.內插公式 a*新+(1-a)*舊

2.timer涵式

3.讓機器人跟著計時器轉動
4.TO DO 
寫檔案
#include <stdio.h>=fopen
FILE*fout=NULL;
在KEYBOARD 
if(key=='s'||key=='S')
{
if(fout=NULL)
fout=fopen("file.txt","wt");
fprintf(fout,"%.3f","%.3f","%.3f","%.3f","%.3f","%.3f","%.3f"\n,angle[0]) ;
} 

2017年5月22日 星期一

Week13 龜山下智久的迷妹筆記

旋轉
左括弧是glPushMatrix();
右括弧是glPopMatrix();
可以讓一次改變 其中東西

2017年5月15日 星期一

Week13 龜山下智久的迷妹筆記

老師小考示範
glPusgMatrix();
glTranslatef(0.4,-1,0
);
glRotatef(0,0,1);旋轉中心點
glTranslatef(0.2,-0.5,0);///移中心點
gldrawLeg();
glPopMatrix();






利用程式碼 秀圖出來
用opencv 開圖片
1.安裝opencv-2.1.0-vs2008.exe
2.確認 C;\opencv2.1\include\opencv\很多.h檔
3.新增貝殼專案 File-New-Project 右上角 console App







利用程式碼 秀圖出來_

2017年5月8日 星期一

Week12 龜山下智久的迷妹筆記

新增說明文字
#include <GL/glut.h>
float eyeX=0, eyeY=0, eyeZ=1;
float centerX=0, centerY=0, centerZ=0;
float upX=0, upY=1, upZ=0;
static void display(void)
{
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    glColor3d(1,0,0);
    glPushMatrix();
        gluLookAt(eyeX, eyeY, eyeZ,
                  centerX, centerY, centerZ,
                  upX, upY, upZ);
        glutSolidTeapot(0.3);
    glPopMatrix();
    glutSwapBuffers();
}


第二節 專研meeting
動起來的茶壺
glPushMatrix();
glTranslatef();掛上去
glRotatef();旋轉
glTranslatef();定旋轉中心
畫手臂
重複
glPopMatrix();



2017年5月1日 星期一

Week07 龜山下智久的迷妹筆記

1.練習期中考題目

glPushMartix();//備份矩陣
glRotatef(angle,x,y,z);//旋轉
glTranslatef(x,y,z);//移動
glScalef(x,y,z);//縮放

glBegin(GL_POLYGON)//開始畫
glNormal3f(nx,ny,nz);打光的法向量
glTexCoord2f(tx,ty);貼圖的座標
glColor3f(r,g,b);顏色
glEnd();結束畫

glPopMartix();還原矩陣
2.
打光

const GLfloat light_position[] = { 2.0f, -5.0f, -5.0f, 0.0f };


3.
static void display(void)
{
    angle++;
    glClear(GL_COLOR_BUFFER_BIT| GL_DEPTH_BUFFER_BIT);
    glPushMatrix();
    glTranslatef(0,0.6,0);
    glutSolidTeapot(0.3);
    glPopMatrix();
        glPushMatrix();
    glRotatef(angle,0,1,0);
       glutSolidTeapot(0.3);
       glPopMatrix();

    glutSwapBuffers();

}
    glutIdleFunc(display);
    glutDisplayFunc(display);

4. 幾何圖形
static void display(void)
{
    angle++;
    glClear(GL_COLOR_BUFFER_BIT| GL_DEPTH_BUFFER_BIT);
    glPushMatrix();
    glTranslatef(0,0.6,0);
    glutSolidTeapot(0.3);
      glPopMatrix();
          glPushMatrix();
    glRotatef(angle,0,1,0);
   glutSolidCone(0.5,0.2,50,50);

       glPopMatrix();
    glutSwapBuffers();

}


Week4 龜山下智久的迷妹筆記

1.作業互評 選三張覺得最好的
2.複習teapot的涵式
3.按按鍵可以跳出座標



4.換更換顏色
5.拖曳滑鼠變換顏色及座標
6.圓形



2017年4月24日 星期一

Week09 龜山下智久的迷妹筆記


Nehe lesson32

















#include <mmsystem.h>
void mouse (int button,int state,int x,int y)
{
    PlaySound("C:\\Users\\user\\Desktop\\Lesson32\\data/shot.wav",NULL,SND_ASYNC);


156  >>>>>>>>glutMouseFunc(mouse);

2017年4月17日 星期一

Week08 龜山下智久的迷妹筆記

網頁下載
source.zip(glm.h,glm.cpp)
{
 windows.zip 桌面\windows\Transformation.exe
data.zip 桌面\windows\data\soccerball.obj]
                                               soccerball.mtl]7組
1切換模型
2 開啟soccerball.obj{ v開頭 vertex
        notepad++       
  vn開頭 vertex normal
 vt           vertex texture coordinate
                                 
  f開頭 face臉



練習匯出maya圖




2017年3月27日 星期一

Week06 龜山下智久的迷妹筆記



1.
1.glRotatef(角度,x,y,z)
軸
為4個參數的意思
轉一下



2. 裡面1個車子由內往外  先縮放然後再旋轉然後移動