OpenGL & GLUTの基本関数の説明

Size: px
Start display at page:

Download "OpenGL & GLUTの基本関数の説明"

Transcription

1 コンピュータグラフィックス S 演習資料 OpenGL & GLUT の基本関数の説明 1. OpenGL & GLUT 2. GLUT 2.1. GLUT void glutinit( int argc, char ** argv ); glut void glutinitdysplaymode( unsigned int mode ); mode void glutinitwindowsize( int width, int height ); GLUT void glutwindowposition( int x, int y ); GLUT int glutcreatewindow ( char * title ); GLUT title ID ID 1

2 void glutmainloop(); GLUT 2.2. void glutdisyplayfunc( void (*func)( void ) ); void glutreshapefunc( void (*func)( int width, int height ) ); void (*func)( int width, int height ); void glutidlefunc( void (*func)( void ) ); void glutmousefunc( void (*func)( int button, int state, int x, int y ) ); void (*func)( int button, int state, int x, int y ); button GLUT_LEFT_BUTTON, GLUT_MIDDLE_BUTTON, GLUT_RIGHT_ BUTTON state GLUT_UP, GLUT_DOWN x,y void glutmotionfunc( void (*func)( int x, int y ) ); void glutpassivemotionfunc( void (*func)( int x, int y ) ); glutmotionfunc() glutpassivemotionfunc() 2

3 void glutkeyboardfunc( void (*func)( unsigned char key, int x, int y ) ); void (*func)( unsigned char key, int x, int y ); key GLUT_KEY_ LEFT, GLUT_KEY_RIGHT, GLUT_KEY_UP, GLUT_KEY_DOWN 2.3. void glutpostredisplay(); GLUT GLUT 2.4. GLUT void glutwirecube( GLdouble size ); void glutsolidcube( GLdouble size ); size glutwirecube() glutsolidcube() void glutwiresphere( GLdouble radius, GLdouble slices, GLdouble stacks ); void glutsolidsphere( GLdouble radius, GLdouble slices, GLdouble stacks ); size slices, stacks slices, stacks void glutwirecone( GLdouble radius, GLdouble height, GLdouble slices, GLdouble stacks ); void glutsolidcone( GLdouble radius, GLdouble height, GLdouble slices, GLdouble stacks ); radius, height slices, stacks glutsolidicosahedron(), glutsolidcone(), glutsolidcone(), glutsolidcone(), 3

4 glbegin() glend() 2.5. GLUT void glutbitmapcharacter( void * font, int character ); font GLUT_BITMAP_8_BY_13, GLUT_BIT MAP_9_BY_15, GLUT_BITMAP_TIMES_ROMAN_10, GLUT_BITMAP_TI MES_ROMAN_24, GLUT_BITMAP_HELVETICA_10, GLUT_BITMAP_HELVETICA_12, GLUT_BITM AP_HELVETICA_18 font void glrasterpos2i( GLint x, GLint y ); void glrasterpos2f( GLfloat x, GLfloat y ); void glrasterpos3i( GLint x, GLint y, GLint z ); void glrasterpos3i(glfloat x, GLfloat y, GLfloat z ); glvertex () int glutbitmapwidth ( void * font, int character ); glutbitmapcharacter() glutbitmapcharacter() 4

5 3. OpenGL OpenGL OpenGL gl glu OpenGL OpenGL Utility Library OpenGL glut GLUT OpenGL Utility Toolkit GLUT OpenGL GLUT PC GLUT OpenGL glvertex3f( x, y, z ), glvertex3d( x, y, z ) ( x, y, z ) float double double float 3.1. OpenGL OpenGL void glmatrixmode( GLenum mode ); mode GL_MODELVIEW, GL_PROJECTION, GL_TEXTURE GL_MODELVIEW GL_PRO JECTION GL_TEXTURE GL_MODELVIEW, GL_PROJECTION void glloadidentity( void ); 5

6 void gltranslatef( GLfloat x, GLfloat y, GLfloat z ); void gltranslated( GLdouble x, GLdouble y, GLdouble z ); (x, y, z) void glrotatef( GLfloat angle, GLfloat x, GLfloat y, GLfloat z ); void glrotated(gldouble angle, GLdouble x, GLdouble y, GLdouble z ); (x, y, z) angle x x y y A = z z 1 1 A i A A 1,, An A A= A A A A n void glulookat( GLdouble eye_x, GLdouble eye_y, GLdouble eye_z, GLdouble center_x, GLdouble center_y, GLdouble center_z, GLdouble up_x, GLdouble up_y, GLdouble up_z ); (eye_x, eye_y, eye_z) ( center_x, center_y, center_z ) ( up_x, up_y, up_z ) void glloadmatrixf( const GLfloat * m ); void glloadmatrixd( const GLdouble * m ); 16 m 16 m GLdouble m[4][4]; m[i][j] j 6

7 i i j void glmultmatrixf( const GLfloat * m ); void glmultmatrixd( const GLdouble * m ); 16 m glloadmatrixf(),glloadmatrixd() OpenGL glpushmatrix() glpopmatrix() void glpushmatrix ( void ); void glpopmatrix ( void ); glpushmatrix() glpopmatrix() glpopmatrix() glpushmatrix() glpopmatrix() glpushmatrix() void glfrustum( GLdouble left, GLdouble right, GLdouble bottm, GLdouble top, GLdouble near, GLdouble far ); glfrustum() near 1 glfrustum() 1 glperspective() 7

8 glfrustum() gluperspective() void gluperspective( GLdouble fovy, GLdouble aspect, GLdouble near, GLdouble far ); glviewport() void glviewport( GLint x, GLint y, GLsizei width, GLsizei height ); reshape() glviewport() gluperspective() 45 glfrustum() gluperspective () glloadidentity() 1 glortho() void glortho( GLdouble left, GLdouble right, GLdouble bottm, GLdouble top, GLdouble near, GLdouble far ); 8

9 void glclear( GLbitfield mask ); GL_COLOR_BUFF ER_BIT, GL_DEPTH_BUFFER_BIT, GL_ACCUM_BUFFER_BIT, GL_STENCIL_BUFFER_BIT GL_COLOR_BUFFER GL_DEPTH_BUFFER void glclearcolor( CLclampf red, GLclampf green, GLclampf blue, GLclamp alpha ); red, green, blue alpha [0,1] glbegin() glend() void glbegin( GLenum type ); type type GL_POINTS GL_LINES GL_TRIANGLES GL_POLYGON void glend(); GL_POINTS, GL_LINES, GL_TRIANGLES glbegin() glend() GL_TRIANGLES 3n n GL_POLYGON glbegin() glend() glbegin() glend() 9

10 void glcolor3f( GLfloat r, GLfloat g, GLfloat b ); void glcolor3d( GLdouble r, GLdouble g, GLdouble b ); ( r, g, b ) void glnormal3f( GLfloat nx, GLfloat ny, GLfloat zn ); void glnormal3d( GLdouble nx, GLdouble ny, GLdouble zn ); ( nx, ny, zn ) void glvertex3f( GLfloat x, GLfloat y, GLfloat z ); void glvertex3d( GLdouble x, GLdouble y, GLdouble z ); (x, y, z) 3f 3d float double glvertex2f(), glvertex4f() 3.3. OpenGL void glenable( GLenum capability ); capability GL_LIGHTING, GL_COLOR_MATERIAL, GL_DEPTH_TEST, GL_CULL_FACE 40 void gldisable( GLenum capability ); GL_LIGHTING, GL_COLOR_MA TERIAL, GL_DEPTH_TEST, GL_CULL_FACE 10

