/*p7-1-1*/

Size: px
Start display at page:

Download "/*p7-1-1*/"

Transcription

1 /* e8.c Copyright (c) 2003 by T. HAYASHI and K. KATO */ /* All rights reserved */ #include <stdlib.h> #include <GL/glut.h> #include <GL/gl.h> #include <GL/glu.h> #include <math.h> #include "myshape.h" #define KEY_ESC 27 #define imageheight 8 #define imagewidth 8 void polarview(void); void resetview(void); unsigned char image[imageheight][imagewidth][4]; unsigned char wireflag=gl_false; unsigned char revolveflag=gl_true; unsigned char moveflag=gl_false; unsigned char shadeflag=gl_true; int xbegin,ybegin; int mbutton; float distance, twist, elevation, azimuth; float theta = 15.0; float spin=0.0; double fly=0.0; float diffuse[] = 1.0, 0.4, 0.0, 1.0; float specular[] = 1.0, 0.7, 0.0, 1.0; float ambient[] = 0.1, 0.1, 0.1, 1.0; float shininess=30.0; unsigned char bitmap1[imageheight][imagewidth]= 0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff, 0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff, 0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff, 0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff, 0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff, 0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff, 0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff, 0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff ; unsigned char bitmap2[imageheight][imagewidth]= 0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff, 0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff, 0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff, 0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff, 0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff, 0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff, 0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff ;

2 void display( void ) int i; float diffuse[] = 1.0, 1.0, 1.0, 1.0; float specular[] = 1.0, 0.7, 0.0, 1.0; float ambient[] = 0.1, 0.1, 0.1, 1.0; float light[] = 3.0, 3.0, 0.0, 1.0; float light1[] = 4.0, 4.0, 4.0, 0.0; float blue[] = 0.0, 0.0, 1.0, 1.0 ; float yellow[] = 0.9, 0.7, 0.0, 1.0 ; float orange[] = 1.0, 0.3, 0.0, 1.0 ; float green[] = 0.0, 0.3, 0.0, 1.0 ; float white[] = 1.0, 1.0, 1.0, 1,0; float texcolor[] = 0.0, 0.0, 0.0; glclear( GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT ); polarview(); glrotatef( spin, 0.0, 1.0, 1.0); gllightfv( GL_LIGHT0, GL_POSITION, light); gllightfv( GL_LIGHT1, GL_POSITION, light1); glenable( GL_DEPTH_TEST ); glmaterialfv( GL_FRONT, GL_DIFFUSE, diffuse ); glmaterialfv( GL_FRONT, GL_SPECULAR, specular ); glmaterialfv( GL_FRONT, GL_AMBIENT, ambient ); glmaterialf( GL_FRONT, GL_SHININESS, shininess ); if(shadeflag==gl_true) glenable( GL_LIGHTING ); glenable( GL_NORMALIZE ); glnormal3f(0.0, 1.0, 0.0); glmaterialfv( GL_BACK, GL_DIFFUSE, white); glrotatef( theta*0.4, 0.0, 1.0, 0.0 ); gltranslatef( 0.0, 1.0, 0.0 ); glcolor3f( 1.0, 1.0, 0.5 ); mywirecylinder( 1.0, 2.0, 12 ); mysolidcylinder( 1.0, 2.0, 20 ); glmaterialfv( GL_FRONT, GL_DIFFUSE, orange); gltranslatef( 0.0, 1.0, 0.0); glrotatef( -90.0, 1.0, 0.0, 0.0 ); glcolor3f( 1.0, 0.4, 0.0 ); glscalef( 1.0, 1.0, 1.0 );

