顯示具有 Week05 標籤的文章。 顯示所有文章
顯示具有 Week05 標籤的文章。 顯示所有文章

2017年12月7日 星期四

陳陞凱的計圖筆記WEEK05

1.至jsyeh.org/3dcg10/下載win32.data.glut32.dll檔案

2.解壓縮檔案並注意是否在同個目錄(data資料夾需放入windows資料夾)

3.執行Transformation.exe




glTranslatef() x,y,z的位移

glRotatef(角度,x,y,z)    以x,y,z軸為軸心旋轉


glScalef(a,b,c)    對x軸,y軸,z軸放大a,b,c



gluPerspective(fovy, aspect, zNear, zFar)
fovy => 視野
aspect => x/y比例(寬窄)
zNear => 前界(前面的平面)
zFar => 後界(後面的平面)

gluLookAt
eye => 照相機圍繞著人物旋轉
center => 照相機固定位置,以中心做旋轉
up => 以哪一個軸為上

2017年11月7日 星期二

abcqq week05

1.編譯程式

1.1
下載素材程式


修改freeglut資料夾所在位置
C:\Users\oscar\Desktop\freeglut\include
C:\Users\oscar\Desktop\freeglut\lib
\
按F9執行
2.打光

打開transformation.c Ctrl+f 搜尋 light
glEnable(GL_LIGHTING);
glEnable(GL_LIGHTING0);
GLfloat pos[] = { 0.0, 0.0, 1.0, 0.0 };//全域變數




2017年10月19日 星期四

LYC的計圖學習筆記-WEEK05

上週複習

1.開啟jsyeh.org/3dcg10下載Examples的data,win32, Other examples的glut32.dll
2.全部解壓縮後放一起

舊程式

3.執行原本在win32(windows)的Transformation.exe

新程式

4.執行原本在win32(windows)的Projection.exe
5.按右鍵選glOrtho
6.按右鍵選glFrustum
gluPerspective(視野角度,視野,最近視野,最遠視野)
gluLookAt(眼睛看的角度轉x軸,眼睛看的角度轉y軸,眼睛看的角度轉z軸,
                   視野中心轉x軸,視野中心轉y軸,視野中心轉z軸
                   與視線垂直的面轉x軸,與視線垂直的面轉y軸,與視線垂直的面轉z軸)
glOrtho(左面的視野平移,右面的視野平移,上面的視野平移,
              下面的視野平移,前面的視野平移,後面的視野平移)
glFrustum(整個視野的左面平移,整個視野的右面平移,整個視野的上面平移,
                  整個視野的下面平移,整個視野的前面平移,整個視野的後面平移,)

施宇修的學習筆記week05


gluPerspective(fovy,aspect,zNear,zFar)
fovy視野
aspect y/x比例
glOrtho(左,右,下,上,近,遠)
glFrustum(...)
gluLookAt(eyex,eyey,eyez,
centerx,centery,centerz,
upx,upy,upz)



羅宣的學習筆記 WEEK5




投影

gluPerspective(fovy[視野],aspect[x.y比例],zNea,zFar)

1. ~jsyeh.org/3dcg10 下載win32, glut32.dll, data
2. 解壓win32到windows,glut32.dll, data 放入windows
3.執行Transformation.exe
4.執行Projection,並按右鍵來切換函數


gluPerspective(fovy[視野],aspect[x.y比例],zNea,zFar)
glOrtho(左、右、上、下、近、遠);
glFrustum(左、右、上、下、近、遠);
gluLookAt(eyeX, eyeY, eyeZ,
                 centerX, centerY, centerZ,
                 upX, upY, upZ);


5. 下載並執行老師的檔案

2017年10月18日 星期三

下載win32.data.glut32.dll檔案
解壓縮後放置同目錄
注意:將data.zip解壓縮後和glut32.dll一起放進windows資料夾中


執行Transformation.exe
glTranslatef() //對x,y,z位移
glRotatef(角度,x,y,z) //以x,y或z軸為軸心旋轉
glScalef() //對x軸,y軸,z軸縮放



projection :
gluPerspective(fovy, aspect, zNear, zFar)
fovy - 視野
aspect -x/y比例(寬窄)
zNear - 前界線(前面的平面)
zFar - 後界線(後面的平面)

gluLookAt
eye - 照相機圍繞著人物旋轉
center - 照相機固定位置,以中心做旋轉
up -以某一個軸為上





KAI的Week05筆記

1.至jsyeh.org/3dcg10/下載win32.data.glut32.dll檔案
2.解壓縮檔案並注意是否在同個目錄(data資料夾需放入windows資料夾)
3.執行Transformation.exe
4.執行Projection.exe
gluPerspective(fovy,  aspect,  zNear,  zFar)
*fovy:視野大小
*aspect:x,y之比例
*zNear:切面(Light)
*zfar:fu:切面(Shadow)
glLookAt:(0.00,0.00,2.00)->eye眼睛所看過去的方向
               (0.00,0.00,0.00)->center物體中心
               (0.00,0.00,0.00)->物體向上之角度
5.開老師的week05懶人包
*注意:須將data資料放入freeglut/bin中

2017年10月17日 星期二

吳映廷 計算機圖學 week5