11 void glcullface( GLenum mode ); mode GL_FRONT, GL_BACK, GL_FRONT_AND_BACK 3.4. OpenGL void gllightf( GLenum light_no, GLenum pname, GLfloat param ); void gllighti( GLenum light_no, GLenum pname, GLint param ); void gllightfv( GLenum light_no, GLenum pname, GLfloat * param ); void gllightiv( GLenum light_no, GLenum pname, Glint * param ); light_no GL_LIGHT0, GL_LIGHT1,, GL_LIGHT7 pname GL_AMBIENT, GL_DIFFUSE, GL_SPECULAR, GL_ POSITION, GL_SPOT_DIRECTION, GL_SPOT_DIRECTION, GL_SPOT_EXPONENT, GL_SPOT_C UTOFF, GL_CONSTANT_ATTENUATION, GL_LINEAR_ATTENUATION, GL_QUADRATIC_ATTENU ATION param GL_AMBIENT, GL_DIFFUSE, GL_SPECULAR GL_POSITION x,y,z,w w 1.0 x,y,z w 0.0 x,y,z GL_SPOT_DIRECTION, GL_SPOT_EXPONENT, GL_SPOT_CUTOFF GL_CONSTANT_ATTENUATION, GL_LINEAR_ATTENUATION, GL_QUADRATIC_ATTENUATION RGB M { ln } { sn } s pecular_factor Color = L M + max, 0 L M + max, 0 L M ambient ambient diffuse diffuse specular specular n l s l L ambient, L diffuse, L specular M ambient, M diffuse, M specular, M specular_factor 11

12 Mambient, Mdiffuse glcolor3f() M specular, M specular_factor (1.0,1.0,1.0), 1.0 glmaterial() glenable() GL_LIGHTING GL_LIGHT0, GL_LIGHT1, gldisable() OpenGL 3.5. OpenGL glbegin() glend() glvertex() glvertex() void glvertexpointer( Glint size, GLenum type, GLsizei stride, const GLvoid * pointer ); size type GL_FLOAT, GL_DOUBLE, GL_INT stride pointer glvertexpointer() void glnormalpointer( GLenum type, GLsizei stride, const GLvoid * pointer ); void glcolor( Glint size, GLenum type, GLsizei stride, const GLvoid * pointer ); void gltexcoordpointer( Glint size, GLenum type, GLsizei stride, const GLvoid * pointer ); glvertexpointer() glnormalpointer() size void glenableclientstate( GLenum array_type ); void gldisableclientstate( GLenum array_type ); 12

13 or array_type GL_VERTEX_ARRAY, GL_NORMAL_ ARRAY, GL_COLOR_ARRAY, GL_TEXTURE_COORD_ARRAY void gldrawarrays( GLenum mode, GLint first, GLsizei count ); mode GL_POINTS GL_LINES GL_TRIANGLES GL_POLYGON glbegin() first, count void gldrawelements( GLenum mode, GLint count, GLenum type, void * indices ); mode gldrawarrays(), glbegin() count type GL_UNSIGNED_INT, GL_UNSIGNED_SHORT, GL_UNSIGNED_ BYTE indices glarrayelement( Glint no ); 3.6. glteximage2d() void glteximage2d( GLenum target, GLint level, GLenum int_format, GLsizei width, GLsizei height, GLsizei border, GLenum format, GLenum type, const GLvoid * pixels ); target GL_TEXTURE_2D level 0 13

14 int_format format width height border 0 format pixels RGB GL_RGB RGB GL_RGBA type pixels RGB 3 =24 GL_UNSIGNED_BYTE pixels format type OpenGL BMP, GIF, JPEG 24 BMP gltexparameteri() void gltexparameteri( GLenum target, GLenum pname, GLint param ); target pname param target param target GL_TEXTURE_MAG_FILTER GL_TEXTURE_MIN_FILTER pname GL_NEAREST GL_LINEAR target GL_TEXTURE_WRAP_S GL_TEXTURE_WRAP_T pname GL_REPEATE 1 GL_CLAMP glenable( GL_TEXTURE_2D ) gldisable() void gltexenv( GLenum target, GLenum pname ); void gltexenvf( GLenum target, GLenum pname, GLfloat param ); void gltexenvfv( GLenum target, GLenum pname, GLfloat * param ); target GL_TEXTURE_ENV pname GL_DECAL, GL_REPLACE, GL_MODULATE, GL_BLEND GL_REPLACE GL_DECAL GL_REPLACE 14

15 GL_MODULATE GL_BLEND GL_MODULATE GL_BLEND void gltexcoord2f( GLfloat u, GLfloat v ); void gltexcoord2d( GLdouble u, GLdouble v ); (u, v) 0.0< u <1.0, 0.0< v <1.0 (u, v) glteximage2d () glbindtexture() glbindtexture() glbindtexture() 15

/*p7-1-1*/

