第3章 OpenGL の基礎

Size: px
Start display at page:

Download "第3章 OpenGL の基礎"

Transcription

1 3 OpenGL April 20, / 23

2 31 ( ) OpenGL OpenGL 2 / 23

3 32 OpenGL OpenGL OpenGL (Open Graphics Library) Silicon Graphics, Inc 2 3 API (Application Program Interface) [4] UNIX OS Windows Macintosh CAD CG 3 / 23

4 33 OpenGL GLUT (OpenGL Utility Toolkit) OpenGL GLUT GUI Toolkit 4 / 23

5 34 program3 1c #include <GL/gluth> static void display(void); static void display(void) { } int main(int argc, char *argv[]) { glutinit(&argc, argv); glutcreatewindow(argv[0]); glutdisplayfunc(display); glutmainloop(); return 0; } 5 / 23

6 34 (cnt) glutinit() #include <GL/gluth> void glutinit(int *argc, char **argv); GLUT main glutcreatewindow() #include <GL/gluth> int glutcreatewindow(char *name); name 6 / 23

7 34 (cnt) glutdisplayfunc() #include <GL/gluth> void glutdisplayfunc(void (*func)(void)); func glutmainloop() #include <GL/gluth> void glutmainloop(void); 7 / 23

8 35 program3 2c int main(int argc, char *argv[]) { /* Window */ glutinitdisplaymode(glut_rgba); glutinitwindowsize(250, 250); glutinitwindowposition(100, 200); glutcreatewindow(argv[0]); /* */ glclearcolor(00, 00, 00, 00); } /* */ glutdisplayfunc(display); 8 / 23

9 35 (cnt) static void display(void) { glclear(gl_color_buffer_bit); glcolor3f(10, 10, 10); glbegin(gl_polygon); glvertex2f(05, 05); glvertex2f(-05, 05); glvertex2f(-05, -05); glvertex2f(05, -05); glend(); glflush(); } 9 / 23

10 35 (cnt) glutinitdisplaymode() void glutinitdisplaymode(unsigned int mode); mode GLUT RGBA RGBA (,,, ) GLUT INDEX glutinitwindowsize() void glutinitwindowsize(int w, int h); ( 1, 1) 2 10 / 23

11 35 (cnt) glutinitwindowposition() void glutinitwindowposition(int x, int y); glclearcolor() void glclearcolor(glclampf R, GLclampf G, GLclampf B, GLclampf A); R G B A,,, α GLclampf (float ) 0 1 (0, 0, 0) (1, 1, 1) 11 / 23

12 35 (cnt) glclear() void glclear(glbitfield mask); mask ( ) GL COLOR BUFFER BIT GL DEPTH BUFFER BIT, glflush() void glflush(void); OpenGL 12 / 23

13 35 (cnt) glbegin() glend void glbegin(glnum mode); void glend(void); mode 13 / 23

14 35 (cnt) mode GL POINTS: GL LINES: GL LINE STRIP: GL LINE LOOP: v0 v0 v0 v2 v2 v2 v3 v3 v3 v1 v1 v1 GL LINES GL LINE STRIP GL LINE LOOP 14 / 23

15 35 (cnt) GL TRIANGLES / GL QUADS: 3 4 GL TRIANGLE STRIP / GL QUAD STRIP: GL TRIANGLE FAN: GL POLYGON: v0 v1 v3 v2 v5 v4 GL TRIANGLES v4 v3 v0 v2 v1 v4 v3 GL TRIANGLE STRIP v4 v3 v0 v2 v0 v2 v1 GL TRIANGLE FAN v1 GL POLYGON 15 / 23

16 35 (cnt) void glvertex2f(glfloat x, GLfloat y) GLfloat (float ) 3, 4 (x,y,z), (x,y,z,w) glvertex3f (), glvertex4f () double glvertex?d(), int glvertex?i() void glvertex??v() void glcolor3f(glfloat r, GLfloat g, GLfloat b) r, g, b,, 0 1 r, g, b, a void glcolor4f( ) double glcolor?d( ), int glcolor?i( ) 16 / 23

17 36 program3 3c void display(void) { for(i=0; i<star_num; i++){ /* */ x = 20*random_num()-10; y = 20*random_num()-10; brightness = random_num(); size = STAR_SIZE*random_num(); /* 00 STAR_SIZE */ } /* */ draw_point(x, y, brightness, size); } glflush(); 17 / 23