3 glutwirecone( 1.0, 2.0, 12, 3 ); glutsolidcone( 1.0, 2.0, 20, 3); glpushattrib(gl_texture_bit); glmaterialfv( GL_FRONT, GL_DIFFUSE, green); gltranslatef( 0.0, -1.0,- 0.0 ); glrotatef( theta*1.0, 0.0, 1.0, 0.0 ); glcolor3f( 0.8, 0.9, 0.2 ); if(moveflag==gl_true) gltranslatef( 0.0, fly, 0.0); fly=0.0; mywirecylinder( 1.0, 2.0, 12 ); mysolidcylinder( 1.0, 2.0, 20 ); glpopattrib(); glenable(gl_texture_2d); glenable(gl_normalize); for(i=0; i<4; i++) glmaterialfv( GL_FRONT, GL_DIFFUSE, orange); glrotatef(90.0*(float)i, 0.0,1.0, 0.0); glcolor3f( 0.1, 0.5, 0.2 ); gltranslatef( 1.5, 0.0, 0.0 ); glscalef( 1.0, 2.0, 0.3 ); glutwirecube(1.0); glutsolidcube(1.0); glpushattrib( GL_LIGHTING_BIT ); gldisable(gl_texture_2d); gllightmodeli( GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);

4 glmaterialfv( GL_FRONT, GL_DIFFUSE, blue); glmaterialfv( GL_BACK, GL_DIFFUSE, yellow); glrotatef( theta*0.01, 0.0, 1.0, 0.0 ); gltranslatef( 0.0, -1.0, 0.0); glcolor3f(1.0,0.4,0.0); gltranslatef( 0.0, -0.4, 0.0); glrotatef( -90.0, 1.0,0.0, 0.0 ); glutwirecone( 0.9, 0.9,12, 3); glutsolidcone( 0.9, 0.9,20, 3); glpopattrib(); gldisable( GL_DEPTH_TEST); gldisable(gl_lighting); gldisable(gl_normalize); glutswapbuffers(); void idle(void) theta=fmod(theta ,360.0); fly = fmod(fly , ); spin = fmod( (spin + 0.1), ); glutpostredisplay(); void initlighting(void) float diffuse[] = 1.0, 1.0, 0.8, 1.0; float specular[] = 0.5, 0.5, 1.0, 1.0; float ambient[] = 0.5, 0.5, 0.5, 1.0; float white[] = 1.0, 1.0, 1.0, 1.0 ; gllightfv( GL_LIGHT0, GL_DIFFUSE, diffuse ); gllightfv( GL_LIGHT0, GL_SPECULAR, specular ); gllightfv( GL_LIGHT0, GL_AMBIENT, ambient ); gllightfv( GL_LIGHT1, GL_DIFFUSE, white ); gllightfv( GL_LIGHT1, GL_SPECULAR, specular ); gllightfv( GL_LIGHT1, GL_AMBIENT, ambient ); glenable( GL_LIGHT0 ); glenable( GL_LIGHT1 ); void mykbd( unsigned char key, int x, int y ) switch(key)

5 case'w': wireflag=!wireflag; case'r': revolveflag=!revolveflag; if(revolveflag==gl_true) glutidlefunc(idle); glutidlefunc(null); case's': shadeflag=!shadeflag; case'r': resetview(); case KEY_ESC: exit(0); glutpostredisplay(); void myskey( int key, int x, int y) switch( key ) case GLUT_KEY_F1: moveflag =!moveflag; if(moveflag==gl_true) glutidlefunc(idle); glutpostredisplay(); void mymouse( int button, int state, int x, int y ) if (state == GLUT_DOWN) switch(button) case GLUT_LEFT_BUTTON: mbutton = button; case GLUT_MIDDLE_BUTTON:

6 mbutton = button; case GLUT_RIGHT_BUTTON: mbutton = button; xbegin = x; ybegin = y; void mymotion(int x,int y) int xdisp,ydisp; xdisp = x-xbegin; ydisp = y-ybegin; switch(mbutton) case GLUT_LEFT_BUTTON: azimuth += (float)xdisp/2.0; elevation -=(float)ydisp/2.0; case GLUT_MIDDLE_BUTTON: twist += (float)xdisp/2.0; case GLUT_RIGHT_BUTTON: distance+= (float)ydisp/40.0; xbegin=x; ybegin=y; glutpostredisplay(); void makeimage(void) int i,j; for (i = 0; i < imageheight; i++) for (j = 0; j < imagewidth; j++) image[i][j][0] = (unsigned char) bitmap2[i][j]; // bitmap2 に変えたり image[i][j][1] = (unsigned char) bitmap2[i][j]; // bitmap1 の内容を変えてみる image[i][j][2] = (unsigned char) bitmap2[i][j]; image[i][j][3] = (unsigned char) 50; gltexparameteri(gl_texture_2d, GL_TEXTURE_WRAP_S, GL_REPEAT); gltexparameteri(gl_texture_2d, GL_TEXTURE_WRAP_T, GL_REPEAT); gltexparameteri(gl_texture_2d, GL_TEXTURE_MAG_FILTER, GL_NEAREST); gltexparameteri(gl_texture_2d, GL_TEXTURE_MIN_FILTER, GL_NEAREST);

7 glteximage2d(gl_texture_2d, 0, 4,imageHeight,imageWidth,0, GL_RGBA, GL_UNSIGNED_BYTE, image); void inittexture(void) makeimage(); gltexenvf(gl_texture_env, GL_TEXTURE_ENV_MODE, GL_DECAL); gltexgenf(gl_s,gl_texture_gen_mode,gl_object_linear); gltexgenf(gl_t,gl_texture_gen_mode,gl_object_linear); glenable(gl_texture_gen_s); glenable(gl_texture_gen_t); void myinit (char *progname) int width = 300, height = 600; float aspect = (float) width / (float) height; glutinitwindowposition(0, 0); glutinitwindowsize( width, height ); glutinitdisplaymode( GLUT_DOUBLE GLUT_RGBA ); glutcreatewindow(progname); glclearcolor (0.0, 0.0, 0.0, 1.0); glutkeyboardfunc( mykbd ); glutspecialfunc( myskey ); glutmousefunc(mymouse); glutmotionfunc(mymotion); inittexture(); resetview(); glmatrixmode(gl_projection); glloadidentity(); gluperspective(45.0, aspect, 1.0, 23.0); glmatrixmode(gl_modelview); glenable(gl_light0); glenable(gl_light1); initlighting(); void polarview(void) gltranslatef(0.0, 0.0, -distance ); glrotatef(-twist, 0.0, 0.0, 1.0); glrotatef(-elevation, 1.0, 0.0, 0.0); glrotatef(-azimuth, 0.0, 1.0, 0.0 ); void resetview(void) distance = 14.0; twist = 10.0; elevation = -30.0; azimuth = 0.0;

8 void myreshape(int width, int height) float aspect = (float) width / (float) height; glviewport(0, 0, width, height); glmatrixmode(gl_projection); glloadidentity(); gluperspective(45.0, aspect, 1.0, 23.0); glmatrixmode(gl_modelview); int main(int argc, char** argv) glutinit(&argc, argv); myinit(argv[0]); glutreshapefunc(myreshape); glutdisplayfunc(display); glutidlefunc(idle); glutmainloop(); return( 0 );

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

#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

OpenGL & GLUTの基本関数の説明

OpenGL & 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 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

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

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

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

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

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

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

PowerPoint Presentation

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

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

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

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

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

第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

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

$ 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

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

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

第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

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

謗域・ュ逕ィ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

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

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

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

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

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

NB

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

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

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

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

演算増幅器

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

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

演算増幅器

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

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

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

$ 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

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

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

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

More information

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

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

More information

ハピタス のコピー.pages

ハピタス のコピー.pages Copyright (C) All Rights Reserved. 10 12,500 () ( ) ()() 1 : 2 : 3 : 2 4 : 5 : Copyright (C) All Rights Reserved. Copyright (C) All Rights Reserved. Copyright (C) All Rights Reserved. Copyright (C) All

More information

Copyright 2008 All Rights Reserved 2

Copyright 2008 All Rights Reserved 2 Copyright 2008 All Rights Reserved 1 Copyright 2008 All Rights Reserved 2 Copyright 2008 All Rights Reserved 3 Copyright 2008 All Rights Reserved 4 Copyright 2008 All Rights Reserved 5 Copyright 2008 All