/*p7-1-1*/ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 /* e8.c Copyright (c) 2003 by T. HAYASHI and

More information

untitled

untitled 2004/12/21 2/2 (11/16) DT-MRI (11/30) /OpenGL 12/7 12/14 (12/21) 1/11 (1/18) OpenGL ~ ~ OpenGL Silicon Graphics, OpenGL ~ ~ OpenGL OpenGL Utility Library (GLU) OpenGL. OpenGL. OpenGL Utility Toolkit (GLUT)

More information

libaux.dvi

libaux.dvi AUX OpenGL 1 OpenGL (AUX libaux.a) OpenGL Programming Guide () OpenGL 1 OpenGL OS (API) OS OS OS OpenGL Windows Windows X X OpenGL Programming Guide AUX toolkit AUX OS OpenGL SGI OpenGL OS OpenGL AUX Windows

More information

#include <stdio.h> 2 #include <stdlib.h> 3 #include <GL/glut.h> 4 Program 1 (OpenGL GameSample001) 5 // 6 static bool KeyUpON = false; // 7 sta

#include <stdio.h> 2 #include <stdlib.h> 3 #include <GL/glut.h> 4 Program 1 (OpenGL GameSample001) 5 // 6 static bool KeyUpON = false; // 7 sta 1 1. 1 #include 2 #include 3 #include 4 Program 1 (OpenGL GameSample001) 5 // 6 static bool KeyUpON = false; // 7 static bool KeyDownON = false; // 8 static bool KeyLeftON

More information

2 2 GLUI 2 GLUI 2.1 GLUI GLUI OpenGL OpenGL glut OpenGL glut C++ Linux, Windows (Visual C++, gcc), Macintosh glut glut GUI glut GUI CG glmultmatrix()

2 2 GLUI 2 GLUI 2.1 GLUI GLUI OpenGL OpenGL glut OpenGL glut C++ Linux, Windows (Visual C++, gcc), Macintosh glut glut GUI glut GUI CG glmultmatrix() 1 20 (2) OpenGL+GUI(GLUI) 3DCG TA 2008 10 27 1 OpenGL OpenGL GUI GLUI 1.1 http://www.cyber.t.u-tokyo.ac.jp/~kuni/enshu2008/ 1.2 TA 1.3 2008/12/4( ) EyeToy 2 2 GLUI 2 GLUI 2.1 GLUI GLUI OpenGL OpenGL glut

More information

1 1. Program 1 OpenCV (OpenCV Sample001) 1 /* 2 - > - > - >VC++ 3 ( ) 4 C:\opencv\build\include 5 ( ) 6 C:\opencv\build\x86\vc10\lib 7 - > - > - > - >

1 1. Program 1 OpenCV (OpenCV Sample001) 1 /* 2 - > - > - >VC++ 3 ( ) 4 C:\opencv\build\include 5 ( ) 6 C:\opencv\build\x86\vc10\lib 7 - > - > - > - > 1 1. Program 1 OpenCV (OpenCV Sample001) 1 /* 2 - > - > - >VC++ 3 ( ) 4 C:\opencv\build\include 5 ( ) 6 C:\opencv\build\x86\vc10\lib 7 - > - > - > - > 8 (240 O p e n C V ) 9 opencv_core240d.lib 10 opencv_imgproc240d.lib

More information

コンピュータグラフィックスS 演習資料

コンピュータグラフィックスS 演習資料 コンピュータグラフィックス S 演習資料 第 4 回シェーディング マッピング 九州工業大学情報工学部システム創成情報工学科講義担当 : 尾下真樹 1. 演習準備 今回の演習も 前回までの演習で作成したプログラムに続けて変更を行う まずは シェーディングの演習のため 描画処理で 回転する一つの四角すいを描画するように変更する 画面をクリア ( ピクセルデータと Z バッファの両方をクリア ) glclear(

More information

2 2 OpenGL ( ) OpenGL ( ) glclearcolor(glclampf red, GLclampf green, GLclampf

2 2 OpenGL ( ) OpenGL ( ) glclearcolor(glclampf red, GLclampf green, GLclampf 1 24 (1) OpenGL TA 2012 10 11 1 C OpenGL (3DCG) OS Linux OS 3DCG OpenGL GUI GLUT OpenGL GLUT GLUI 3DCG 3DCG 1.1 1 3DCG 3DCG GUI 2 3DCG 10/10( ) 11/11( ) 3DCG OpenGL OpenGL+GUI(GLUI) 3DCG 3DCG 1.2 TA 2

More information

2 2 2 OpenGL (R,G,B,A) 2.1 OpenGL (x y) width height pixels void glreadpixels(glint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum t

2 2 2 OpenGL (R,G,B,A) 2.1 OpenGL (x y) width height pixels void glreadpixels(glint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum t 1 22 (2) OpenGL+GUI(GLUI) 3DCG TA 2010 10 18 1 OpenGL OpenGL GUI GLUI 1.1 http://www.cyber.t.u-tokyo.ac.jp/~kuni/enshu2010/ 1.2 TA 1.3 2010/12/6( ) USB 2 2 2 OpenGL (R,G,B,A) 2.1 OpenGL (x y) width height

More information

第3章 OpenGL の基礎

第3章 OpenGL の基礎 3 OpenGL April 11, 2017 1 / 28 3.1 ( ) OpenGL OpenGL 2 / 28 3.2 OpenGL OpenGL OpenGL (Open Graphics Library) Silicon Graphics, Inc. 2 3 API (Application Program Interface) [4] UNIX OS Windows Macintosh

More information

謗域・ュ逕ィppt

謗域・ュ逕ィppt 情報工学 2017 年度後期第 5 回 [11 月 1 日 ] 静岡大学 工学研究科機械工学専攻ロボット 計測情報講座創造科学技術大学院情報科学専攻 三浦憲二郎 講義日程 第 6 回 11 月 8 日画像処理パート第 1 回 第 7 回 11 月 15 日 CGパート第 6 回 第 8 回 11 月 22 日 CGパート第 7 回 第 9 回 11 月 29 日 CGパート試験 講義アウトライン [11

More information

第7章 レンダリング

第7章 レンダリング 7 May 18, 2012 1 / 60 71 ( ) CG 3 ( ) 2 / 60 72 71 ( ) 3 (rendering) 1 / (hidden line/surface calculation) a (outer normal algorithm) b Z (Z-buffer algorithm) c (scan-line algorithm) 2 (shading) a (flat

More information

2 2 OpenGL OpenGL OpenGL(Open Graphics Library) Silicon Graphics (SGI) 3D OpenGL SGI HP, SUN,

2 2 OpenGL OpenGL OpenGL(Open Graphics Library) Silicon Graphics (SGI) 3D OpenGL SGI HP, SUN, 1 20 (1) OpenGL TA 2008 10 20 1 C OpenGL (3DCG) OS Linux (Open SUSE 10.3) 3DCG OpenGL GUI GLUT OpenGL GLUT GLUI USB EyeToy 1.1 1 3DCG 2 3DCG GUI 2 USB EyeToy) 10/20( ) 10/27( ) 3DCG OpenGL OpenGL+GUI(GLUI)

More information

第7章 レンダリング

第7章 レンダリング 7 April 11, 2017 1 / 59 7.1 ( ) CG 3 ( ) 2 / 59 7.2 7.2.1 ( ) 3 (rendering) 1 / (hidden line/surface calculation) a (outer normal algorithm) b Z (Z-buffer algorithm) c (scan-line algorithm) 2 (shading)

More information

OpenGL Programming Course OpenGL Programming Course FAQ

OpenGL Programming Course OpenGL Programming Course FAQ OpenGL NK EXA Corporation OpenGL@dst.nk-exa.co.jp OpenGL@dst.nk-exa.co.jp OpenGL FAQ (http://www.nk-exa.co.jp/mmtech/opengledu/faq.shtml) i 1 OpenGL 1{1 1.1 OpenGL : : : : : : : : : : : : : : : : : : :

More information

3D グラフィックス処理の一般過程 1. 3D グラフィックス処理の一般過程

3D グラフィックス処理の一般過程 1. 3D グラフィックス処理の一般過程 3. 3D ビューイング 1. 3Dグラフィックス処理の一般過程 2. 射影と射影変換 3. ビューボリュームとクリッピング 4. 陰面処理とデプスバッファ 5. ビューポート変換 6. 3Dグラフィックスを描く 7. モデルビュー変換 3D グラフィックス処理の一般過程 1. 3D グラフィックス処理の一般過程 3D グラフィックス処理の一般過程 1. モデリング変換 座標系の異なる複数のオブジェクトを仮想世界に配置し,

More information

2 2 OpenGL ( ) 2 OpenGL ( ) glclearcolor(glclampf red, GLclampf green, GLclampf blu

2 2 OpenGL ( )  2 OpenGL ( ) glclearcolor(glclampf red, GLclampf green, GLclampf blu 1 27 (1) OpenGL TA 2015 9 29 1 C OpenGL (3DCG) OS Linux OS 3DCG OpenGL 3DCG 3DCG 1.1 1 3DCG 3DCG 2 3DCG GUI AR 9/29( ) 10/1( ) 3DCG OpenGL 3DCG 3DCG 1.2 TA 1.3 2 2 OpenGL ( ) http://www.cyber.t.u-tokyo.ac.jp/~tani/class/mech_enshu/

More information

2 3 OpenGL 2 OpenGL OpenGL(Open Graphics Library) Silicon Graphics (SGI) 3D OpenGL SGI HP, SUN, IBM UNIX Linux, FreeBSD PC UNIX Windows, Mac OS API PD

2 3 OpenGL 2 OpenGL OpenGL(Open Graphics Library) Silicon Graphics (SGI) 3D OpenGL SGI HP, SUN, IBM UNIX Linux, FreeBSD PC UNIX Windows, Mac OS API PD 1 2015 5-1 2015 6 22 1 3DCG 3DCG 3DCG OpenGL OS Linux(Ubuntu) 1.1 TA 1.2 http://www.cyber.t.u-tokyo.ac.jp/~tani/class/mech_enshu/ 2 3 OpenGL 2 OpenGL OpenGL(Open Graphics Library) Silicon Graphics (SGI)

More information

第3章 OpenGL の基礎

第3章 OpenGL の基礎 3 OpenGL April 20, 2012 1 / 23 31 ( ) OpenGL OpenGL 2 / 23 32 OpenGL OpenGL OpenGL (Open Graphics Library) Silicon Graphics, Inc 2 3 API (Application Program Interface) [4] UNIX OS Windows Macintosh CAD

More information

コンピュータグラフィックス特論Ⅱ

コンピュータグラフィックス特論Ⅱ コンピュータグラフィックス特論 Ⅱ 第 2 回 OpenGL プログラミングの基礎 九州工業大学尾下真樹 今日の内容 OpenGL プログラミングの基礎 C 言語 +OpenGL+GLUT によるプログラミング 座標変換の基礎 アフィン変換行列を使った視野変換の設定 いずれも 学部の講義 ( レベルの内容 ) の復習 今日の内容 OpenGL&GLUTの概要 サンプルプログラムの概要 座標変換 変換行列の設定

More information

NB

NB JAPLA 研究会資料 2010/2/27 J の OpenGL グラフィックス - その 7 - フラー ドームと照光表示 - 西川利男 0. はじめに OpenGL 正多面体グラフィックスとして 今回はフラー ドームに挑戦してみた バックミンスター フラー (Richard Buckminster Fuller, 1895-1983 は多才な建築家 科学者 思想家として知られ その名前を冠した

More information

Fair Curve and Surface Design System Using Tangent Control

Fair Curve and Surface Design System Using Tangent Control 情報工学 2016 年度後期第 6 回 [11 月 16 日 ] 静岡大学工学研究科機械工学専攻ロボット 計測情報講座創造科学技術大学院情報科学専攻 三浦憲二郎 講義アウトライン [11 月 16 日 ] ビジュアル情報処理 3 モデリング 3.3 曲線 曲面 OpenGL 色の取り扱い シェーディング 照明モデルと照光処理 拡散光 鏡面光 環境光 ビジュアル情報処理 3-3 曲線 曲面 3-3-1

More information

コンピュータグラフィックス特論Ⅱ

コンピュータグラフィックス特論Ⅱ 今日の内容 コンピュータグラフィックス特論 Ⅱ 第 2 回 OpenGL プログラミングの基礎 九州工業大学尾下真樹 OpenGL プログラミングの基礎 C 言語 +OpenGL+GLUT によるプログラミング 座標変換の基礎 アフィン変換行列を使った視野変換の設定 いずれも 学部の講義 ( レベルの内容 ) の復習 今日の内容 OpenGL&GLUTの概要 サンプルプログラムの概要 座標変換 変換行列の設定

More information

manual.dvi

manual.dvi ' & VR CompleXcope $ % 1 2 509{5292 322{6 1) kage@tokitheorynifsacjp 2) sato@tokitheorynifsacjp CompleXcope Programming Guide, Ver 1, by A Kageyama and T Sato, August 1998 1 CompleXcope 5 11 : : : : :

More information

2 2 2 OpenGL (R,G,B,A) 2.1 OpenGL (x y) width height pixels void glreadpixels(glint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum t

2 2 2 OpenGL (R,G,B,A) 2.1 OpenGL (x y) width height pixels void glreadpixels(glint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum t 1 24 (2) 3DCG TA 2012 10 12 1 OpenGL USB (3DCG) OpenCV 1.1 http://www.cyber.t.u-tokyo.ac.jp/~tani/class/mech_enshu/ 1.2 TA 1.3 USB (2012/11/19( ),20( )) USB 2 2 2 OpenGL (R,G,B,A) 2.1 OpenGL (x y) width

More information

( ) 1 1: 1 #include <s t d i o. h> 2 #include <GL/ g l u t. h> 3 #include <math. h> 4 #include <s t d l i b. h> 5 #include <time. h>

( ) 1 1: 1 #include <s t d i o. h> 2 #include <GL/ g l u t. h> 3 #include <math. h> 4 #include <s t d l i b. h> 5 #include <time. h> 2007 12 5 1 2 2.1 ( ) 1 1: 1 #include 2 #include 3 #include 4 #include 5 #include 6 7 #define H WIN 400 // 8 #define W WIN 300 // 9

More information

double rx[natom], ry[natom], rz[natom]; 原子の座標 速度 力 ポテンシャルエ double vx[natom], vy[natom], vz[natom]; ネルギーを受ける配列を準備 double fx[natom], fy[natom], fz[natom

double rx[natom], ry[natom], rz[natom]; 原子の座標 速度 力 ポテンシャルエ double vx[natom], vy[natom], vz[natom]; ネルギーを受ける配列を準備 double fx[natom], fy[natom], fz[natom GLUI による MD の GUI 化 前提条件 :GLUI のプログラミング環境が整っていること 3 原子の MD コード ( 下図 ) viewer ウィンドウ内のマウス左クリックで MD 開始 右クリックで MD 停止 control パネルは solid/wireframe を切り替えるチェックボタン 球の滑らかさと半径を決める窓 ( スピナー ) オブジェクトを回転 移動 拡大縮小させるコントローラ

More information

謗域・ュ逕ィppt

謗域・ュ逕ィppt 情報工学 212 年度後期第 5 回 [1 月 31 日 ] 静岡大学 創造科学技術大学院情報科学専攻工学部機械工学科計測情報講座 三浦憲二郎 講義日程 第 8 回 11 月 21 日 ( 水 ) CG パート試験 講義アウトライン [1 月 31 日 ] ビジュアル情報処理 1.3.4 投影変換 1.3.5 いろいろな座標系と変換 OpenGL 投影変換 曲線の描画 トロコイド ( 外トロコイドと内トロコイド

More information

謗域・ュ逕ィppt

謗域・ュ逕ィppt 情報工学 217 年度後期第 4 回 [1 月 25 日 ] 静岡大学 工学研究科機械工学専攻ロボット 計測情報講座創造科学技術大学院情報科学専攻 三浦憲二郎 ローカル座標系による移動 講義アウトライン [1 月 25 日 ] ビジュアル情報処理 1.3.4 投影変換 1.3.5 いろいろな座標系と変換 OpenGL 投影変換 曲線の描画 トロコイド ( 外トロコイドと内トロコイド ) 頂点変換の手順

More information

DrawArrays DrawElements References Kageyama (Kobe Univ.) Visualization / 34

DrawArrays DrawElements References Kageyama (Kobe Univ.) Visualization / 34 WebGL *1 DrawArrays DrawElements 2013.05.14 *1 X021 2013 LR301 Kageyama (Kobe Univ.) Visualization 2013.05.14 1 / 34 DrawArrays DrawElements References Kageyama (Kobe Univ.) Visualization 2013.05.14 2

More information

2 : 2008/12/ /01/ G :

2 : 2008/12/ /01/ G : 2 : 2008/12/08 2008/01/16 075730G : 1 project draw main.cpp 1 draw main.cpp /* * main.cpp * draw * * Created by C-T on 08/12/08. * Copyright 2008 MyCompanyName. All rights reserved. * */ #include