18 36 (cnt) rand int rand(void); 0 RAND MAX srand() rand() RAND MAX int / 23

19 36 (cnt) (anti-aliasing) /* */ glblendfunc(gl_src_alpha, GL_ONE_MINUS_SRC_ALPHA); glenable(gl_blend); /* ON */ /* */ glenable(gl_point_smooth); glhint(gl_point_smooth_hint, GL_NICEST); 19 / 23

20 36 (cnt) glenable(gl POINT SMOOTH) glenable(gl LINE SMOOTH) glenable(gl POLYGON SMOOTH) glhint(gl POINT SMOOTH HINT, GL FASTEST); glhint(gl LINE SMOOTH HINT, GL FASTEST); glhint(gl POLYGON SMOOTH HINT, GL FASTEST); glhint(gl POINT SMOOTH HINT, GL NICEST); glhint(gl LINE SMOOTH HINT, GL NICEST); glhint(gl POLYGON SMOOTH HINT, GL NICEST); 20 / 23

21 37 program3 4c length /= 20; /* */ if(length > 001){ draw_gasket(x0, y0, length); draw_gasket(mid_point(x0, x1), mid_point(y0, y1), length); draw_gasket(mid_point(x2, x0), mid_point(y2, y0), length); } 21 / 23

22 38 OpenGL OpenGL 1 OpenGL 2 3 API 2 OpenGL GLUT OpenGL GLUT / 23

23 [1] Mark J Kilgard The OpenGL Utility Toolkit (GLUT) programming interface API version 3( ) [2], OpenGL 3 CG, 2003 [3] GLUT OpenGL tokoi/opengl/libgluthtml [4] OpenGL 23 / 23

第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

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

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

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

演算増幅器

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

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

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

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

沼津工業高等専門学校

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

More information

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

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

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

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

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

#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

$ 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

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

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

第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

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

第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

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

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

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

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

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

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

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

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

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

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

double float

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

$ 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

WebGL X LR301 Kageyama (Kobe Univ.) Visualization / 45

WebGL X LR301 Kageyama (Kobe Univ.) Visualization / 45 2014.05.13 X021 2014 LR301 Kageyama (Kobe Univ.) Visualization 2014.05.13 1 / 45 Kageyama (Kobe Univ.) Visualization 2014.05.13 2 / 45 Kageyama (Kobe Univ.) Visualization 2014.05.13 3 / 45 Web アプリ HTML

More information

WebGL Safari WebGL WebGL Safari Kageyama (Kobe Univ.) / 5

WebGL Safari WebGL WebGL   Safari Kageyama (Kobe Univ.) / 5 04 1 2015.05.12 Kageyama (Kobe Univ.) 2015.05.12 1 / 55 WebGL Safari WebGL WebGL http://www.khronos.org/webgl/ http://www.khronos.org/webgl/wiki/demo_repository Safari Kageyama (Kobe Univ.) 2015.05.12

More information

<4D F736F F D B B83578B6594BB2D834A836F815B82D082C88C60202E646F63>

<4D F736F F D B B83578B6594BB2D834A836F815B82D082C88C60202E646F63> デザイン言語 Processing 入門 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. http://www.morikita.co.jp/books/mid/084931 このサンプルページの内容は, 初版 1 刷発行当時のものです. Processing Ben Fry Casey Reas Windows Mac Linux Lesson 1 Processing

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

PowerPoint Presentation

PowerPoint Presentation p.130 p.198 p.208 2 double weight[num]; double min, max; min = max = weight[0]; for( i= 1; i i < NUM; i++ ) ) if if ( weight[i] > max ) max = weight[i]: if if ( weight[i] < min ) min = weight[i]: weight

More information

ィ 07ィコ060909ィコィィィヲ , 0600ィェィ ィー02ィェィコ ィ ツィ 05ィケィェ04ィヲ ィコィョ0809 OpenGL. 00.: ィ ィ

ィ 07ィコ060909ィコィィィヲ , 0600ィェィ ィー02ィェィコ ィ ツィ 05ィケィェ04ィヲ ィコィョ0809 OpenGL. 00.: ィ ィ 1300020508020005080607 010205070208040506000301010407 0701060003040506060306 0600030106 00.00. 09020002010205020008 080808070905060306 0004 チ0605090606030905010207 00080603000806060806 06 0806090304010306060806

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

WebGL References Kageyama (Kobe Univ.) Visualization 2013.05.07 *4 2 / 54