More information

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

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

More information

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裵²ó ¨¡ À©¸æ¹½Â¤¡§¾ò·ïʬ´ô ¨¡

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (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 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

JAPLA研究会資料 2010/4/24

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

More information

XMPによる並列化実装2

XMPによる並列化実装2 2 3 C Fortran Exercise 1 Exercise 2 Serial init.c init.f90 XMP xmp_init.c xmp_init.f90 Serial laplace.c laplace.f90 XMP xmp_laplace.c xmp_laplace.f90 #include int a[10]; program init integer

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

初心者にもできるアメブロカスタマイズ新2016.pages

初心者にもできるアメブロカスタマイズ新2016.pages Copyright All Rights Reserved. 41 Copyright All Rights Reserved. 60 68 70 6 78 80 Copyright All Rights Reserved. FC2 97 Copyright All Rights Reserved. Copyright All Rights Reserved. Copyright All Rights

More information

- 2 Copyright (C) 2006. All Rights Reserved.

- 2 Copyright (C) 2006. All Rights Reserved. - 2 Copyright (C) 2006. All Rights Reserved. 2-3 Copyright (C) 2006. All Rights Reserved. 70-4 Copyright (C) 2006. All Rights Reserved. ...1...3...7...8 1...9...14...16 2...18...20...21 3...22...23...23...24

More information

Copyright All Rights Reserved. -2 -!

Copyright All Rights Reserved. -2 -! http://ameblo.jp/admarketing/ Copyright All Rights Reserved. -2 -! Copyright All Rights Reserved. -3- Copyright All Rights Reserved. -4- Copyright All Rights Reserved. -5 - Copyright All Rights Reserved.

More information

IPA:セキュアなインターネットサーバー構築に関する調査

IPA:セキュアなインターネットサーバー構築に関する調査 Copyright 2003 IPA, All Rights Reserved. Copyright 2003 IPA, All Rights Reserved. Copyright 2003 IPA, All Rights Reserved. Copyright 2003 IPA, All Rights Reserved. Copyright 2003 IPA, All Rights Reserved.

More information

Microsoft Word - 最終版 バックせどりismマニュアル .docx

Microsoft Word - 最終版 バックせどりismマニュアル .docx ism ISM ISM ISM ISM ISM ISM Copyright (c) 2010 All Rights Reserved. Copyright (c) 2010 All Rights Reserved. Copyright (c) 2010 All Rights Reserved. ISM Copyright (c) 2010 All Rights Reserved. Copyright

More information

イントロダクション

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

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

1) OOP 2) ( ) 3.2) printf Number3-2.cpp #include <stdio.h> class Number Number(); // ~Number(); // void setnumber(float n); float getnumber();

1) 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 information

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

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

More information

Microsoft Word - C.....u.K...doc

Microsoft Word - C.....u.K...doc C uwêííôöðöõ Ð C ÔÖÐÖÕ ÐÊÉÌÊ C ÔÖÐÖÕÊ C ÔÖÐÖÕÊ Ç Ê Æ ~ if eíè ~ for ÒÑÒ ÌÆÊÉÉÊ ~ switch ÉeÍÈ ~ while ÒÑÒ ÊÍÍÔÖÐÖÕÊ ~ 1 C ÔÖÐÖÕ ÐÊÉÌÊ uê~ ÏÒÏÑ Ð ÓÏÖ CUI Ô ÑÊ ÏÒÏÑ ÔÖÐÖÕÎ d ÈÍÉÇÊ ÆÒ Ö ÒÐÑÒ ÊÔÎÏÖÎ d ÉÇÍÊ

More information

untitled

untitled mitsuya Copyright (C) 2007. All Rights Reserved. 1/1 mitsuya Copyright (C) 2007. All Rights Reserved. 2/2 mitsuya Copyright (C) 2007. All Rights Reserved. 3/3 mitsuya Copyright (C) 2007. All Rights Reserved.

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

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

115 9 MPIBNCpack 9.1 BNCpack 1CPU X = , B =