More information

演算増幅器

演算増幅器 スペースインベーダーもどき 1000 行プログラムの参考として スペースインベーダーもどきのプログラムを配布する いくつか習って いないものもあるので 補足の説明を加えていく 文字列の描画 文字の描画は glutbitmapcharacter() を用いる これは以下のようにして利用する int i; char *str = "Display String"; glcolor3f(0.0, 0.0,

More information

Microsoft PowerPoint - info_eng3_05ppt.pptx

Microsoft PowerPoint - info_eng3_05ppt.pptx インタラクティブシステム構築法 第 5 回 OpenGL と GLUT の使い方 (3) 埼玉大学情報システム工学科小林貴訓 シェーディング 光源の設定を有効にする glenable(gl_lighting); // 光源の設定を有効にする glenable(gl_light0); //0 番目の光源を有効にする (8 個まで設定可能 ) 光源の位置 GLfloat light0pos[] = {

More information

演算増幅器

演算増幅器 コンピュータグラフィックス 2 前回は GLUT を使った簡単な 2 次元グラフィックスについて習った 今週は以下の項目について 補足していく イベント駆動型プログラムの動作について コンピュータグラフィックスの座標系 イベント駆動型プログラム従来のプログラムとの違いこれまでに学習してきたプログラムは上から下に順次実行され 条件分岐や繰り返し処理によって プログラムの流れ (flow: フロー )

More information

Kageyama (Kobe Univ.) / 36

Kageyama (Kobe Univ.) / 36 DrawArrays DrawElements 05 1 2015.05.19 Kageyama (Kobe Univ.) 2015.05.19 1 / 36 Kageyama (Kobe Univ.) 2015.05.19 2 / 36 Kageyama (Kobe Univ.) 2015.05.19 3 / 36 Web アプリ HTML + CSS + JavaScript + シェーダソースコード

More information

TA TA TA abcdefgh abcdefgh C PC Wii bluetooth 2.2 Bluetooth USB Princeton PTM-UBT3S 1 1

TA TA TA abcdefgh abcdefgh C PC Wii bluetooth 2.2 Bluetooth USB Princeton PTM-UBT3S 1 1 1 22 (2) TA: 2010 12 13 1 OpenGL Wii Wii OpenGL USB (3DCG) 1.1 http://www.cyber.t.u-tokyo.ac.jp/~kuni/enshu2010/ URL USB 2 2 1.2 TA 16 15 TA TA mireport@cyber.t.u-tokyo.ac.jp 20101213 abcdefgh abcdefgh

More information

コンピュータグラフィックスS 演習資料

コンピュータグラフィックスS 演習資料 2015/5/26 コンピュータグラフィックスS 演 習 資 料 第 2 回 ポリゴンモデルの 描 画 九 州 工 業 大 学 情 報 工 学 部 システム 創 成 情 報 工 学 科 講 義 担 当 : 尾 下 真 樹 1. 準 備 : 前 回 の 演 習 本 日 の 演 習 は 前 回 の 演 習 で 作 成 したプログラムを 引 き 続 き 修 正 していく もし 前 回 の 演 習 を 行

More information

Tekutama AR ~ 拡張現実感によるオーバーレイ表示と動作 ~ 情報物理研究室 渡部 修平 1

Tekutama AR ~ 拡張現実感によるオーバーレイ表示と動作 ~ 情報物理研究室 渡部 修平 1 Tekutama AR ~ 拡張現実感によるオーバーレイ表示と動作 ~ 情報物理研究室 渡部 修平 1 目次 項 1. はじめに 3 2. 開発環境 4 2-1. ARToolkit 4 2-2. OpenGL GLUT 5 2-3. Metasequoia 6 2-4. GLMetaseq 6 3. 3DCG モデルの作成 7 4. AR プログラムの構成 9 4-1. main 関数 10 4-2.

More information

2 2 2 OpenGL Linux Linux Video for Linux(Video4Linux, v4l ) API Video4Linux USB IEEE1394 API Linux Video for Linux 2(Video4Linux2, v4l2 ) OpenCV API U

2 2 2 OpenGL Linux Linux Video for Linux(Video4Linux, v4l ) API Video4Linux USB IEEE1394 API Linux Video for Linux 2(Video4Linux2, v4l2 ) OpenCV API U 1 26 (2) 3DCG TA 2014 10 17 1 OpenGL USB (3DCG) OpenCV CG Augmented Reality ARToolKit 3DCG 1.1 http://www.cyber.t.u-tokyo.ac.jp/~tani/class/mech_enshu/ 1.2 TA 1.3 ( ) USB (2014/11/10( ),11( ),13( )) (2012/11/17(

More information

コンピュータグラフィックス特論Ⅱ

コンピュータグラフィックス特論Ⅱ コンピュータグラフィックス特論 Ⅱ 第 5 回影の表現 ( 高度な描画技術 ) 九州工業大学尾下真樹 影の表現 レンダリング画像の現実感 ( リアリティ ) を出す上で 影の描画は不可欠 影の有無は 画面の自然さに大きく影響 特に空中に浮いている物体を描画するようなときには 影があると 高さが把握しやすい 影の描画の技術 いくつかの方法が利用されている 高度な描画技術が必要となる アルファブレンディング

More information

コンピュータグラフィックス特論Ⅱ

コンピュータグラフィックス特論Ⅱ 影の表現 コンピュータグラフィックス特論 Ⅱ 第 5 回影の表現 ( 高度な描画技術 ) 九州工業大学尾下真樹 2019 年度 レンダリング画像の現実感 ( リアリティ ) を出す上で 影の描画は不可欠 影の有無は 画面の自然さに大きく影響 特に空中に浮いている物体を描画するようなときには 影があると 高さが把握しやすい 影の描画の技術 いくつかの方法が利用されている 高度な描画技術が必要となる アルファブレンディング

More information

JAPLAシンポジウム資料 2009/12/5

JAPLAシンポジウム資料 2009/12/5 JAPLA シンポジウム資料 2009/12/5 J の OpenGL グラフィックス - その 5 - 正 12 面体と正 20 面体を動かす - 西川利男 正 12 面体と正 20 面体との頂点座標が別報 [1] のように計算されたので それを用いて J の OpenGL により 3 D グラフィックス図形を描き いろいろ動かしてみる 1. 正 12 面体と正 20 面体の J プログラム (J402

More information

コンピューターグラフィックスS

コンピューターグラフィックスS 前回の演習の復習 今日の内容 コンピューターグラフィックス S 第 7 回演習 (2): ポリゴンモデルの描画 システム創成情報工学科尾下真樹 前回の復習 ポリゴンの描画方法 ( 復習 ) 基本オブジェクトの描画 ポリゴンモデルの描画 演習課題 サンプルプログラム 前回の演習の復習 opengl_sample.c 地面と 枚の青い三角形が表示される マウスの右ボタンドラッグで 視点を上下に回転 前回の演習課題.

More information

/* drawing function */ function_graph();// drawing graph glflush(); int main(int argc, char **argv ) glutinit( &argc, argv ); glutinitdisplaymode( GLU

/* drawing function */ function_graph();// drawing graph glflush(); int main(int argc, char **argv ) glutinit( &argc, argv ); glutinitdisplaymode( GLU OpenGL ( ) #include #include #define PI 3.14159265 void function_graph() int j; float x, y; glbegin( GL_LINE_STRIP );// sine curve by line glcolor3f( 0.0f, 1.0f, 1.0f );// line color

More information

JAPLA研究会資料 2010/4/24

JAPLA研究会資料 2010/4/24 JAPLA 研究会資料 2010/4/24 J の OpenGL グラフィックス - その 8 Texture によるパターンの貼り付け - サイコロを作って動かす - 西川利男 0. はじめにこれまで OpenGL グラフィックスもいろいろやってきた [1]~[7] OpenGL の Texture 機能を利用したパターンの貼り付け処理はさまざまな用途に使われる 今回はこれを利用してサイコロを作ってみた

More information

19_OpenGLES.key

19_OpenGLES.key CS193P - Lecture 19 iphone Application Development OpenGL ES 1 Announcements Final projects due in 7 days Tuesday, March 16th 11:59 pm Submit: Code Power-point/Keynote slides ReadMe file Final project

More information

Microsoft Word - mediaJikkenCG_no2_2007.doc

Microsoft Word - mediaJikkenCG_no2_2007.doc 2007 年度メディア情報学実験 1 CG テキスト第 2~4 週 :OpenGL ライブラリを使った 3 次元 CG プログラミング立命館大学情報理工学部メディア情報学科 1. 実験の目的と手順本実験は,(1)OpenGLライブラリを用いたCGプログラミングの手法を学ぶ,(2) プログラミングを通して, CGの基礎技術を体験的に学ぶ,(3) インタラクティブな3 次元 CGアニメーションを作成する方法について学ぶ,

More information

PowerPoint Presentation

PowerPoint Presentation 8-1 8. テクスチャマッピング 8.1. テクスチャマッピングの原理 狭義には, 図のように, 与えられた画像を物体に貼り付ける方法. マッピングには投影法, 極座標変換, パラメータマッピングなどがある (1 年 コンピュータ グラフィックス ). 広義にはバンプマッピングなども含まれる. t y s z x 8-2 8.2. テクスチャマッピングの設定方法 全体の流れ 1) 原図ビットマップデータを内部形式に変換

More information

免許法認定公開講座: コンピュータグラフィックス

免許法認定公開講座:コンピュータグラフィックス 演習内容 免許法認定公開講座 : コンピュータグラフィックス 第 6 回 3 次元グラフィックス演習 基本的な3 次元グラフィックスのプログラムを作成 OpenGL を使ったポリゴン描画 視点操作 アニメーション 九州工業大学情報工学部システム創成情報工学科尾下真樹 参考書 最低限の関数は資料で説明 OpenGLの定番の本 ( 高い ) OpenGLプログラミングガイド ( 赤本 ), 12,000

More information

adv99_4.PDF

adv99_4.PDF Advanced Graphics Programing Techniques Using OpenGL Section 6 Texture Mapping (page 40 77) 1 6 Texture Mapping(1) 2 6 Texture Mapping(2) ( ) ( ) OpenGL 3 6.1 Texture Basics 4 6.1.1 The Texture Image(1)

More information

1 3 2 OpenGL 4 3 OpenGL 5 4 OpenGL 6 OpenGl : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 6 : : : : : : : : : : : : : : : : : : : : :

1 3 2 OpenGL 4 3 OpenGL 5 4 OpenGL 6 OpenGl : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 6 : : : : : : : : : : : : : : : : : : : : : 1999 OpenGL S96M501 S96M596 S96M649 1 3 2 OpenGL 4 3 OpenGL 5 4 OpenGL 6 OpenGl : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 6 : : : : : : : : : : : : : : : : : : : : : 7 5 10 OpenGL :

More information

Microsoft Word - mediaJikkenCG_no2_2012.doc

Microsoft Word - mediaJikkenCG_no2_2012.doc 2012 年度メディア情報学実験 1 CG テキスト第 2~5 週 :OpenGL ライブラリを使った 3 次元 CG プログラミング立命館大学情報理工学部メディア情報学科 1. 実験の目的と手順本実験は,(1)OpenGLライブラリを用いたCGプログラミングの手法を学ぶ,(2) プログラミングを通して, CGの基礎技術を体験的に学ぶ,(3) インタラクティブな3 次元 CGアニメーションを作成する方法について学ぶ,

More information

Microsoft Word - ggbook.docx

Microsoft Word - ggbook.docx 62 4GPU (Graphics Processing Unit) 4.1 4.1.1 63 63 ( 64) " () " " " 64 63 4.1.2 () GPU (Graphics Procssing Unit) (Transform) (Lighting ) T & L (Transform and Lighting) " CG 4 4 4 4 () 4 4 4 4 4 4 4 16

More information

10 B 3. ( ) (3)

10 B 3. ( ) (3) Augus 5, 009 10 B 3. ( ) (3) ( ) 1 OpenGL CG 1 C OpenGL 3 CG 4 OpenGL 1. 1 OpenGL CG 1 C 1.1 I C [1] es.c C es.obj es.exe *.lib *.obj C 1. C I C #include < > in main( ) { reurn 0; } { reurn ; } Hellow

More information

準備 計算結果を可視化するために OpenGL を 利用する. 2

準備 計算結果を可視化するために OpenGL を 利用する. 2 2. 2 次元粒子法シミュレーション (+ 少しだけ OpenGL) 茨城大学工学部 教授乾正知 準備 計算結果を可視化するために OpenGL を 利用する. 2 OpenGL 3 次元コンピュータグラフィックス用の標準的なライブラリ. 特に CAD やアート, アニメーション分野 ( ゲーム以外の分野 ) で広く利用されている. OpenGL は仕様がオープンに決められており, 企業から独立した団体が仕様を管理している.

More information

コンピューターグラフィックスS

コンピューターグラフィックスS コンピューターグラフィックス S 第 12 回シェーディング マッピング システム創成情報工学科尾下真樹 2018 年度 Q2 今回の内容 前回の復習 シェーディング 光のモデル スムーズシェーディング シェーディング ( 続き ) OpenGL での光源情報の設定 ラジオシティ 影の表現 BRDF マッピング 今回の内容 シェーディング 光の効果の表現 マッピング 生成画像 表面の素材の表現 オブジェクト

More information

JAPLA研究会資料 /6/15

JAPLA研究会資料 /6/15 JAPLA 研究会資料 20013/6/15 J-OpenGL による 3D グラフィックス - その 10 * メビウスの帯へ向けて -J-OpenGL をどう理解するか - 西川 利男 J で OpenGL を利用することで高度の三次元グラフィックスの処理が可能となった 前回の例会で志村正人氏よりメビウスの帯やクラインの壷など アートとして眺めるだけでも楽しいグラフィックスがいろいろ紹介された

More information

$ ls -l $ ls -l -a $ ls -la $ ls -F $ ls <dirname> <dirname> $ cd <dirname> <dirname> $ cd $ pwd $ cat <filename> <filename> $ less <filename> <filena

$ ls -l $ ls -l -a $ ls -la $ ls -F $ ls <dirname> <dirname> $ cd <dirname> <dirname> $ cd $ pwd $ cat <filename> <filename> $ less <filename> <filena $ pwd /home1/t0/t0903 / / /home1/t0/t0903 / / /home1/t0/t0903 / /... ~ $ ls $ ls -a $ ls -l $ ls -l -a $ ls -la $ ls -F $ ls $ cd $ cd $ pwd $ cat

More information

3. OpenGL を利用するための準備作業 1) Tao Framework をダウンロードしてインストールする. Download から taoframework setup.exe をダウン