WebGL References Kageyama (Kobe Univ.) Visualization 2013.05.07 *4 2 / 54 WebGL *1 2013.05.07 *2 *1 X021 2013 LR301 *2 05/08: Kageyama (Kobe Univ.) Visualization 2013.05.07 *3 1 / 54 WebGL References Kageyama (Kobe Univ.) Visualization 2013.05.07 *4 2 / 54 Chrome Firefox http://www.khronos.org/webgl/wiki/demo_repository

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

( CUDA CUDA CUDA CUDA ( NVIDIA CUDA I

(    CUDA CUDA CUDA CUDA (  NVIDIA CUDA I GPGPU (II) GPGPU CUDA 1 GPGPU CUDA(CUDA Unified Device Architecture) CUDA NVIDIA GPU *1 C/C++ (nvcc) CUDA NVIDIA GPU GPU CUDA CUDA 1 CUDA CUDA 2 CUDA NVIDIA GPU PC Windows Linux MaxOSX CUDA GPU CUDA NVIDIA

More information

WinHPC ppt

WinHPC ppt MPI.NET C# 2 2009 1 20 MPI.NET MPI.NET C# MPI.NET C# MPI MPI.NET 1 1 MPI.NET C# Hello World MPI.NET.NET Framework.NET C# API C# Microsoft.NET java.net (Visual Basic.NET Visual C++) C# class Helloworld

More information

Windows Macintosh 3 3 4 = 3 4 = 4 5 6 Windows Macintosh 7 8 9 Windows Macintosh 0 Windows Macintosh 3 4 5 Windows Macintosh Windows Macintosh 3 4 5 = Windows Macintosh 3 4 3 4 5 3 4 5 3 5 4 5 6 3 4 3 5

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

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

para02-2.dvi

para02-2.dvi 2002 2 2002 4 23 : MPI MPI 1 MPI MPI(Message Passing Interface) MPI UNIX Windows Machintosh OS, MPI 2 1 1 2 2.1 1 1 1 1 1 1 Fig. 1 A B C F Fig. 2 A B F Fig. 1 1 1 Fig. 2 2.2 Fig. 3 1 . Fig. 4 Fig. 3 Fig.

More information

II ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 D

II ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 D II 8 2003 11 12 1 6 ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 Daisuke 8 =>. 73 Daisuke 35 Hiroshi 64 Ichiro 87 Junko

More information

/ SCHEDULE /06/07(Tue) / Basic of Programming /06/09(Thu) / Fundamental structures /06/14(Tue) / Memory Management /06/1

/ SCHEDULE /06/07(Tue) / Basic of Programming /06/09(Thu) / Fundamental structures /06/14(Tue) / Memory Management /06/1 I117 II I117 PROGRAMMING PRACTICE II 2 MEMORY MANAGEMENT 2 Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara yasu@jaist.ac.jp / SCHEDULE 1. 2011/06/07(Tue) / Basic of Programming

More information

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

More information

07-二村幸孝・出口大輔.indd

07-二村幸孝・出口大輔.indd GPU Graphics Processing Units HPC High Performance Computing GPU GPGPU General-Purpose computation on GPU CPU GPU GPU *1 Intel Quad-Core Xeon E5472 3.0 GHz 2 6 MB L2 cache 1600 MHz FSB 80 GFlops 1 nvidia

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

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

1 CUI CUI CUI 1.1 cout cin 1.1.1 redirect.cpp #i n c l u d e <s t r i n g > 3 using namespace std ; 5 6 i n t main ( void ) 7 { 8 s t r i n g s ; 10 c

1 CUI CUI CUI 1.1 cout cin 1.1.1 redirect.cpp #i n c l u d e <s t r i n g > 3 using namespace std ; 5 6 i n t main ( void ) 7 { 8 s t r i n g s ; 10 c C/C++ 007 6 11 1 CUI 1.1....................................... 1................................ 3 1.3 argc argv................................. 5.1.............................................. 5...............................................

More information

r07.dvi

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

1.ppt

1.ppt /* * Program name: hello.c */ #include int main() { printf( hello, world\n ); return 0; /* * Program name: Hello.java */ import java.io.*; class Hello { public static void main(string[] arg)

More information

ohp07.dvi

ohp07.dvi 19 7 ( ) 2019.4.20 1 (data structure) ( ) (dynamic data structure) 1 malloc C free 1 (static data structure) 2 (2) C (garbage collection GC) C GC(conservative GC) 2 2 conservative GC 3 data next p 3 5

More information

program.dvi

program.dvi 2001.06.19 1 programming semi ver.1.0 2001.06.19 1 GA SA 2 A 2.1 valuename = value value name = valuename # ; Fig. 1 #-----GA parameter popsize = 200 mutation rate = 0.01 crossover rate = 1.0 generation

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

C ( ) C ( ) C C C C C 1 Fortran Character*72 name Integer age Real income 3 1 C mandata mandata ( ) name age income mandata ( ) mandat

C ( ) C ( ) C C C C C 1 Fortran Character*72 name Integer age Real income 3 1 C mandata mandata ( ) name age income mandata ( ) mandat C () 14 5 23 C () C C C C C 1 Fortran Character*72 name Integer age Real income 3 1 C 1.1 3 7 mandata mandata () name age income mandata () mandata1 1 #include struct mandata char name[51];

More information

Effective Android NDK Advanced Core Engineer

Effective Android NDK Advanced Core Engineer Effective Android NDK Advanced Core Engineer Effective Android NDK Effective Android NDK NDK NDK NDK JNI Effective Android NDK native java native NDK NDK NDK C, C++ native toolset Android java native NDK

More information

A/B (2018/10/19) Ver kurino/2018/soft/soft.html A/B

A/B (2018/10/19) Ver kurino/2018/soft/soft.html A/B A/B (2018/10/19) Ver. 1.0 kurino@math.cst.nihon-u.ac.jp http://edu-gw2.math.cst.nihon-u.ac.jp/ kurino/2018/soft/soft.html 2018 10 19 A/B 1 2018 10 19 2 1 1 1.1 OHP.................................... 1

More information

2 1 Web Java Android Java 1.2 6) Java Java 7) 6) Java Java (Swing, JavaFX) (JDBC) 7) OS 1.3 Java Java