115 9 MPIBNCpack 9.1 BNCpack 1CPU X = , B = 115 9 MPIBNCpack 9.1 BNCpack 1CPU 1 2 3 4 5 25 24 23 22 21 6 7 8 9 10 20 19 18 17 16 X = 11 12 13 14 15, B = 15 14 13 12 11 16 17 18 19 20 10 9 8 7 6 21 22 23 24 25 5 4 3 2 1 C = XB X dmat1 B dmat2 C dmat

More information

掲示用ヒート表 第34回 藤沢市長杯 2017

掲示用ヒート表 第34回 藤沢市長杯 2017 34 8 4 2 Round 1 Round 2 SEMI FINAL 30 16 8 H1 H5 H1 H1 Red 12401821 2 Red 12601360 2 1-1 Red 12501915 1 1-1 Red 12501915 4 White 12900051 4 White 12600138 3 3-1 White 12802412 2 3-1 White 12801091 1 Yellow

More information

健康保険組合のあゆみ_top

健康保険組合のあゆみ_top (1912) (1951) 2,00024,000 (1954) (1958) (1962) (1965) (1968) (1969) (1971) (1972) (1973) (1974) (1976) (1978) (1980) (1982) (1983) (1984) (1985) (1987) (1988) (1989) (1990) (1991) (1992) (1994) (1995)

More information

[1] #include<stdio.h> main() { printf("hello, world."); return 0; } (G1) int long int float ± ±

[1] #include<stdio.h> main() { printf(hello, world.); return 0; } (G1) int long int float ± ± [1] #include printf("hello, world."); (G1) int -32768 32767 long int -2147483648 2147483647 float ±3.4 10 38 ±3.4 10 38 double ±1.7 10 308 ±1.7 10 308 char [2] #include int a, b, c, d,

More information

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

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

More information

comment.dvi

comment.dvi ( ) (sample1.c) (sample1.c) 2 2 Nearest Neighbor 1 (2D-class1.dat) 2 (2D-class2.dat) (2D-test.dat) 3 Nearest Neighbor Nearest Neighbor ( 1) 2 1: NN 1 (sample1.c) /* -----------------------------------------------------------------

More information

CM-3G 周辺モジュール拡張技術文書 MS5607センサ(温度、気圧)

CM-3G 周辺モジュール拡張技術文書 MS5607センサ(温度、気圧) CM-3G 周辺モジュール拡張技術文書 MS5607 センサ ( 温度 気圧 ) ( 第 1 版 ) Copyright (C)2016 株式会社コンピューテックス 目次 1. はじめに... 1 2. MS5607 について... 1 3. 接続図... 1 4. アプリケーション ソース... 2 5. アプリケーションのコンパイル方法... 7 6. アプリケーションの実行... 8 1. はじめに

More information

★結果★ 藤沢市長杯 掲示用ヒート表

★結果★ 藤沢市長杯 掲示用ヒート表 AA 35 Round 1 8 4 Round 2 28 16 SEMI FINAL H1 H5 H1 H1 Red 12802015 1 Red 12802109 1 1-1 Red 12802015 2 1-1 Red 12702346 White 12800232 2 White 12702406 3 3-1 White 12702346 1 3-1 White 12802109 Yellow

More information

Display 表示の初期化が CAVE 表示の初期化に置き換わり CAVE 用のプログラムに書き換えることが出来る 表 2 1 画面 (Windows LINUX IRIX) 用の OpenGL #include<stdio.h> #include<windows.h> #include<gl/g

Display 表示の初期化が CAVE 表示の初期化に置き換わり CAVE 用のプログラムに書き換えることが出来る 表 2 1 画面 (Windows LINUX IRIX) 用の OpenGL #include<stdio.h> #include<windows.h> #include<gl/g OpenGL による CAVE とファントムへの 3 次元表示 井門俊治 ( いどしゅんじ ) 埼玉工業大学工学部情報システム学科 利用環境 :Windows, LINUX, IRIX, AVS, AVS-MPE, OpenGL,VRML,Java3D 1. 目的 CAVE の表示するためには 従来は OpenGL によるプログラミングが行われていた これに対して 20 00 年末より AVS において

More information

弥生会計/やよいの青色申告

弥生会計/やよいの青色申告 c c c c c 1 c c c c c c c c c c c 2 3 c c 4 a a a a a a a a a

More information

新版明解C言語 実践編

新版明解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 information

① Copyright 2005 Impex.,inc. All Rights Reserved 1 Copyright 2005 Impex.,inc. All Rights Reserved 2 Copyright 2005 Impex.,inc. All Rights Reserved 3 Copyright 2005 Impex.,inc. All Rights Reserved 4 Copyright

More information

Copyright 2008 NIFTY Corporation All rights reserved. 2

Copyright 2008 NIFTY Corporation All rights reserved. 2 Copyright 2008 NIFTY Corporation All rights reserved. 2 Copyright 2008 NIFTY Corporation All rights reserved. 3 Copyright 2008 NIFTY Corporation All rights reserved. 4 Copyright 2008 NIFTY Corporation

More information

イントロダクション

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

More information

£Ã¥×¥í¥°¥é¥ß¥ó¥°(2018) - Âè11²ó – ½ÉÂꣲ¤Î²òÀ⡤±é½¬£² –

£Ã¥×¥í¥°¥é¥ß¥ó¥°(2018) - Âè11²ó – ½ÉÂꣲ¤Î²òÀ⡤±é½¬£² – (2018) 11 2018 12 13 2 g v dv x dt = bv x, dv y dt = g bv y (1) b v 0 θ x(t) = v 0 cos θ ( 1 e bt) (2) b y(t) = 1 ( v 0 sin θ + g ) ( 1 e bt) g b b b t (3) 11 ( ) p14 2 1 y 4 t m y > 0 y < 0 t m1 h = 0001

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

ex01.dvi

ex01.dvi ,. 0. 0.0. C () /******************************* * $Id: ex_0_0.c,v.2 2006-04-0 3:37:00+09 naito Exp $ * * 0. 0.0 *******************************/ #include int main(int argc, char **argv) double

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

