2 2 OpenGL OpenGL OpenGL(Open Graphics Library) Silicon Graphics (SGI) 3D OpenGL SGI HP, SUN,
|
|
- みそら うばら
- 5 years ago
- Views:
Transcription
1 1 20 (1) OpenGL TA C OpenGL (3DCG) OS Linux (Open SUSE 10.3) 3DCG OpenGL GUI GLUT OpenGL GLUT GLUI USB EyeToy DCG 2 3DCG GUI 2 USB EyeToy) 10/20( ) 10/27( ) 3DCG OpenGL OpenGL+GUI(GLUI) 3DCG 1.2 TA
2 2 2 OpenGL OpenGL OpenGL(Open Graphics Library) Silicon Graphics (SGI) 3D OpenGL SGI HP, SUN, IBM UNIX Linux, FreeBSD PC UNIX Windows, Mac OS API PDA OpenGL OpenGL ES 3D 2.1 OpenGL OpenGL OpenGL OpenGL GLUT OpenGL GL OpenGL OpenGL gl GLU OpenGL Utility Library OpenGL GLU glu Window OpenGL (Window ) X Window System GLX, Windows NT/98/95 WGL, OS/2 PGL, Power Mac AGL OS, Window GLUT OpenGL Utility Toolkit(Window ) OpenGL
3 2.1 OpenGL 3 GLUT glut OpenGL 1 OpenGL
4 4 3 OpenGL 3 OpenGL 3.1 OpenGL OpenGL OpenGL 2 OpenGL ( ) ( ) 4x4 ( ) ( ) OpenGL OpenGL ( )
5 3.2 OpenGL OpenGL main() /* Window */ InitializeAWindowPlease(); /* */ glclearcolor (0.0, 0.0, 0.0, 0.0); glclear (GL_COLOR_BUFFER_BIT); /* */ glcolor3f (1.0, 1.0, 1.0); /* */ glortho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0); /* */ glbegin(gl_polygon); glvertex3f (0.25, 0.25, 0.0); glvertex3f (0.75, 0.25, 0.0); glvertex3f (0.75, 0.75, 0.0); glvertex3f (0.25, 0.75, 0.0); glend(); /* */ glflush (); /* Window */ UpdateTheWindowAndCheckForEvents(); 3.3 OpenGL GLUT OpenGL (sample clr.c) Web glclearcolor(glclampf red, GLclampf green, GLclampf blue, GLclampfalpha); GLglampf
6 6 3 OpenGL 3 OpenGL (sample-clr.c) alpha glutclearcolor(0.0, 0.0, 0.0, 0.0); glclearcolor glclear(gl_color_buffer_bit); glflush(); glut GLUT(OpenGL Utility Toolkit) GLUT Windows X window system GLUT 3.7 GLU 3
7 3.5 glut 7 GLUT glutinit void glutinit(int *argcp, char **argv); argcp main argc GLUT argv main argv GLUT X Window System GLUT -display, -geometry man X void glutinitwindowposition(int x, int y); void glutinitwindowsize(int width, int height); x, y width, height 4 OpenGL glutinitwindow* OpenGL glutinitwindow* (OpenGL )
8 8 4 2 glutinitdisplaymode void glutinitdisplaymode(unsigned int mode); mode RGBA (GLUT RGBA or GLUT INDEX) (GLUT DEPTH) (GLUT SINGLE or GLUT DOUBLE) RGBA glutinitdisplaymode(glut_rgba GLUT_DOUBLE GLUT_DEPTH); OpenGL int glutcreatewindow(char *titlestring); titlestring OpenGL OpenGL void glutpostredisplay(void); display 1 1 void glutmainloop(void); glutdisplayfunc ( ) (sample-hello.c)
9 4.1 OpenGL 9 5 OpenGL (sample-hello.c) 4.1 OpenGL glcolor3f(glclampf red, GLclampf green, GLclampf blue); glcolor3f(1.0f, 1.0f, 0.0f); glbegin(glenum mode); mode (GL POLYGON) (GL TRIANGLE FAN) ( ) (GL TRIANGLE STRIP) (GL LINES) (GL POINTS)
10 glend(); glvertex3f(glfloat x, GLfloat y, GLfloat z); glvertex* 3 3 (x, y, z) f 32bit (GLfloat) 4.2 OpenGL gluortho2d 6 gluortho2d(x1,x2,y1,y2); OpenGL void glmatrixmode(glenum mode); mode
11 (GL PROJECTION) (GL MODELVIEW) (GL TEXTURE) void glloadidentity(void); 2 ( ) void gluortho2d(gldouble left, GLdouble right, GLdouble bottom, GLdouble top); gluortho2d 3 glortho near, far -1.0, 1.0 OpenGL gluortho2d(-1.0, 1.0, -1.0, 1.0); glortho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0); 1. glmatrixmode(gl_projection); 2. glloadidentity(void); 3. gluortho2d(left, right, bottom, top); 4. glmatrixmode(gl_modelview); 4.3 OpenGL OpenGL ( ) void glviewport(glint x, GLint y, GLsizei width, GLsizei height);
12 (x,y) width height glutreshapefunc void glutreshapefunc(void (*func)(int width, int height)); OpenGL 2
13 13 5 OpenGL 5.1 OpenGL OpenGL 3 glut #include <GL/gl.h> /* */ #include <GL/glu.h> /* glu */ #include <GL/glx.h> /* X Window System */ GLUT #include <GL/glut.h> gl.h glu.h glut.h glut.h window.h UNIX WIndows GLUT -lglut -lglu -lgl simple.c. simple % gcc simple.c -o simple -lglut -lglu -lgl
14 14 5 OpenGL 5.2 Makefile #MAKEFILE CC = gcc RM = rm -f CFLAGS = -Wall LDFLAGS = -lglut -lglu -lgl -lm TARGET OBJS = sample-clr = sample-clr.o.c.o: $CC -c $CFLAGS $< TARGET: $OBJS $CC -o $TARGET $OBJS $LDFLAGS clean: $RM $TARGET *.o *~ sample-clr.c sample-hello.c 4. glortho() glvertex3f()
15 OpenGL 1. ( ) 2. ( ) 3. ( ) ( ) 4. ( ) 8 OpenGL OpenGL 4x4 M v v = Mv v 4 (x, y, z, w) w 1
16 16 6 w 9 OpenGL 6.2 (sample-cube.c) void init(void) glclearcolor (0.0, 0.0, 0.0, 0.0); glshademodel (GL_FLAT); void display(void) glclear (GL_COLOR_BUFFER_BIT); glcolor3f (1.0, 1.0, 1.0); glloadidentity (); /* clear the matrix */ /* viewing transformation */ glulookat (0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0); glscalef (1.0, 2.0, 1.0); /* modeling transformation */ glutwirecube (1.0); glflush ();
17 void reshape (int w, int h) glviewport (0, 0, (GLsizei) w, (GLsizei) h); glmatrixmode (GL_PROJECTION); glloadidentity (); glfrustum (-1.0, 1.0, -1.0, 1.0, 1.5, 20.0); glmatrixmode (GL_MODELVIEW); /* ARGSUSED1 */ void keyboard(unsigned char key, int x, int y) switch (key) case 27: exit(0); break; int main(int argc, char** argv) glutinit(&argc, argv); glutinitdisplaymode (GLUT_SINGLE GLUT_RGB); glutinitwindowsize (500, 500); glutinitwindowposition (100, 100); glutcreatewindow (argv[0]); init (); glutdisplayfunc(display); glutreshapefunc(reshape); glutkeyboardfunc(keyboard); glutmainloop(); return 0; glulookat() glfrustum() glviewport()
18 glloadidentity() (current matrix) glulookat() (0, 0, 5) (0, 0, 0) (0, 1, 0) glulookat() z (0, 1, 0) glulookat() z 5. glscalef() 3 y 2 ( ) ( ) glulookat() gltranslatef(0.0, 0.0, -5.0) OpenGL (modelview matrix) glutwirecube() display() glutdisplayfunc display() OpenGL 2 (perspective) glfrustum() (orthographic) CAD reshape() glmatrixmode(gl PROJECTION) glloadidentity() glfrustum()
19 6.4 OpenGL 19 glviewport() ( (0, 0)) ( ) reshape() ( ) reshape() 6.4 OpenGL glmatrixmode() void glmatrixmode(glenum mode); mode GL MODELVIEW GL PROJECTION GL TEXTURE. glloadidentity() void glloadidentity(void); 4x4 3 OpenGL gltranslate*() glrotate*() glscale*() ( ) 3. void gltranslatefd(type x, TYPE y, TYPE z);
20 20 6 x, y, z ( ) void glrotatefd(type angle, TYPE x, TYPE y, TYPE z); (x, y, z) ( ) angle glrotatef(45.0, 0.0, 0.0, 1.0) z 45 void glscalefd(type x, TYPE y, TYPE z); x, y, z x, y, z x, y, z (gltranslate*() glrotate*()) OpenGL Utility Library(GLU) glulookat(). void glulookat(gldouble eyex, GLdouble eyey, GLdouble eyez, GLdouble centerx, GLdouble centery, GLdouble centerz, GLdouble upx, GLdouble upy, GLdouble upz); eyex, eyey, eyez centerx, centery, centerz upx, upy, upz z y glfrustum() glperspective() glortho() glortho2d().
21 6.4 OpenGL 21 glmatrixmode(gl_projection); glloadidentity(); void glfrustum(gldouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far); (left, bottom, -near) (right, top, -near) near far ( ). 10 glfrustum() void glperspective(gldouble fovy, GLdouble aspect, GLdouble near, GLdouble far); fovy x-z [0.0, 180.0] aspect near far z ( ) 11 glperspective()
22 22 6 void glortho(gldouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far); (left, bottom, -near) (right, top, -near) (left, bottom, -far) (right, top, -far) near far 12 glortho() void glortho2d(gldouble left, GLdouble right, GLdouble bottom, GLdouble top); 2 (left, bottom) (right, top) z glortho() 2 z 0.0 glviewport() 2 void glviewport(glint x, GLint y, GLsizei width, GLsizei height);
23 6.4 OpenGL 23 (x, y) width height (0, 0, winwidth, winheight) winwidth, winheight
24 OpenGL (geometric primitive) (Vertex) 3 2 (x, y) z 0 Vertex OpenGL (convex). GLU 7.2 OpenGL OpenGL glvertex*() void glvertex234sifd[v](type coords) : glvertex2s(2, 3); glvertex3f(2.3, 1.1, -2.2); GLdouble dvect[3]=5.0, 9.0, ; glvertex3dv(dvect);
25 7.2 OpenGL 25 glvertex*() glbegin() glend() glbegin() : glbegin(gl_polygon); glvertex2f(0.0, 0.0); glvertex2f(0.0, 3.0); glvertex2f(4.0, 3.0); glvertex2f(6.0, 1.5); glvertex2f(4.0, 0.0); glend(); glbegin(gl_polygon); glend(); glbegin(gl_triangle_fan); glend(); glbegin(gl_triangle_strip); glend(); glbegin(gl_lines); glend(); GL_POINTS, GL_LINES, GL_LINE_STRIP, GL_LINE_LOOP, GL_TRIANGLES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_QUADS, GL_QUAD_STRIP, and GL_POLYGON. glbegin() glend() glvertex*() :
26 OpenGL glbegin(gl_points); glcolor3f(0.0, 1.0, 0.0); glvertex(...); glcolor3f(1.0, 1.0, 0.0); glvertex(...); glvertex(...); glend();. : #define PI GLint circle_points=100; glbegin(gl_line_loop); for(i=0; i<circle_points; i++) angle = 2*PI*i/circle_points; glvirtex2f(cos(angle), sin(angle)); glend();
27 glpointsize() void glpointsize(glfloat size); 1.0 void gllinewidth(glfloat width); void gllinestipple(glint factor, GLushort pattern); (width) pattern factor pattern gllinestipple(1, 0x3F07); glenable(gl_line_stapple); 0x3f07 ( ) 3 ON 5 OFF 6 ON 2 OFF factor 2 6 ON 10 OFF 12 ON 4 OFF gllinestipple() glenable() glpolygonmode() void glpolygonmode(glenum face, GLenum mode); face GL FRONT AND BACK, GL FRONT, GL BACK mode GL POINT( ), GL LINE( ), GL FILL( )
28 28 7 void glfrontface(glenum mode); void glcullface(glenum mode); ( ) glfrontface() glcullface(gl BACK) glenable(gl CULL FACE). 7.4 GLUT GLUT 9 2 OpenGL void glutwiresphere(gldouble radius, GLint slices, GLint stacks); void glutsolidsphere(gldouble radius, GLint slices, GLint stacks); glutsolidsphere glutwiresphere radius radius slices Z ( ) stacks Z ( ) void glutwirecube(gldouble size); void glutsolidcube(gldouble size); glutwirecube glutsolidcube size size
29 7.4 GLUT 29 void glutwiretorus(gldouble innerradius, GLdouble outerradius, GLint nsides, GLint rings); void glutsolidtorus(gldouble innerradius, GLdouble outerradius, GLint nsides, GLint rings); glutsolidtorus glutwiretorus Z innerradius outerradius nsides rings void glutwireicosahedron(void); void glutsolidicosahedron(void); void glutwireoctahedron(void); void glutsolidoctahedron(void); void glutwiretetrahedron(void); void glutsolidtetrahedron(void); void glutwiredodecahedron(void); void glutsoliddodecahedron(void); glutsolidisosahedron glutwireisosahedron glutsolidoctahedron glutwireoctahedron glutsolidtetrahedron glutwiretetrahedron 3 4 glutsoliddodecahedron glutwiredodecahedron 3 12 void glutwirecone(gldouble radius, GLdouble height, GLint slices, GLint stacks); void glutsolidcone(gldouble radius, GLdouble height, GLint slices, GLint stacks); glutsolidcone glutwirecone Z Z=0 Z=height Z slices
30 30 7 Z stacks base height slices Z stacks Z void glutwireteapot(gldouble size); void glutsolidteapot(gldouble size); glutsolidteapot glutwireteapot OpenGL size 2 1. sample-cube.c make 2. cube glutlookat() gltranslatef(0.0, 0.0, -5.0) 5. glfrustum() gluperspective( , 1.5, 20.0) fovy aspect 6. cube
31 (glloadmatrix(), glmultmatrix(), glloadidentity() ) glpushmatrix() glpopmatrix() ( ) glpushmatrix() glpopmatrix() 14 void glpushmatrix(void); 1 2 glmatrixmode() void glpopmatrix(void); 2
32 32 8 glmatrixmode() glpopmatrix() 32 4x4 glloadidentity() glmatrixmode(gl_projection); glpushmatrix(); /* save the current projection */ glloadidentity(); glortho(...); /* set up for displaying help */ display_the_help(); glpopmatrix(); ( ) 4 5
33 draw_wheel_and_bolts() long i; draw_wheel(); for(i=0;i<5;i++) glpushmatrix(); glrotatef(72.0*i,0.0,0.0,1.0); gltranslatef(3.0,0.0,0.0); draw_bolt(); glpopmatrix();
34 34 8 draw_body_and_wheel_and_bolts() draw_car_body(); glpushmatrix(); gltranslatef(40,0,30); /*move to first wheel position*/ draw_wheel_and_bolts(); glpopmatrix(); glpushmatrix(); gltranslatef(40,0,-30); /*move to 2nd wheel position*/ draw_wheel_and_bolts(); glpopmatrix();... /*draw last two wheel similarly*/ glrotate*() gltranslate*() glutwiresphere() 2 glpushmatrix(); glutwiresphere(1.0, 20, 16); /* draw sun */ glrotatef ((GLfloat) year, 0.0, 1.0, 0.0); gltranslatef (2.0, 0.0, 0.0); glrotatef ((GLfloat) day, 0.0, 1.0, 0.0); glutwiresphere(0.2, 10, 8); /* draw smaller planet */ glpopmatrix(); glrotate*() gltranslate*()
35 glrotate*() ( ) 2 glrotate*() ( ) 16 #include <GL/glut.h> #include <stdlib.h> static int year = 0, day = 0; void init(void) glclearcolor (0.0, 0.0, 0.0, 0.0); glshademodel (GL_FLAT); void display(void) glclear (GL_COLOR_BUFFER_BIT); glcolor3f (1.0, 1.0, 1.0); glpushmatrix(); glutwiresphere(1.0, 20, 16); /* draw sun */ glrotatef ((GLfloat) year, 0.0, 1.0, 0.0); gltranslatef (2.0, 0.0, 0.0); glrotatef ((GLfloat) day, 0.0, 1.0, 0.0); glutwiresphere(0.2, 10, 8); /* draw smaller planet */ glpopmatrix(); glutswapbuffers();
36 36 8 void reshape (int w, int h) glviewport (0, 0, (GLsizei) w, (GLsizei) h); glmatrixmode (GL_PROJECTION); glloadidentity (); gluperspective(60.0, (GLfloat) w/(glfloat) h, 1.0, 20.0); glmatrixmode(gl_modelview); glloadidentity(); glulookat (0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0); /* ARGSUSED1 */ void keyboard (unsigned char key, int x, int y) switch (key) case d : day = (day + 10) % 360; glutpostredisplay(); break; case D : day = (day - 10) % 360; glutpostredisplay(); break; case y : year = (year + 5) % 360; glutpostredisplay(); break; case Y : year = (year - 5) % 360; glutpostredisplay(); break; case 27: exit(0); break; default: break;
37 int main(int argc, char** argv) glutinit(&argc, argv); glutinitdisplaymode (GLUT_DOUBLE GLUT_RGB); glutinitwindowsize (500, 500); glutinitwindowposition (100, 100); glutcreatewindow (argv[0]); init (); glutdisplayfunc(display); glutreshapefunc(reshape); glutkeyboardfunc(keyboard); glutmainloop(); return 0; gltranslate*() glrotate*() glpushmatrix() glpopmatrix() glscale*()
38 38 8 gltranslatef (-1.0, 0.0, 0.0); glrotatef ((GLfloat) shoulder, 0.0, 0.0, 1.0); gltranslatef (1.0, 0.0, 0.0); glpushmatrix(); glscalef (2.0, 0.4, 1.0); glutwirecube (1.0); glpopmatrix(); 2 x x 2 gltranslatef (1.0, 0.0, 0.0); glrotatef ((GLfloat) elbow, 0.0, 0.0, 1.0); gltranslatef (1.0, 0.0, 0.0); glpushmatrix(); glscalef (2.0, 0.4, 1.0); glutwirecube (1.0); glpopmatrix(); ( ) #include <GL/glut.h> #include <stdlib.h> static int shoulder = 0, elbow = 0; void init(void) glclearcolor (0.0, 0.0, 0.0, 0.0); glshademodel (GL_FLAT);
39 void display(void) glclear (GL_COLOR_BUFFER_BIT); glpushmatrix(); gltranslatef (-1.0, 0.0, 0.0); glrotatef ((GLfloat) shoulder, 0.0, 0.0, 1.0); gltranslatef (1.0, 0.0, 0.0); glpushmatrix(); glscalef (2.0, 0.4, 1.0); glutwirecube (1.0); glpopmatrix(); gltranslatef (1.0, 0.0, 0.0); glrotatef ((GLfloat) elbow, 0.0, 0.0, 1.0); gltranslatef (1.0, 0.0, 0.0); glpushmatrix(); glscalef (2.0, 0.4, 1.0); glutwirecube (1.0); glpopmatrix(); glpopmatrix(); glutswapbuffers(); void reshape (int w, int h) glviewport (0, 0, (GLsizei) w, (GLsizei) h); glmatrixmode (GL_PROJECTION); glloadidentity (); gluperspective(65.0, (GLfloat) w/(glfloat) h, 1.0, 20.0); glmatrixmode(gl_modelview); glloadidentity(); gltranslatef (0.0, 0.0, -5.0);
40 40 8 /* ARGSUSED1 */ void keyboard (unsigned char key, int x, int y) switch (key) case s : shoulder = (shoulder + 5) % 360; glutpostredisplay(); break; case S : shoulder = (shoulder - 5) % 360; glutpostredisplay(); break; case e : elbow = (elbow + 5) % 360; glutpostredisplay(); break; case E : elbow = (elbow - 5) % 360; glutpostredisplay(); break; case 27: exit(0); break; default: break; int main(int argc, char** argv) glutinit(&argc, argv); glutinitdisplaymode (GLUT_DOUBLE GLUT_RGB); glutinitwindowsize (500, 500); glutinitwindowposition (100, 100); glutcreatewindow (argv[0]); init (); glutdisplayfunc(display); glutreshapefunc(reshape); glutkeyboardfunc(keyboard); glutmainloop(); return 0;
41 GLUT GLUT void glutdisplayfunc(void (*func)(void)); glutpostredisplay() void glutreshapefunc(void (*func)(void)); func 2 func glviewport() glutreshapefunc() NULL glviewport(0, 0, width, height) void glutkeyboadfunc(void (*func)(unsigned int key, int x, int y)); ASCII func key ASCII x, y ( ) void glutmousefunc(void (*func)(int button, int state, int x, int y)); func 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));
42 42 9 func x y ( ) void glutpostredisplay(void); glutdisplayfunc() glutidlefunc() void glutidlefunc(void (*func)(void)); func NULL func GLUT glutmainloop() void glutmainloop(void); GLUT 9.2 OpenGL ( ) 1 OpenGL 2 (double-buffer) 2 GLUT void glutswapbuffers(void); (viewpoint)
43 #include <GL/glut.h> static GLfloat spin = 0.0; void display(void) glclear(gl_color_buffer_bit); glpushmatrix(); glrotatef(spin, 0.0, 0.0, 1.0); glcolor3f(1.0, 1.0, 1.0); glrectf(-25.0, -25.0, 25.0, 25.0); glpopmatrix(); glutswapbuffers(); void spindisplay(void) spin = spin + 2.0; if (spin > 360.0) spin = spin ; glutpostredisplay(); void init(void) glclearcolor (0.0, 0.0, 0.0, 0.0); glshademodel (GL_FLAT); void reshape(int w, int h) glviewport (0, 0, (GLsizei) w, (GLsizei) h); glmatrixmode(gl_projection); glloadidentity(); glortho(-50.0, 50.0, -50.0, 50.0, -1.0, 1.0); glmatrixmode(gl_modelview); glloadidentity();
44 44 9 /* ARGSUSED2 */ void mouse(int button, int state, int x, int y) switch (button) case GLUT_LEFT_BUTTON: if (state == GLUT_DOWN) glutidlefunc(spindisplay); break; case GLUT_MIDDLE_BUTTON: if (state == GLUT_DOWN) glutidlefunc(null); break; default: break; /* * Request double buffer display mode. * Register mouse input callback functions */ int main(int argc, char** argv) glutinit(&argc, argv); glutinitdisplaymode (GLUT_DOUBLE GLUT_RGB); glutinitwindowsize (250, 250); glutinitwindowposition (100, 100); glutcreatewindow (argv[0]); init (); glutdisplayfunc(display); glutreshapefunc(reshape); glutmousefunc(mouse); glutmainloop(); return 0; glutswapbuffers() GLUT
45 sample-teapot.c 2. planet.tar.gz planet ex.c glpushmatrix() glpopmatrix() 3. planet ex.c 4. planet ex.c 5. sample-robot.c ( glpushmatrix() glpopmatrix() ( ) 18
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 information2 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 information2 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第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第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 informationlibaux.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 informationOpenGL 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 informationuntitled
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 informationOpenGL & GLUTの基本関数の説明
コンピュータグラフィックス 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(
More information3D グラフィックス処理の一般過程 1. 3D グラフィックス処理の一般過程
3. 3D ビューイング 1. 3Dグラフィックス処理の一般過程 2. 射影と射影変換 3. ビューボリュームとクリッピング 4. 陰面処理とデプスバッファ 5. ビューポート変換 6. 3Dグラフィックスを描く 7. モデルビュー変換 3D グラフィックス処理の一般過程 1. 3D グラフィックス処理の一般過程 3D グラフィックス処理の一般過程 1. モデリング変換 座標系の異なる複数のオブジェクトを仮想世界に配置し,
More information謗域・ュ逕ィ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#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 information1 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 information2 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/*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$ 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 information2 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( ) 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演算増幅器
コンピュータグラフィックス 2 前回は GLUT を使った簡単な 2 次元グラフィックスについて習った 今週は以下の項目について 補足していく イベント駆動型プログラムの動作について コンピュータグラフィックスの座標系 イベント駆動型プログラム従来のプログラムとの違いこれまでに学習してきたプログラムは上から下に順次実行され 条件分岐や繰り返し処理によって プログラムの流れ (flow: フロー )
More information/* 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 informationj 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謗域・ュ逕ィppt
情報工学 217 年度後期第 4 回 [1 月 25 日 ] 静岡大学 工学研究科機械工学専攻ロボット 計測情報講座創造科学技術大学院情報科学専攻 三浦憲二郎 ローカル座標系による移動 講義アウトライン [1 月 25 日 ] ビジュアル情報処理 1.3.4 投影変換 1.3.5 いろいろな座標系と変換 OpenGL 投影変換 曲線の描画 トロコイド ( 外トロコイドと内トロコイド ) 頂点変換の手順
More information2 : 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謗域・ュ逕ィppt
情報工学 212 年度後期第 5 回 [1 月 31 日 ] 静岡大学 創造科学技術大学院情報科学専攻工学部機械工学科計測情報講座 三浦憲二郎 講義日程 第 8 回 11 月 21 日 ( 水 ) CG パート試験 講義アウトライン [1 月 31 日 ] ビジュアル情報処理 1.3.4 投影変換 1.3.5 いろいろな座標系と変換 OpenGL 投影変換 曲線の描画 トロコイド ( 外トロコイドと内トロコイド
More information1 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準備 計算結果を可視化するために OpenGL を 利用する. 2
2. 2 次元粒子法シミュレーション (+ 少しだけ OpenGL) 茨城大学工学部 教授乾正知 準備 計算結果を可視化するために OpenGL を 利用する. 2 OpenGL 3 次元コンピュータグラフィックス用の標準的なライブラリ. 特に CAD やアート, アニメーション分野 ( ゲーム以外の分野 ) で広く利用されている. OpenGL は仕様がオープンに決められており, 企業から独立した団体が仕様を管理している.
More informationmanual.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$ 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 informationdouble 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 information2 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演算増幅器
スペースインベーダーもどき 1000 行プログラムの参考として スペースインベーダーもどきのプログラムを配布する いくつか習って いないものもあるので 補足の説明を加えていく 文字列の描画 文字の描画は glutbitmapcharacter() を用いる これは以下のようにして利用する int i; char *str = "Display String"; glcolor3f(0.0, 0.0,
More information第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第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 informationDrawArrays 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 informationTA 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 informationKageyama (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 informationWebGL 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 information2 T ax 2 + 2bxy + cy 2 + dx + ey + f = 0 a + b + c > 0 a, b, c A xy ( ) ( ) ( ) ( ) u = u 0 + a cos θ, v = v 0 + b sin θ 0 θ 2π u = u 0 ± a
2 T140073 1 2 ax 2 + 2bxy + cy 2 + dx + ey + f = 0 a + b + c > 0 a, b, c A xy u = u 0 + a cos θ, v = v 0 + b sin θ 0 θ 2π u = u 0 ± a cos θ, v = v 0 + b tan θ π 2 < θ < π 2 u = u 0 + 2pt, v = v 0 + pt
More informationOpenGL 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 informationGraphics 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沼津工業高等専門学校
VisualStudio2010 を用いた OpenGL(Glut) コンソール アプリケーションの作成方法 初版 : 2007.01.06 藤尾 改訂 : 2010.08.24 秋山 - 1 - - 目次 - Ⅰ. プログラミングの準備 3 Ⅰ.1 はじめに 3 Ⅰ.2 OpenGL の環境設定 3 Ⅱ. プログラミングの第 1 歩 ( 簡単なプログラムの作成 ) 3 Ⅱ.1 プロジェクトの作成と保存
More informationJAPLAシンポジウム資料 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 information10 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 informationC 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 information1 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 information1) OOP 2) ( ) 3.2) printf Number3-2.cpp #include <stdio.h> class Number Number(); // ~Number(); // void setnumber(float n); float getnumber();
: : :0757230G :2008/07/18 2008/08/17 1) OOP 2) ( ) 3.2) printf Number3-2.cpp #include class Number Number(); // ~Number(); // void setnumber(float n); float getnumber(); private: float num; ;
More information1 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 informationJAPLA研究会資料 2013/5/25
JAPLA 研究会資料 2013/5/25 J-OpenGL による 4 進フラクタル立体木のグラフィックス 西川利男 今年の大学センター試験の出題をきっかけとして 3 進法およびそれを活用した 3 進フラクタル木の J プログラムについて先に報告した [1][2] 図形表示の値を 3 進法で表すことで フラクタル木のグラフィックスが ごく自然に行われた それでは 4 進法ではどうだろうか? 同じ発想を展開すると
More informationMicrosoft Word - mediaJikkenCG_no2_2007.doc
2007 年度メディア情報学実験 1 CG テキスト第 2~4 週 :OpenGL ライブラリを使った 3 次元 CG プログラミング立命館大学情報理工学部メディア情報学科 1. 実験の目的と手順本実験は,(1)OpenGLライブラリを用いたCGプログラミングの手法を学ぶ,(2) プログラミングを通して, CGの基礎技術を体験的に学ぶ,(3) インタラクティブな3 次元 CGアニメーションを作成する方法について学ぶ,
More informationJAPLA研究会資料 2012/8/2
JAPLA 研究会資料 2012/8/2 ローレンツなどカオスの 3D グラフィックス J-OpenGL により カオスの実行を段階的に観察する 西川利男 ローレンツ レスターなどカオスの図形は 志村氏により J の簡便かつ強力なグラフィックス機能を示す例としてたびたび紹介されている これらのカオス現象の物理は それ自身私にとってもおおいに興味をそそられるテーマである J の OpenGL グラフィックスを用いて
More informationMicrosoft PowerPoint - 04.pptx
初期化 コールバック関数の登録 glutmainloop() 描画関数 マウス処理関数 キーボード処理関数などの関数ポインタを登録する イベント待ちの無限ループ 再描画? no マウス入力? no キーボード入力? no yes yes yes 描画関数の呼び出し マウス処理関数の呼び出し キーボード処理関数の呼び出し void keyboard(unsigned char key, int x,
More information複雑系科学演習1 コンピュータグラフィックス
情報科教育法 担当畔上秀幸情報科学研究科複雑系科学専攻 高等学校学習指導要領 第 章 : 普通教育に関する各教科 - 第 0 節 : 情報 hp://www.mex.go.jp/b_menu/shuppan/sono a/99030/03603/0.hm 情報 B (3) 問題のモデル化とコンピュータを活用した解決 ア モデル化とシミュレーション 身のまわりの現象や社会現象などを通して, モデル化とシミュレーションの考え方や方法を理解させ,
More informationMicrosoft Word - mediaJikkenCG_no2_2012.doc
2012 年度メディア情報学実験 1 CG テキスト第 2~5 週 :OpenGL ライブラリを使った 3 次元 CG プログラミング立命館大学情報理工学部メディア情報学科 1. 実験の目的と手順本実験は,(1)OpenGLライブラリを用いたCGプログラミングの手法を学ぶ,(2) プログラミングを通して, CGの基礎技術を体験的に学ぶ,(3) インタラクティブな3 次元 CGアニメーションを作成する方法について学ぶ,
More information£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裵²ó ¨¡ À©¸æ¹½Â¤¡§¾ò·ïʬ´ô ¨¡
(2018) 2018 5 17 0 0 if switch if if ( ) if ( 0) if ( ) if ( 0) if ( ) (0) if ( 0) if ( ) (0) ( ) ; if else if ( ) 1 else 2 if else ( 0) 1 if ( ) 1 else 2 if else ( 0) 1 if ( ) 1 else 2 (0) 2 if else
More informationKageyama (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コンピュータグラフィックスS 演習資料
2015/5/26 コンピュータグラフィックスS 演 習 資 料 第 2 回 ポリゴンモデルの 描 画 九 州 工 業 大 学 情 報 工 学 部 システム 創 成 情 報 工 学 科 講 義 担 当 : 尾 下 真 樹 1. 準 備 : 前 回 の 演 習 本 日 の 演 習 は 前 回 の 演 習 で 作 成 したプログラムを 引 き 続 き 修 正 していく もし 前 回 の 演 習 を 行
More information免許法認定公開講座:コンピュータグラフィックス
演習内容 免許法認定公開講座 : コンピュータグラフィックス 第 6 回 3 次元グラフィックス演習 基本的な3 次元グラフィックスのプログラムを作成 OpenGL を使ったポリゴン描画 視点操作 アニメーション 九州工業大学情報工学部システム創成情報工学科尾下真樹 参考書 最低限の関数は資料で説明 OpenGLの定番の本 ( 高い ) OpenGLプログラミングガイド ( 赤本 ), 12,000
More informationJAPLA研究会資料 2010/4/24
JAPLA 研究会資料 2010/4/24 J の OpenGL グラフィックス - その 8 Texture によるパターンの貼り付け - サイコロを作って動かす - 西川利男 0. はじめにこれまで OpenGL グラフィックスもいろいろやってきた [1]~[7] OpenGL の Texture 機能を利用したパターンの貼り付け処理はさまざまな用途に使われる 今回はこれを利用してサイコロを作ってみた
More informationTekutama 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 information19_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 informationJAPLA研究会資料 /6/15
JAPLA 研究会資料 20013/6/15 J-OpenGL による 3D グラフィックス - その 10 * メビウスの帯へ向けて -J-OpenGL をどう理解するか - 西川 利男 J で OpenGL を利用することで高度の三次元グラフィックスの処理が可能となった 前回の例会で志村正人氏よりメビウスの帯やクラインの壷など アートとして眺めるだけでも楽しいグラフィックスがいろいろ紹介された
More informationコンピューターグラフィックスS
前回の演習の復習 今日の内容 コンピューターグラフィックス S 第 7 回演習 (2): ポリゴンモデルの描画 システム創成情報工学科尾下真樹 前回の復習 ポリゴンの描画方法 ( 復習 ) 基本オブジェクトの描画 ポリゴンモデルの描画 演習課題 サンプルプログラム 前回の演習の復習 opengl_sample.c 地面と 枚の青い三角形が表示される マウスの右ボタンドラッグで 視点を上下に回転 前回の演習課題.
More informationMicrosoft Word - C.....u.K...doc
C uwêííôöðöõ Ð C ÔÖÐÖÕ ÐÊÉÌÊ C ÔÖÐÖÕÊ C ÔÖÐÖÕÊ Ç Ê Æ ~ if eíè ~ for ÒÑÒ ÌÆÊÉÉÊ ~ switch ÉeÍÈ ~ while ÒÑÒ ÊÍÍÔÖÐÖÕÊ ~ 1 C ÔÖÐÖÕ ÐÊÉÌÊ uê~ ÏÒÏÑ Ð ÓÏÖ CUI Ô ÑÊ ÏÒÏÑ ÔÖÐÖÕÎ d ÈÍÉÇÊ ÆÒ Ö ÒÐÑÒ ÊÔÎÏÖÎ d ÉÇÍÊ
More informationコンピュータグラフィックスS 演習資料
コンピュータグラフィックス S 演習資料 第 4 回シェーディング マッピング 九州工業大学情報工学部システム創成情報工学科講義担当 : 尾下真樹 1. 演習準備 今回の演習も 前回までの演習で作成したプログラムに続けて変更を行う まずは シェーディングの演習のため 描画処理で 回転する一つの四角すいを描画するように変更する 画面をクリア ( ピクセルデータと Z バッファの両方をクリア ) glclear(
More informationMicrosoft PowerPoint - info_eng3_05ppt.pptx
インタラクティブシステム構築法 第 5 回 OpenGL と GLUT の使い方 (3) 埼玉大学情報システム工学科小林貴訓 シェーディング 光源の設定を有効にする glenable(gl_lighting); // 光源の設定を有効にする glenable(gl_light0); //0 番目の光源を有効にする (8 個まで設定可能 ) 光源の位置 GLfloat light0pos[] = {
More informationNB
JAPLA 研究会資料 2010/2/27 J の OpenGL グラフィックス - その 7 - フラー ドームと照光表示 - 西川利男 0. はじめに OpenGL 正多面体グラフィックスとして 今回はフラー ドームに挑戦してみた バックミンスター フラー (Richard Buckminster Fuller, 1895-1983 は多才な建築家 科学者 思想家として知られ その名前を冠した
More informationdouble float
2015 3 13 1 2 2 3 2.1.......................... 3 2.2............................. 3 3 4 3.1............................... 4 3.2 double float......................... 5 3.3 main.......................
More informationJAPLA研究会資料 2017/5/20
JAPLA 研究会資料 2017/5/20 J-OpenGL による 3D- グラフィックス - その 13-3 次元空間での錯視 - 西川利男 はじめに私がボランティアとして出ている日本科学未来館で 現在 (5/20 まで 錯視 というテーマをやっている その中で 杉原厚吉先生による3 次元空間での錯視のデモが好評で 来館者を楽しませてくれている それに触発されて 3 次元空間の幾何学の問題を J-OpenGL
More information(7) u 1 θ A {u 1, u, u 3 } U = (u 1, u, u 3 ) A = UT (θ) + tu t UAU = T (θ) + () θ x z cos θ 0 sin θ cos θ sin θ 0 X(θ) = 0 cos θ sin θ, Y (θ) =
Mathematics for Computer Graphics 1 1.1 a = (a x, a, a z ), b = (b x, b, b z ) c = (c x, c, c z ) a, b a, b a, b, c x,, z ( ) c a, b (vector product) (outer product) a b c = ( a b a z b z, a z b z a x
More information£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裶²ó ¨¡ À©¸æ¹½Â¤¡§·«¤êÊÖ¤· ¨¡
(2018) 2018 5 24 ( ) while ( ) do while ( ); for ( ; ; ) while int i = 0; while (i < 100) { printf("i = %3d\n", i); i++; while int i = 0; i while (i < 100) { printf("i = %3d\n", i); i++; while int i =
More information5. p.1/37
5. taiji@aihara.co.jp p.1/37 dx dt dy dt dz dt = σx + σy = xz + rx y = xy bz σ = 10, b = 8/3, r = 28, x 0 = 10, y 0 = 20, z 0 = 30 t < 10000δt (δt = 0.01) p.2/37 , 1991. Numerical Recipes in C Netlib LAPACK,
More informationGLSC3D (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 informationr08.dvi
19 8 ( ) 019.4.0 1 1.1 (linked list) ( ) next ( 1) (head) (tail) ( ) top head tail head data next 1: NULL nil ( ) NULL ( NULL ) ( 1 ) (double linked list ) ( ) 1 next 1 prev 1 head cur tail head cur prev
More informationCM-3G 周辺モジュール拡張技術文書 MS5607センサ(温度、気圧)
CM-3G 周辺モジュール拡張技術文書 MS5607 センサ ( 温度 気圧 ) ( 第 1 版 ) Copyright (C)2016 株式会社コンピューテックス 目次 1. はじめに... 1 2. MS5607 について... 1 3. 接続図... 1 4. アプリケーション ソース... 2 5. アプリケーションのコンパイル方法... 7 6. アプリケーションの実行... 8 1. はじめに
More informationohp08.dvi
19 8 ( ) 2019.4.20 1 (linked list) ( ) next ( 1) (head) (tail) ( ) top head tail head data next 1: 2 (2) NULL nil ( ) NULL ( NULL ) ( 1 ) (double linked list ) ( 2) 3 (3) head cur tail head cur prev data
More informationC
C 1 2 1.1........................... 2 1.2........................ 2 1.3 make................................................ 3 1.4....................................... 5 1.4.1 strip................................................
More information2 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 informationtest_cylpyd
JAPLA 研究会資料 2013/9/14 実験と 3D グラフィックスによる幾何学 ピラミッド ( 三角錐 の体積はプリズム ( 三角柱 の 1/3 になる きみにはすぐ分かるだろうか 西川 利男 はじめに 錐体 ( 三角錐 四角錐 円錐 の体積は 柱体 ( 三角柱 四角柱 円柱 の体積の 1/3 である だれでも知っているこの有名な公式は中学校の教科書にのっているだろうが その理由をわかるように説明してはいない
More informationMicrosoft Word - opengl講義資料ha.doc
[OpenGL:1] OpenGL とは 1.OpenGL とは何か? 米国 Silicon Graphics 社 (SGI) が中心となって開発した 3 次元グラフィックスライブラリである.SGI はグラフィックスに特化したワークステーション (GWS) の開発を積極的に行い, 自社の GWS 上で稼動するグラフィックスライブラリ IRIS GL を開発したが, その後, この仕様を公開したライブラリとして
More informationMicrosoft Word - opengl講義資料2013.doc
[OpenGL:1] OpenGL とは 1.OpenGL とは何か? 米国 Silicon Graphics 社 (SGI) が中心となって開発した 3 次元グラフィックスライブラリである.SGI はグラフィックスに特化したワークステーション (GWS) の開発を積極的に行い, 自社の GWS 上で稼動するグラフィックスライブラリ IRIS GL を開発したが, その後, この仕様を公開したライブラリとして
More information新版明解C言語 実践編
2 List - "max.h" a, b max List - max "max.h" #define max(a, b) ((a) > (b)? (a) : (b)) max List -2 List -2 max #include "max.h" int x, y; printf("x"); printf("y"); scanf("%d", &x); scanf("%d", &y); printf("max(x,
More information3. OpenGL を利用するための準備作業 1) Tao Framework をダウンロードしてインストールする. Download から taoframework setup.exe をダウン
[OpenGL:1] OpenGL とは 1.OpenGL とは何か? 米国 Silicon Graphics 社 (SGI) が中心となって開発した 3 次元グラフィックスライブラリである.SGI はグラフィックスに特化したワークステーション (GWS) の開発を積極的に行い, 自社の GWS 上で稼動するグラフィックスライブラリ IRIS GL を開発したが, その後, この仕様を公開したライブラリとして
More informationx h = (b a)/n [x i, x i+1 ] = [a+i h, a+ (i + 1) h] A(x i ) A(x i ) = h 2 {f(x i) + f(x i+1 ) = h {f(a + i h) + f(a + (i + 1) h), (2) 2 a b n A(x i )
1 f(x) a b f(x)dx = n A(x i ) (1) ix [a, b] n i A(x i ) x i 1 f(x) [a, b] n h = (b a)/n y h = (b-a)/n y = f (x) h h a a+h a+2h a+(n-1)h b x 1: 1 x h = (b a)/n [x i, x i+1 ] = [a+i h, a+ (i + 1) h] A(x
More information2009 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コンピュータグラフィックス特論Ⅱ
コンピュータグラフィックス特論 Ⅱ 第 2 回 OpenGL プログラミングの基礎 九州工業大学尾下真樹 今日の内容 OpenGL プログラミングの基礎 C 言語 +OpenGL+GLUT によるプログラミング 座標変換の基礎 アフィン変換行列を使った視野変換の設定 いずれも 学部の講義 ( レベルの内容 ) の復習 今日の内容 OpenGL&GLUTの概要 サンプルプログラムの概要 座標変換 変換行列の設定
More informationCondition DAQ condition condition 2 3 XML key value
Condition DAQ condition 2009 6 10 2009 7 2 2009 7 3 2010 8 3 1 2 2 condition 2 3 XML key value 3 4 4 4.1............................. 5 4.2...................... 5 5 6 6 Makefile 7 7 9 7.1 Condition.h.............................
More informationslide5.pptx
ソフトウェア工学入門 第 5 回コマンド作成 1 head コマンド作成 1 早速ですが 次のプログラムを head.c という名前で作成してください #include #include static void do_head(file *f, long nlines); int main(int argc, char *argv[]) { if (argc!=
More informationProVisionaire Control V3.0セットアップガイド
ProVisionaire Control V3 1 Manual Development Group 2018 Yamaha Corporation JA 2 3 4 5 NOTE 6 7 8 9 q w e r t r t y u y q w u e 10 3. NOTE 1. 2. 11 4. NOTE 5. Tips 12 2. 1. 13 3. 4. Tips 14 5. 1. 2. 3.
More information1 1.1 (VR) [1] * * /3/5 1
2013 Immersive Interaction VR E-mail: vr.neuro.lab@gmail.com 2014 3 5 1 1.1 (VR) 1.2 1.3 [1] *1 1.3.1 *1 http://www.keio.ac.jp/ja/press_release/2007/kr7a43000000a9k2-att/071011.pdf 2014/3/5 1 1.3.2 *2
More informationjoho07-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コンピュータグラフィクス論
コンピュータグラフィクス論 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 informationPresentation
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 informationJAPLA研究会資料 2010/1/23
JAPLA 研究会資料 2010/1/23 J の OpenGL グラフィックス - その 6 - サッカーボールとその仲間たち - 西川利男 J の OpenGL プログラミングをここ数回にわたって紹介してきた 昨年暮れの JAPLA シンポジウムでは正 12 面体 正 20 面体の 3D グラフィックスを発表したが そのとき サッカーボールはどうだ? との質問 ご要望がでた サッカーボールの黒白パターンはあらためて見てみると意外と複雑である
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
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 informationFFTSS Library Version 3.0 User's Guide
: 19 10 31 FFTSS 3.0 Copyright (C) 2002-2007 The Scalable Software Infrastructure Project, (CREST),,. http://www.ssisc.org/ Contents 1 4 2 (DFT) 4 3 4 3.1 UNIX............................................
More informationAutoTuned-RB
ABCLib Working Notes No.10 AutoTuned-RB Version 1.00 AutoTuned-RB AutoTuned-RB RB_DGEMM RB_DGEMM ( TransA, TransB, M, N, K, a, A, lda, B, ldb, b, C, ldc ) L3BLAS DGEMM (C a Trans(A) Trans(B) b C) (1) TransA:
More informationex12.dvi
1 0. C, char., char, 0,. C, ("),., char str[]="abc" ; str abc.,, str 4. str 3. char str[10]="abc" ;, str 10, str 3., char s[]="abc", t[10] ;, t = s. ASCII, 0x00 0x7F, char., "abc" 3, 1. 1 8 256, 2., 2
More informationII 3 yacc (2) 2005 : Yacc 0 ~nakai/ipp2 1 C main main 1 NULL NULL for 2 (a) Yacc 2 (b) 2 3 y
II 3 yacc (2) 2005 : Yacc 0 ~nakai/ipp2 1 C 1 6 9 1 main main 1 NULL NULL 1 15 23 25 48 26 30 32 36 38 43 45 47 50 52 for 2 (a) 2 2 1 Yacc 2 (b) 2 3 yytext tmp2 ("") tmp2->next->word tmp2 yytext tmp2->next->word
More informationPowerPoint プレゼンテーション
複雑系科学演習 1 コンピュータグラフィックス 担当畔上秀幸情報科学研究科複雑系科学専攻 今日の話題 ベジェ曲線 曲面の描画 lesson9_1.c( ベジェ曲線 ) lesson9_2.c( 色付きベジェ曲線 ) lesson9_3.c( ベジェ曲面 ) NURBS 曲線 曲面の描画 lesson9_4.c(nurbs 曲線 ) lesson9_5.c(nurbs 曲線の分割 ) lesson9_6.c(nurbs
More informationr07.dvi
19 7 ( ) 2019.4.20 1 1.1 (data structure ( (dynamic data structure 1 malloc C free C (garbage collection GC C GC(conservative GC 2 1.2 data next p 3 5 7 9 p 3 5 7 9 p 3 5 7 9 1 1: (single linked list 1
More information