3. OpenGL を利用するための準備作業 1) Tao Framework をダウンロードしてインストールする.   Download から taoframework setup.exe をダウン [OpenGL:1] OpenGL とは 1.OpenGL とは何か? 米国 Silicon Graphics 社 (SGI) が中心となって開発した 3 次元グラフィックスライブラリである.SGI はグラフィックスに特化したワークステーション (GWS) の開発を積極的に行い, 自社の GWS 上で稼動するグラフィックスライブラリ IRIS GL を開発したが, その後, この仕様を公開したライブラリとして

More information

JAPLA研究会資料 2012/8/2

JAPLA研究会資料 2012/8/2 JAPLA 研究会資料 2012/8/2 ローレンツなどカオスの 3D グラフィックス J-OpenGL により カオスの実行を段階的に観察する 西川利男 ローレンツ レスターなどカオスの図形は 志村氏により J の簡便かつ強力なグラフィックス機能を示す例としてたびたび紹介されている これらのカオス現象の物理は それ自身私にとってもおおいに興味をそそられるテーマである J の OpenGL グラフィックスを用いて

More information

Microsoft Word - opengl講義資料2013.doc

Microsoft Word - opengl講義資料2013.doc [OpenGL:1] OpenGL とは 1.OpenGL とは何か? 米国 Silicon Graphics 社 (SGI) が中心となって開発した 3 次元グラフィックスライブラリである.SGI はグラフィックスに特化したワークステーション (GWS) の開発を積極的に行い, 自社の GWS 上で稼動するグラフィックスライブラリ IRIS GL を開発したが, その後, この仕様を公開したライブラリとして