新・明解C言語 実践編

新・明解C言語 実践編 第 1 章 見 21 1-1 見えないエラー 見 List 1-1 "max2x1.h" a, b max2 List 1-1 chap01/max2x1.h max2 "max2x1.h" #define max2(a, b) ((a) > (b)? (a) : (b)) max2 List 1-2 List 1-2 chap01/max2x1test.c max2 #include

More information

Copyright 2006 KDDI Corporation. All Rights Reserved page1

Copyright 2006 KDDI Corporation. All Rights Reserved page1 Copyright 2006 KDDI Corporation. All Rights Reserved page1 Copyright 2006 KDDI Corporation. All Rights Reserved page2 Copyright 2006 KDDI Corporation. All Rights Reserved page3 Copyright 2006 KDDI Corporation.

More information

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

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

More information

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

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

More information

1000 Copyright(C)2009 All Rights Reserved - 2 -

1000 Copyright(C)2009 All Rights Reserved - 2 - 1000 Copyright(C)2009 All Rights Reserved - 1 - 1000 Copyright(C)2009 All Rights Reserved - 2 - 1000 Copyright(C)2009 All Rights Reserved - 3 - 1000 Copyright(C)2009 All Rights Reserved - 4 - 1000 Copyright(C)2009

More information

卒 業 研 究 報 告.PDF

卒 業 研 究 報 告.PDF C 13 2 9 1 1-1. 1-2. 2 2-1. 2-2. 2-3. 2-4. 3 3-1. 3-2. 3-3. 3-4. 3-5. 3-5-1. 3-5-2. 3-6. 3-6-1. 3-6-2. 4 5 6 7-1 - 1 1 1-1. 1-2. ++ Lisp Pascal Java Purl HTML Windows - 2-2 2 2-1. 1972 D.M. (Dennis M Ritchie)

More information

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裶²ó ¨¡ À©¸æ¹½Â¤¡§·«¤êÊÖ¤· ¨¡

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (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 information

JAPLA研究会資料 /6/15

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

More information