2 1 Web Java Android Java 1.2 6) Java Java 7) 6) Java Java (Swing, JavaFX) (JDBC) 7) OS 1.3 Java Java 1 Java Java 1.1 Java 1) 2) 3) Java OS Java 1.3 4) Java Web Start Web / 5) Java C C++ Java JSP(Java Server Pages) 1) OS 2) 3) 4) Java Write Once, Run Anywhere 5) Java Web Java 2 1 Web Java Android Java

More information

XcalableMP入門

XcalableMP入門 XcalableMP 1 HPC-Phys@, 2018 8 22 XcalableMP XMP XMP Lattice QCD!2 XMP MPI MPI!3 XMP 1/2 PCXMP MPI Fortran CCoarray C++ MPIMPI XMP OpenMP http://xcalablemp.org!4 XMP 2/2 SPMD (Single Program Multiple Data)

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

MPI usage

MPI usage MPI (Version 0.99 2006 11 8 ) 1 1 MPI ( Message Passing Interface ) 1 1.1 MPI................................. 1 1.2............................... 2 1.2.1 MPI GATHER.......................... 2 1.2.2

More information

P06.ppt

P06.ppt p.130 p.198 p.208 2 1 double weight[num]; double min, max; min = max = weight[0]; for( i= 1; i < NUM; i++ ) if ( weight[i] > max ) max = weight[i]: if ( weight[i] < min ) min = weight[i]: weight 3 maxof(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

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

C言語によるアルゴリズムとデータ構造

C言語によるアルゴリズムとデータ構造 Algorithms and Data Structures in C 4 algorithm List - /* */ #include List - int main(void) { int a, b, c; int max; /* */ Ÿ 3Ÿ 2Ÿ 3 printf(""); printf(""); printf(""); scanf("%d", &a); scanf("%d",

More information

PowerPoint Presentation

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

More information

SystemC言語概論

SystemC言語概論 SystemC CPU S/W 2004/01/29 4 SystemC 1 SystemC 2.0.1 CPU S/W 3 ISS SystemC Co-Simulation 2004/01/29 4 SystemC 2 ISS SystemC Co-Simulation GenericCPU_Base ( ) GenericCPU_ISS GenericCPU_Prog GenericCPU_CoSim

More information

5. p.1/37

5. 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 information

1 return main() { main main C 1 戻り値の型 関数名 引数 関数ブロックをあらわす中括弧 main() 関数の定義 int main(void){ printf("hello World!!\n"); return 0; 戻り値 1: main() 2.2 C main

1 return main() { main main C 1 戻り値の型 関数名 引数 関数ブロックをあらわす中括弧 main() 関数の定義 int main(void){ printf(hello World!!\n); return 0; 戻り値 1: main() 2.2 C main C 2007 5 29 C 1 11 2 2.1 main() 1 FORTRAN C main() main main() main() 1 return 1 1 return main() { main main C 1 戻り値の型 関数名 引数 関数ブロックをあらわす中括弧 main() 関数の定義 int main(void){ printf("hello World!!\n"); return

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

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

(search: ) [1] ( ) 2 (linear search) (sequential search) 1

(search: ) [1] ( ) 2 (linear search) (sequential search) 1 2005 11 14 1 1.1 2 1.2 (search:) [1] () 2 (linear search) (sequential search) 1 2.1 2.1.1 List 2-1(p.37) 1 1 13 n

More information

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

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

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

C C UNIX C ( ) 4 1 HTML 1

C C UNIX C ( ) 4 1 HTML 1 C 2007 4 18 C UNIX 1 2 1 1.1 C ( ) 4 1 HTML 1 はじめ mkdir work 作業用ディレクトリーの作成 emacs hoge.c& エディターによりソースプログラム作成 gcc -o fuga hoge.c コンパイルにより機械語に変換 コンパイルエラー./fuga 実行 実行時エラー 完成 1: work hooge.c fuga 1 4 4 1 1.

More information

3.1 stdio.h iostream List.2 using namespace std C printf ( ) %d %f %s %d C++ cout cout List.2 Hello World! cout << float a = 1.2f; int b = 3; cout <<

3.1 stdio.h iostream List.2 using namespace std C printf ( ) %d %f %s %d C++ cout cout List.2 Hello World! cout << float a = 1.2f; int b = 3; cout << C++ C C++ 1 C++ C++ C C++ C C++? C C++ C *.c *.cpp C cpp VC C++ 2 C++ C++ C++ [1], C++,,1999 [2],,,2001 [3], ( )( ),,2001 [4] B.W. /D.M.,, C,,1989 C Web [5], http://kumei.ne.jp/c_lang/ 3 Hello World Hello

More information

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV tutimura@mist.i.u-tokyo.ac.jp kaneko@ipl.t.u-tokyo.ac.jp http://www.misojiro.t.u-tokyo.ac.jp/ tutimura/sem3/ 2002 12 11 p.1/33 10/16 1. 10/23 2. 10/30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20

More information

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

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

More information

/* sansu1.c */ #include <stdio.h> main() { int a, b, c; /* a, b, c */ a = 200; b = 1300; /* a 200 */ /* b 200 */ c = a + b; /* a b c */ }

/* sansu1.c */ #include <stdio.h> main() { int a, b, c; /* a, b, c */ a = 200; b = 1300; /* a 200 */ /* b 200 */ c = a + b; /* a b c */ } C 2: A Pedestrian Approach to the C Programming Language 2 2-1 2.1........................... 2-1 2.1.1.............................. 2-1 2.1.2......... 2-4 2.1.3..................................... 2-6

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

卒 業 研 究 報 告.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

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

1 1.1 (VR) [1] * * /3/5 1

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

1 C STL(1) C C C libc C C C++ STL(Standard Template Library ) libc libc C++ C STL libc STL iostream Algorithm libc STL string vector l

1 C STL(1) C C C libc C C C++ STL(Standard Template Library ) libc libc C++ C STL libc STL iostream Algorithm libc STL string vector l C/C++ 2007 6 18 1 C STL(1) 2 1.1............................................... 2 1.2 stdio................................................ 3 1.3.......................................... 10 2 11 2.1 sizeof......................................

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

±é½¬£²¡§£Í£Ð£É½éÊâ

±é½¬£²¡§£Í£Ð£É½éÊâ 2012 8 7 1 / 52 MPI Hello World I ( ) Hello World II ( ) I ( ) II ( ) ( sendrecv) π ( ) MPI fortran C wget http://www.na.scitec.kobe-u.ac.jp/ yaguchi/riken2012/enshu2.zip unzip enshu2.zip 2 / 52 FORTRAN

More information

& & a a * * ptr p int a ; int *a ; int a ; int a int *a

& & a a * * ptr p int a ; int *a ; int a ; int a int *a int a = 123; a 123 :100 a 123 int *ptr = & a; a ptr ptr a 100 a 123 200 *ptr 200 a & & a a * * ptr p --------------------------------------------------------------------------------------------- int a

More information