More information

Microsoft Word - opengl講義資料ha.doc

Microsoft Word - opengl講義資料ha.doc [OpenGL:1] OpenGL とは 1.OpenGL とは何か? 米国 Silicon Graphics 社 (SGI) が中心となって開発した 3 次元グラフィックスライブラリである.SGI はグラフィックスに特化したワークステーション (GWS) の開発を積極的に行い, 自社の GWS 上で稼動するグラフィックスライブラリ IRIS GL を開発したが, その後, この仕様を公開したライブラリとして

More information

JAPLA研究会資料 2017/5/20

JAPLA研究会資料 2017/5/20 JAPLA 研究会資料 2017/5/20 J-OpenGL による 3D- グラフィックス - その 13-3 次元空間での錯視 - 西川利男 はじめに私がボランティアとして出ている日本科学未来館で 現在 (5/20 まで 錯視 というテーマをやっている その中で 杉原厚吉先生による3 次元空間での錯視のデモが好評で 来館者を楽しませてくれている それに触発されて 3 次元空間の幾何学の問題を J-OpenGL

More information

沼津工業高等専門学校

沼津工業高等専門学校 VisualStudio2010 を用いた OpenGL(Glut) コンソール アプリケーションの作成方法 初版 : 2007.01.06 藤尾 改訂 : 2010.08.24 秋山 - 1 - - 目次 - Ⅰ. プログラミングの準備 3 Ⅰ.1 はじめに 3 Ⅰ.2 OpenGL の環境設定 3 Ⅱ. プログラミングの第 1 歩 ( 簡単なプログラムの作成 ) 3 Ⅱ.1 プロジェクトの作成と保存

More information

複雑系科学演習1 コンピュータグラフィックス

複雑系科学演習1 コンピュータグラフィックス 情報科教育法 担当畔上秀幸情報科学研究科複雑系科学専攻 高等学校学習指導要領 第 章 : 普通教育に関する各教科 - 第 0 節 : 情報 hp://www.mex.go.jp/b_menu/shuppan/sono a/99030/03603/0.hm 情報 B (3) 問題のモデル化とコンピュータを活用した解決 ア モデル化とシミュレーション 身のまわりの現象や社会現象などを通して, モデル化とシミュレーションの考え方や方法を理解させ,

More information

イントロダクション

イントロダクション プログラミング演習 IV 第 7 回マウス, キーボード, サウンド, 文字 埼玉大学情報システム工学科 小林貴訓 マウス入力 クリックイベントのコールバック関数の登録 glutmousefunc(mouse); クリックイベントのコールバック関数 // マウスクリックコールバック関数の指定 static int MouseLB_ON=0; // 左マウスボタン押下フラグ static int MouseRB_ON=0;

More information

j x j j j + 1 l j l j = x j+1 x j, n x n x 1 = n 1 l j j=1 H j j + 1 l j l j E

j x j j j + 1 l j l j = x j+1 x j, n x n x 1 = n 1 l j j=1 H j j + 1 l j l j E 8 9 7 6 4 2 3 5 1 j x j j j + 1 l j l j = x j+1 x j, n x n x 1 = n 1 l j j=1 H j j + 1 l j l j E a n 1 H = ae l j, j=1 l j = x j+1 x j, x n x 1 = n 1 j=1 l j, l j = ±l l > 0) n 1 H = ϵ l j, j=1 ϵ e x x