1.前往 jsyeh.org/3dcg10 下載win32, glut32.dll, data
 2.解壓到同個地方,並把後兩個檔案放入windows
 3.執行Transformation
 4.執行Projection,並按右鍵來切換函數
gluPerspective(fovy[field of view y視野], aspect y/x[y/x 比例], zNear, zFar);
glOrtho(左、右、上、下、近、遠);
glFrustum(左、右、上、下、近、遠);
gluLookAt(eyeX, eyeY, eyeZ,
                 centerX, centerY, centerZ,
                 upX, upY, upZ);
5. 下載並執行老師的檔案

陳映羽的圖學WEEK05

1.到老師的網站 jsyeh.org/3dcg10/ 下載 [source][data][win32][glut32.dll]

2.transformation

glTranslatef() x,y,z的位移
glRotatef(角度,x,y,z)    以x,y,z軸為軸心旋轉
glScalef(a,b,c)    對x軸,y軸,z軸放大a,b,c

3.projection
                                             




2017年10月15日 星期日

我只是一只可愛的麻雀(._.)Week05 筆記

jsyeh.org/3dcg10/ 下載 data win32 glut32.dll 並且解壓縮
執行.exe檔試試每個函式的效果



*transformation*

glTranslatef() //對x,y,z做位移
glRotatef(角度,x,y,z) //以x,y或z軸為軸心旋轉某度數
glScalef() //對x軸,y軸,z軸放大幾倍

*projection.exe - perspective*


gluPerspective(fovy, aspect, zNear, zFar)
fovy => 視野
aspect => x/y比例(寬窄)
zNear => 前界(前面的平面)
zFar => 後界(後面的平面)

gluLookAt
eye => 照相機圍繞著人物旋轉,所以始終看的到人
center => 照相機固定位置,以中心做旋轉,所以轉一轉人會不見
up => 以哪一個軸為上, 圖例中y = 1.00 表示以y軸為上



*projection.exe - Orthogonal投影*

glOrtho(左,右,下,上,近,遠)

EX:


投影left = -4.10 因此人物看起來會瘦瘦長長的
(我們人看到的等於整個後面灰色區域)

概念就是: 以左右下上前後形成一個框框投影看到的影像

gluLookAt的參數跟上面的概念是一樣的
差別在於他是投影這個框框 所以有時候轉動後人物不在框框內就會被切掉

EX:


下期預告:如何打開程式碼~!



2017年10月14日 星期六

WEEK05 瑋倫的圖學

到jsyeh.org/3dcg10的,下載win32、data、glut32.dll三個檔案,解壓縮後打開Transformation.exe
或開projection.exe
gluOrtho (左, 右, 下, 上, 近, 遠) 
    glFrustum (左, 右, 下, 上, 近, 遠) 
    glutLookAt (eyeX, eyeY, eyeZ,
                         centerX, centerY, centerZ,
                         upX, upY, upZ)


俊隆ㄉ計算機圖學筆記 - Week 5 Viewing

- Matrix math concepts

  • Translation



  • Rotation




- gluLookAt(), glFrustum(), glOrtho(), glPerspective() 

角錐投影,四個參數: 
fovy: field of view angle 角度
aspect: 長寬比
zNear: Camera 最近距離
zFar: Camera 最遠距離
  • gluLookAt()
三個參數:
eye: Camera 位置的x, y, z
center: Camera 觀看角度
top: Camera's up vector (平面的旋轉) 
  • glOrtho()
平行投影
六個參數:
left, right, bottom, top: 投影界線
near: Camera 最近距離
far: Camera 最遠距離
  • glFrustum()
六個參數:
left, right, bottom, top:   投影上下左右邊界
near: Camera 最近距離
far: Camera 最遠距離

- Read files from project folder, instead of freeglut lib
Modify the .cbp codeblocks project file with editor, and change working_dir content to "."

2017年10月12日 星期四

Leo 學習筆記 Week05

複習上禮拜內容

1.從jsyeh.org/3dcg10下載data.zip,windows.zip,glut32.dll三個檔案放置於桌面


2.將windows.zip資料夾解壓縮,再將data.zip解壓縮後和glut32.dll一起放進windows資料夾中


3.執行windows資料夾中的Transformation.exe並調整每個函式的參數


投影

1.執行windows資料夾中的Projection.exe並調整gluPerspective函式(透視投影)的參數,
fovy: 調整Y方向的視野
aspect: 調整X、Y的比例
zNear: 調整Z方向上較靠近的面
zFar: 調整Z方向上較遠的面


2.在Projection.exe中切換成glOrtho函式(垂直投影),並調整其參數
left: 調整投影空間的左邊界
right: 調整投影空間的右邊界
bottom: 調整投影空間的下邊界
top: 調整投影空間的上邊界
near: 調整投影空間的前邊界
far: 調整投影空間的後邊界


3.調整gluLookAt函式的參數,gluLookAt為調整視點的函式。
前三個參數: 調整視點位置(以物體中心)的x,y,z值,
中間三個參數: 調整物體位置
後三個參數: 調整視點旋轉角


編譯範例原始碼(transformation.c)

1.建立glut專案,建置完成後刪除裡面的main.cpp,將需要用到的程式碼加入專案中(glm.c,glm.h,transformation.c),將data資料夾放到freeglut/bin中。


2.執行後結果