More information

JAPLA研究会資料 2013/5/25

JAPLA研究会資料  2013/5/25 JAPLA 研究会資料 2013/5/25 J-OpenGL による 4 進フラクタル立体木のグラフィックス 西川利男 今年の大学センター試験の出題をきっかけとして 3 進法およびそれを活用した 3 進フラクタル木の J プログラムについて先に報告した [1][2] 図形表示の値を 3 進法で表すことで フラクタル木のグラフィックスが ごく自然に行われた それでは 4 進法ではどうだろうか? 同じ発想を展開すると

More information

PowerPoint プレゼンテーション

PowerPoint プレゼンテーション 複雑系科学演習 1 コンピュータグラフィックス 担当畔上秀幸情報科学研究科複雑系科学専攻 今日の話題 STL ファイルを読み込んで表示する. STL データをどのようなデータ構造に格納しているか? 配列を用いる方法 構造体を用いる方法 読み込んだデータをどのように使うか? lesson8_1.c の説明 solid NOTITLE facet normal 00e+00 000e+00 1.000000e+00

More information

Microsoft PowerPoint - 04.pptx

Microsoft PowerPoint - 04.pptx 初期化 コールバック関数の登録 glutmainloop() 描画関数 マウス処理関数 キーボード処理関数などの関数ポインタを登録する イベント待ちの無限ループ 再描画? no マウス入力? no キーボード入力? no yes yes yes 描画関数の呼び出し マウス処理関数の呼び出し キーボード処理関数の呼び出し void keyboard(unsigned char key, int x,

More information

GLSC3D (Ver. 3.0.0) Manual (Ver. 2.2.1 ) 1 2 3, 2, 3 (Ver. 2.2.1 ) 2017 8 1 3 1 8 1.1 GLSC.................................. 8 1.2 GLSC................................. 9 1.3 GLSC3D................................

More information

test_cylpyd

test_cylpyd JAPLA 研究会資料 2013/9/14 実験と 3D グラフィックスによる幾何学 ピラミッド ( 三角錐 の体積はプリズム ( 三角柱 の 1/3 になる きみにはすぐ分かるだろうか 西川 利男 はじめに 錐体 ( 三角錐 四角錐 円錐 の体積は 柱体 ( 三角柱 四角柱 円柱 の体積の 1/3 である だれでも知っているこの有名な公式は中学校の教科書にのっているだろうが その理由をわかるように説明してはいない

More information

2009 2010 2 23 (MHD ) GFV (Galium Field Visualizer) GFV OpenGL GFV GFV GFV 1 1 2 2 2.1.................... 2 2.2................................. 2 2.3...................... 3 3 6 3.1 GFV....................

More information

Kageyama (Kobe Univ.) Visualization / 32

Kageyama (Kobe Univ.) Visualization / 32 WebGL 2014.06.24 X021 2014 Kageyama (Kobe Univ.) Visualization 2014.06.24 1 / 32 Kageyama (Kobe Univ.) Visualization 2014.06.24 2 / 32 Kageyama (Kobe Univ.) Visualization 2014.06.24 3 / 32 kobe u logo

More information

human_sample.cpp 1 /** 2 *** キャラクタアニメーションのための人体モデルの表現 基本処理ライブラリ サンプルプログラム 3 *** Copyright (c) 2015-, Masaki OSHITA ( 4 *** Released

human_sample.cpp 1 /** 2 *** キャラクタアニメーションのための人体モデルの表現 基本処理ライブラリ サンプルプログラム 3 *** Copyright (c) 2015-, Masaki OSHITA (  4 *** Released 1 /** 2 *** キャラクタアニメーションのための人体モデルの表現 基本処理ライブラリ サンプルプログラム 3 *** Copyright (c) 2015-, Masaki OSHITA (www.oshita-lab.org) 4 *** Released under the MIT license http://opensource.org/licenses/mit-license.php

More information

ゲームグラフィックス特論

ゲームグラフィックス特論 ゲームグラフィックス特論 第 13 回遅延レンダリング 2 Render To Texture テクスチャにレンダリング 3 レンダリング結果を素材として利用する 映り込みや屈折などの光学的効果 1. 視点を変更してレンダリングする 2. レンダリング結果をテクスチャとしてマッピングする このレンダリング結果は直接には画面に表示されない 素材を作成するために画面表示を行わずにレンダリングする オフスクリーンレンダリング

More information

JAPLA研究会資料 2010/1/23

JAPLA研究会資料 2010/1/23 JAPLA 研究会資料 2010/1/23 J の OpenGL グラフィックス - その 6 - サッカーボールとその仲間たち - 西川利男 J の OpenGL プログラミングをここ数回にわたって紹介してきた 昨年暮れの JAPLA シンポジウムでは正 12 面体 正 20 面体の 3D グラフィックスを発表したが そのとき サッカーボールはどうだ? との質問 ご要望がでた サッカーボールの黒白パターンはあらためて見てみると意外と複雑である

More information

Kageyama (Kobe Univ.) 2015.06.23 2 / 41

Kageyama (Kobe Univ.) 2015.06.23 2 / 41 2015 2015.06.23 Kageyama (Kobe Univ.) 2015.06.23 1 / 41 Kageyama (Kobe Univ.) 2015.06.23 2 / 41 [ 1, +1] [ 1, +1] [ 1, +1] Kageyama (Kobe Univ.) 2015.06.23 3 / 41 Kageyama (Kobe Univ.) 2015.06.23 4 / 41

More information

コンピュータグラフィクス論

コンピュータグラフィクス論 コンピュータグラフィクス論 2015 年 4 月 9 日 高山健志 教員紹介 高山健志 ( 国立情報学研究所特任助教 ) http://research.nii.ac.jp/~takayama/ takayama@nii.ac.jp 蜂須賀恵也 ( 創造情報学専攻講師 ) http://www.ci.i.u-tokyo.ac.jp/~hachisuka/ thachisuka@siggraph.org

More information

コンピューターグラフィックスS

コンピューターグラフィックスS コンピューターグラフィックス S 第 2 回コンピュータグラフィックスの要素技術 システム創成情報工学科尾下真樹 2018 年度 Q2 今回の内容 前回の復習 コンピュータグラフィックスの歴史と応用 3 次元グラフィックスの要素技術 3 次元グラフィックス プログラミング 教科書 ( 参考書 ) コンピュータグラフィックス CG-ARTS 協会編集 出版 (3,200 円 ) 1~5 章の概要 ビジュアル情報処理

More information

B.1 WebGL APIリファレンス この付録は WebGL JavaScript APIのすべての関数 その引数 戻り値を簡単にし API の概要を示す WebGLとOpenGL ES 2 APIの詳細は webgl/specs/

B.1 WebGL APIリファレンス この付録は WebGL JavaScript APIのすべての関数 その引数 戻り値を簡単にし API の概要を示す WebGLとOpenGL ES 2 APIの詳細は  webgl/specs/ 付録 B WebGL Reference B.1 WebGL APIリファレンス この付録は WebGL JavaScript APIのすべての関数 その引数 戻り値を簡単にし API の概要を示す WebGLとOpenGL ES 2 APIの詳細は http://www.khronos.org/registry/ webgl/specs/1.0/ のWebGL 仕様書 http://www.khronos.org/registry/gles/

More information

PowerPoint プレゼンテーション

PowerPoint プレゼンテーション 複雑系科学演習 1 コンピュータグラフィックス 担当畔上秀幸情報科学研究科複雑系科学専攻 今日の話題 ベジェ曲線 曲面の描画 lesson9_1.c( ベジェ曲線 ) lesson9_2.c( 色付きベジェ曲線 ) lesson9_3.c( ベジェ曲面 ) NURBS 曲線 曲面の描画 lesson9_4.c(nurbs 曲線 ) lesson9_5.c(nurbs 曲線の分割 ) lesson9_6.c(nurbs

More information

イントロダクション

イントロダクション プログラミング演習 IV 第 8 回 OpenCV とテクスチャマッピング物体の発光や透過 埼玉大学情報システム工学科 小林貴訓 OpenCV PC で画像処理を行うライブラリ インテル社の画像処理ライブラリが起源 2000 年頃に最初のバージョン CPU でも画像処理ができることを見せたかった? Open 化して, 現在は Willow Garage( ウィロー ガレージ ) が開発を行っている

More information

Presentation

Presentation OpenGL ES Agenda DMP OpenGL ES OpenGL ES 1.1 OpenGL ES 2.0 OpenGL OpenGL OpenGL ES EGL KTX DMP IP OpenGL ES E- PICA200 GPU DMP DMP www.dmprof.com D D JR 2 2002 7 OpenGL ES ULTRAY 2000 Chip (SIGGRAPH 2005)

More information

WebGL OpenGL GLSL Kageyama (Kobe Univ.) Visualization / 57

WebGL OpenGL GLSL Kageyama (Kobe Univ.) Visualization / 57 WebGL 2014.04.15 X021 2014 3 1F Kageyama (Kobe Univ.) Visualization 2014.04.15 1 / 57 WebGL OpenGL GLSL Kageyama (Kobe Univ.) Visualization 2014.04.15 2 / 57 WebGL Kageyama (Kobe Univ.) Visualization 2014.04.15

More information

コンピューターグラフィックスS

コンピューターグラフィックスS 今日の内容 コンピューターグラフィックス S 第 8 回 () システム創成情報工学科尾下真樹 28 年度 Q2 前回の復習 演習 (2): ポリゴンモデルの描画 変換行列 の概要 座標系 視野変換 射影変換 のまとめ 教科書 ( 参考書 ) コンピュータグラフィックス CG-ATS 協会編集 出版 2 章 ビジュアル情報処理 -CG 画像処理入門 - CG-ATS 協会編集 出版 章 (-2~-3

More information

コンピュータグラフィックス特論Ⅱ

コンピュータグラフィックス特論Ⅱ コンピュータグラフィックス特論 Ⅱ 第 1 回コンピュータグラフィックスの基礎 九州工業大学尾下真樹 2019 年度 本日の内容 ガイダンス コンピュータグラフィックスの概要と応用 3 次元グラフィックスの要素技術 3 次元グラフィックスのプログラミング 演習問題 授業担当 尾下真樹 ( おしたまさき ) 居室 : 研究棟 W623 e-mail: oshita@ces.kyutech.ac.jp

More information

コンピュータグラフィクス論

コンピュータグラフィクス論 コンピュータグラフィクス論 2016 年 4 月 7 日 高山健志 教員紹介 高山健志 ( 国立情報学研究所特任助教 ) http://research.nii.ac.jp/~takayama/ takayama@nii.ac.jp 蜂須賀恵也 ( 創造情報学専攻講師 ) http://www.ci.i.u-tokyo.ac.jp/~hachisuka/ thachisuka@siggraph.org

More information

C B

C B C 095707B 2010 6 8 1 LEVE1 2 1.1 LEVEL 1.1................................................ 2 1.1.1 1................................................ 2 1.1.2 1.2..............................................

More information

OpenGL GLSL References Kageyama (Kobe Univ.) Visualization / 58

OpenGL GLSL References Kageyama (Kobe Univ.) Visualization / 58 WebGL *1 2013.04.23 *1 X021 2013 LR301 Kageyama (Kobe Univ.) Visualization 2013.04.23 1 / 58 OpenGL GLSL References Kageyama (Kobe Univ.) Visualization 2013.04.23 2 / 58 Kageyama (Kobe Univ.) Visualization

More information

1 level Level swtich ButtonPress ButtonRelease Expose Level

1 level Level swtich ButtonPress ButtonRelease Expose Level UNIX 4 2D/3D Grahpics,GUI :2-3 - 045708G 045726E 045730C 045735D 045759B 045762B 1 level1 1 11 2 12 4 13 6 14 6 2 Level2 6 21 6 211 swtich 11 212 ButtonPress 11 213 ButtonRelease 12 214 Expose 12 22 12

More information

(300, 150) 120 getchar() HgBox(x, y, w, h) (x, y), w, h #include <stdio.h> #include <handy.h> int main(void) { int i; double w, h; } HgO

(300, 150) 120 getchar() HgBox(x, y, w, h) (x, y), w, h #include <stdio.h> #include <handy.h> int main(void) { int i; double w, h; } HgO Handy Graphic for Handy Graphic Version 0.5 2008-06-09 1 Handy Graphic Handy Graphic C Handy Graphic Handy Graphic Mac OS X Handy Graphic HgDisplayer Handy Graphic HgDisplayer 2 Handy Graphic 1 Handy Graphic

More information

$ pwd /home1/t0/t0903 / / /home1/t0/t0903 / / /home1/t0/t0903 / /... ~ $ ls $ ls -a

$ pwd /home1/t0/t0903 / / /home1/t0/t0903 / / /home1/t0/t0903 / /... ~ $ ls $ ls -a $ pwd /home1/t0/t0903 / / /home1/t0/t0903 / / /home1/t0/t0903 / /... ~ $ ls $ ls -a $ ls -l $ ls -l -a $ ls -la $ ls -F $ ls $ cd $ cd $ pwd $ cat

More information

1 OpenGL OpenGL OpenGL OpenGL

1 OpenGL OpenGL OpenGL OpenGL 2008 OpenGL 2009 2 27 1 OpenGL 4 1.1 OpenGL.............................. 4 1.2 OpenGL............... 4 1.2.1............... 4 1.2.2............................. 5 2 OpenGL 6 2.1.......................

More information

_openglcl

_openglcl 0 0 GPU Graphics Processing Unit CG GPU CG CG GPU OpenGL/GLSL CG D CG D CG GPU CG D CG D CG GPU CG GPU GPGPU General-Purpose computing on Graphics Processing Units GPU GPGPU OpenCL OpenCL OpenGL Windows

More information

GLS user s reference 19 8 21 1 3 1.1....................................................... 3 1.2....................................................... 3 1.3.......................................................

More information

joho07-1.ppt

joho07-1.ppt 0xbffffc5c 0xbffffc60 xxxxxxxx xxxxxxxx 00001010 00000000 00000000 00000000 01100011 00000000 00000000 00000000 xxxxxxxx x y 2 func1 func2 double func1(double y) { y = y + 5.0; return y; } double func2(double*

More information

Graphics Performance Tuning () Z 2

Graphics Performance Tuning () Z 2 All Titles White, 54 Point, OpenGL Bold Italic, Performance Helvetica Narrow, 2 Point Leading Tuning Nihon Silicon Graphics K.K. Sales Division Graphics Grp Systems Engineer Takehiko Terada 1995/07/20

More information

(4) モデルの消去 mqodeletemodel( model ); (5) 終了処理 ( プログラム終了時にやってください ) mqocleanup(); 3. 使い方 (2) 連番ファイルを読み込んで表示する場合 (1) 初期化 (ARToolKit の場合,argInit() の後に使用 )

(4) モデルの消去 mqodeletemodel( model ); (5) 終了処理 ( プログラム終了時にやってください ) mqocleanup(); 3. 使い方 (2) 連番ファイルを読み込んで表示する場合 (1) 初期化 (ARToolKit の場合,argInit() の後に使用 ) GLMetaseq.h の中身 0810960080 渡部修平 メタセコイアで作成した 3D モデルを OpenGL で表示させるためには, 工学ナビ (http://kougaku-navi.net/artoolkit.html) が公開している C/C++ 用のライブラリ GLMetaseq があります 作成しているプログラムのプロジェクトに GLMetaseq.h と GLMetaseq.c

More information

3D 描画 Step2 マウスで回転できるようにする ベクトル (a, b, c) を軸として右回りに rot 度の回転は glrotatef(rot, a, b, c); で実行される 従って 座標軸の回転はそれぞれ x 軸まわり,y 軸まわりの回転量 (degree で表す ) を rotx, roty をとすると x 軸まわりの回転は glrotatef(rotx, 1.0f, 0.0f, 0.0f);

More information