Microsoft PowerPoint - lecture4-ch2.ppt

Size: px
Start display at page:

Download "Microsoft PowerPoint - lecture4-ch2.ppt"

Transcription

1 Graphics Programming OpenGL Camera OpenGL 에서는카메라가물체의공간 (drawing coordinates) 의원점 (origin) 에위치하며 z- 방향으로향하고있다. 관측공간을지정하지않는다면, 디폴트로 2x2x2 입방체의 viewing volume을사용한다. (1, 1, 1) 년봄학기 3/16/2007 박경신 (-1, -1, -1) Viewing functions 직교투영 (Orthographic parallel projection) void glortho(gldouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble znear, GLdouble zfar); void gluortho2d(gldouble left, GLdouble right, GLdouble bottom, GLdouble top); - 2 차원그래픽스에사용 gluortho2d(0.0, 50.0, 0.0, 50.0); //2D glortho(-10, 10, -10, 10, -10, 10); Viewing functions 원근투영 (Perspective projection) void glfrustum(gldouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble znear, GLdouble zfar); void gluperspective(gldouble fovy, GLdouble aspect, GLdouble znear, GLdouble zfar); - 상하좌우값을설정하는대신 y 방향의시선각도 (FOV) 와종횡비 ( 가까운쪽클리핑평면의너비를높이로나눈값 ) 를사용 gluperspective(60.0, 1.0, 1.0, 10.0);

2 Viewport functions 뷰포트 (Viewport) 윈도우내부에설정한공간. 그리기가뷰포트내부로제한됨. void glviewport(glint x, GLint y, GLsizei width, GLsizei height) 윈도우를처음생성할때전체윈도우에해당하는픽셀영역을뷰포트로설정 ; 이보다작은영역을뷰포트로설정할때는 glviewport() 사용. 일반적으로윈도우전체를뷰포트로사용. Reshape function이있을경우, glviewport() 가반드시포함되어야함. Viewport functions void glscissor(glint x, GLint y, GLsizei width, GLsizei height) 윈도우의직사각형분할및그분할내에서의그릴때의제한사항등을정의 일반적으로 glviewport() 와동일하게정의함 glscissor(100, 100, 350, 350); glenable(gl_scissor_test); glviewport(0, 0, glutget(glut_window_width), glutget(glut_window_height)); Text Functions GLUT 에정의된문자집합제공. 문자열에는획 (stroke) 과래스터 (raster) 두종류가있다. Bitmap font (raster font) text void glutbitmapcharacter(void *font, int character); font 인자 고정폭폰트 - E.g. GLUT_BITMAP_8_BY_13, GLUT_BITMAP_9_BY_15 10, 12, 18 포인트비례간격폰트 e.g. GLUT_BITMAP_TIMES_ROMAN_10 character 인자는 ASCII Stroke font text void glutstrokecharacter(void *font, int character); font 인자 GLUT_STROKE_ROMAN, GLUT_STROKE_MONO_ROMAN Bitmap Text glutbitmapcharacter() 는비트맵 (bitmap = arrays of pixel data) 폰트를사용하여문자를그린다. 비트맵문자의위치는 glrasterpos* 를사용하여지정한다. glrasterpos2f(x, y) glrasterpos3f(x, y, z) 비트맵의문자는크기가변하지않는다. (unaffected by scaling or perspective) 화면에일정한곳에위치하고있다. 만약래스터위치가뷰포트밖에위치하고있다면비트맵문자는그려지지않는다.

3 Stroke Text Sierpinski Gasket glutstrokecharacter() 는 3차원선으로문자를그린다. 따라서, GL의변환 ( 즉, position, size, and orientation) 에의해영향을받는다. glutstrokecharacter() 는다음글자 (character) 를그리기위해자체적으로 transformation을한다. A sample problem of drawing of the Sierpinski gasket 1. Pick an initial point at random inside the triangle, P0 2. Select one of the 3 vertices at random, v1 3. Find the point halfway, P1 4. Display this new point 5. Replace the initial point with this new point 6. Return to step 2 Sierpinski Gasket (2D) 삼각형에서시작한다. 삼각형각변의이등분선 (bisector) 을연결하고, 중앙의 a 작은삼각형을지운다. 반복 (Repeat) a b c v0 v1 b c v2 5번 subdivision Sierpinski Gasket (2D) /* recursive subdivision of triangle to form Sierpinski gasket */ #include <GL/glut.h> /* initial triangle */ GLfloat v[3][2]=-1.0, -0.58, 1.0, -0.58, 0.0, 1.15; int n; void triangle( GLfloat *a, GLfloat *b, GLfloat *c) /* specify one triangle */ glvertex2fv(a); glvertex2fv(b); glvertex2fv(c); void divide_triangle(glfloat *a, GLfloat *b, GLfloat *c, int m) /* triangle subdivision using vertex numbers */ GLfloat v0[2], v1[2], v2[2]; int j; if(m>0) for(j=0; j<2; j++) v0[j]=(a[j]+b[j])/2; for(j=0; j<2; j++) v1[j]=(a[j]+c[j])/2; for(j=0; j<2; j++) v2[j]=(b[j]+c[j])/2; divide_triangle(a, v0, v1, m-1); divide_triangle(c, v1, v2, m-1); divide_triangle(b, v2, v0, m-1); else triangle(a,b,c); /* draw triangle at end of recursion */ void display() glclear(gl_color_buffer_bit); glbegin(gl_triangles); divide_triangle(v[0], v[1], v[2], n); glend(); glflush(); void myinit() gluortho2d(-2.0, 2.0, -2.0, 2.0); glclearcolor (1.0, 1.0, 1.0, 1.0); glcolor3f(0.0,0.0,0.0); int main(int argc, char **argv) n=atoi(argv[1]); /* or set number of subdivision steps here */ glutinit(&argc, argv); glutinitdisplaymode(glut_single GLUT_RGB); glutinitwindowsize(500, 500); glutcreatewindow("sierpinski Gasket"); glutdisplayfunc(display); myinit(); glutmainloop();

4 3D Gasket 3D Gasket 3D Gasket 은각각의 4 면에서 subdivision 을한다. a mid2 mid0 mid1 d mid5 mid4 b mid3 c 사면체 (solid tetrahedron) 내부의작은사면체를지운다. 3D Gasket /* recursive subdivision of a tetrahedron to form 3D Sierpinski gasket */ #include <stdlib.h> #include <GL/glut.h> /* initial tetrahedron */ GLfloat v[4][3]=0.0, 0.0, 1.0, 0.0, , , , , , , , ; GLfloat colors[4][3] = 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0; int n; void triangle(glfloat *va, GLfloat *vb, GLfloat *vc) glvertex3fv(va); glvertex3fv(vb); glvertex3fv(vc); void tetra(glfloat *a, GLfloat *b, GLfloat *c, GLfloat *d) glcolor3fv(colors[0]); triangle(a, b, c); glcolor3fv(colors[1]); triangle(a, c, d); glcolor3fv(colors[2]); triangle(a, d, b); glcolor3fv(colors[3]); triangle(b, d, c); void divide_tetra(glfloat *a, GLfloat *b, GLfloat *c, GLfloat *d, int m) GLfloat mid[6][3]; int j; if(m>0) /* compute six midpoints */ for(j=0; j<3; j++) mid[0][j]=(a[j]+b[j])/2; for(j=0; j<3; j++) mid[1][j]=(a[j]+c[j])/2; for(j=0; j<3; j++) mid[2][j]=(a[j]+d[j])/2; for(j=0; j<3; j++) mid[3][j]=(b[j]+c[j])/2; for(j=0; j<3; j++) mid[4][j]=(c[j]+d[j])/2; for(j=0; j<3; j++) mid[5][j]=(b[j]+d[j])/2; /* create 4 tetrahedrons by subdivision */ divide_tetra(a, mid[0], mid[1], mid[2], m-1); divide_tetra(mid[0], b, mid[3], mid[5], m-1); divide_tetra(mid[1], mid[3], c, mid[4], m-1); divide_tetra(mid[2], mid[4], d, mid[5], m-1); else(tetra(a,b,c,d)); /* draw tetrahedron at end of recursion */ void display() glclear(gl_color_buffer_bit GL_DEPTH_BUFFER_BIT); glbegin(gl_triangles); divide_tetra(v[0], v[1], v[2], v[3], n); glend(); glflush(); void myreshape(int w, int h) glviewport(0, 0, w, h); if (w <= h) glortho(-2.0, 2.0, -2.0 * (GLfloat) h / (GLfloat) w, 2.0 * (GLfloat) h / (GLfloat) w, -10.0, 10.0); else glortho(-2.0 * (GLfloat) w / (GLfloat) h, 2.0 * (GLfloat) w / (GLfloat) h, -2.0, 2.0, -10.0, 10.0); glutpostredisplay(); int main(int argc, char **argv) n=atoi(argv[1]); /* or enter number of subdivision steps here */ glutinit(&argc, argv); glutinitdisplaymode(glut_single GLUT_RGB GLUT_DEPTH); glutinitwindowsize(500, 500); glutcreatewindow("3d Gasket"); glutreshapefunc(myreshape); glutdisplayfunc(display); glenable(gl_depth_test); glclearcolor (1.0, 1.0, 1.0, 1.0); glutmainloop(); Z-buffer algorithm 사용

5 RECAP - GLUT Coordinate Systems Drawing commands that specify locations: glutinitwindowposition Position to open a new window at, given in desktop screen pixel coordinates glwindowpos Position for gldrawpixels, given in window pixel coordinates glrasterpos Position for gldrawpixels, given in drawing coordinates glvertex Position of a shape s vertex, given in drawing coordinates RECAP GL/GLUT Coordinate Systems - GLUT mouse pointer 는 GLUT screen coordinates 사용 - glviewport 는 GL screen coordinates 사용 RECAP Coordinate Systems RECAP RHS Coordinate Systems Screen coordinate systems = GLUT mouse pointer coordinate systems OpenGL drawing coordinate systems (0, 0) +y y-axis x-axis +x 1 unit = 1 pixel z (0, 0,0) y 1 unit = ½ width or height of window x Right Hand Coordinate System (RHS) z+ 가화면앞으로튀어나오는방향. Counter clockwise 방향으로 rotation 을함. X- 축으로 rotation 을하면, Y->Z 방향의회전이 positive Y- 축으로 rotation 을하면, Z->X 방향의회전이 positive Z- 축으로 rotation 을하면, X->Y 방향의회전이 positive z y x

6 RECAP LHS Coordinate Systems Left Hand Coordinate System (LHS) z+ 가화면안으로들어가는방향. Clockwise 방향으로 rotation 을함. X- 축으로 rotation 을하면, Y->Z 방향의회전이 positive Y- 축으로 rotation 을하면, Z->X 방향의회전이 positive Z- 축으로 rotation 을하면, X->Y 방향의회전이 positive y z x

(Microsoft PowerPoint - FZBDPQDCSHAN.ppt [\310\243\310\257 \270\360\265\345])

(Microsoft PowerPoint - FZBDPQDCSHAN.ppt [\310\243\310\257 \270\360\265\345]) Graphics Programming 2.1 The Sierpinski Gasket Sierpinski gasket 예제문제로사용 원래, Fractal geometry 에서정의 만드는방법 삼각형을그린다. 삼각형내부에 random 하게점 P i 를선택, 출력 random 하게꼭지점중의하나 V i 선택 V i 와 P i 의중점을 P i+1 로선택, 출력 위과정을반복

More information

Open GL

Open GL Graphics Basic Windows & OpenGL Programming 컴퓨터그래픽스연구실 OpenGL 관련참고사이트 OpenGL 공식사이트 http://www.opengl.org/ Khronos Group http://www.khronos.org/ Nehe Productions http://nehe.gamedev.net/ OpenGL 파일설정 압축을푼후다음경로로파일을복사

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 01 OpenGL 과 Modeling 01 OpenGL API 02 Rendering Pipeline 03 Modeling 01 OpenGL API 1. OpenGL API 설치및환경설정 2. OpenGL API 구조 2 01 1. OpenGL API 설치및환경설정 OpenGL API 의상대적위치 System Memory Graphics Application

More information

(Microsoft PowerPoint - JXQEUPXIEBNZ.ppt [\310\243\310\257 \270\360\265\345])

(Microsoft PowerPoint - JXQEUPXIEBNZ.ppt [\310\243\310\257 \270\360\265\345]) Input and Interaction 3.1 Interaction Input 기능의처리 input : 사용자와의대화 O/S 와밀접한관계 문제점 : portability 에심각한장애 MS Windows 용으로작성하면, 거기서만작동 OpenGL approach OpenGL 은 portability 를중시 input 은 OpenGL 기능에서되도록제거 GLUT :

More information

(Microsoft PowerPoint - CNVZNGWAIYSE.ppt [\310\243\310\257 \270\360\265\345])

(Microsoft PowerPoint - CNVZNGWAIYSE.ppt [\310\243\310\257 \270\360\265\345]) Viewing Viewing Process first part : model-view in Chapter 4 second part : projection in Chapter 5 world frame glmatrimode(gl_modelveiw) glmatrimode(gl_projection) camera frame camera 방향 object frame 5.

More information

Microsoft PowerPoint - lecture3-ch2.ppt [호환 모드]

Microsoft PowerPoint - lecture3-ch2.ppt [호환 모드] Coordinate Systems Graphics Programming 321190 2014 년봄학기 3/14/2014 박경신 2D Cartesian Coordinate Systems 3D Cartesian Coordinate Systems Cartesian Coordination Systems -x +y y-axis x-axis +x Two axes: x-axis

More information

Microsoft PowerPoint - 13prac.pptx

Microsoft PowerPoint - 13prac.pptx Viewing 1 th Week, 29 OpenGL Viewing Functions glulookat() Defining a viewing matrix glortho() Creating a matrix for an orthographic parallel viewing i volume glfrustum() Creating a matrix for a perspective-view

More information

chapter2.hwp

chapter2.hwp 2. 그래픽스프로그래밍의소개 2.1 OpenGL 이란? 2.1.1 OpenGL 의정의 2차원또는 3차원드로잉을위한표준그래픽스라이브러리 - 그래픽스하드웨어에대한소프트웨어인터페이스 - C나 C++ 과같은프로그래밍언어는아님 - 그래픽스하드웨어에잘구현될수있음 -C언어기반라이브러리 - 상태기반아키텍쳐 - 즉시모드 (Immediate mode) 기반 그래픽스라이브러리

More information

Microsoft Word - cg09-midterm.doc

Microsoft Word - cg09-midterm.doc 중간고사 담당교수 : 단국대학교멀티미디어공학전공박경신 답은반드시답안지에기술할것. 공간이부족할경우반드시답안지몇쪽의뒤에있다고명기한후기술할것. 그외의경우의답안지뒤쪽이나연습지에기술한내용은답안으로인정안함. 답에는반드시네모를쳐서확실히표시할것. 답안지에학과, 학번, 이름외에본인의암호를기입하면성적공고시학번대신암호를사용할것임. 1. 맞으면 true, 틀리면 false를적으시오.

More information

Microsoft Word - cg09-final-answer.doc

Microsoft Word - cg09-final-answer.doc 기말고사 담당교수 : 단국대학교멀티미디어공학전공박경신 답은반드시답안지에기술할것. 공간이부족할경우반드시답안지몇쪽의뒤에있다고명기한후기술할것. 그외의경우의답안지뒤쪽이나연습지에기술한내용은답안으로인정안함. 답에는반드시네모를쳐서확실히표시할것. 성적공고시중간고사때제출한암호를사용할것임. 1. 다음문제에답하시오. (50점) 1) 직교투영 (orthographic projection),

More information

컴퓨터그래픽스 소프트웨어

컴퓨터그래픽스 소프트웨어 Video & Image VIPLProcessing Lab. 2014-1 Myoung-Jin Kim, Ph.D. (webzealer@ssu.ac.kr) 목차 1 래스터그래픽스및벡터그래픽스 2 컴퓨터그래픽스소프트웨어의유형 3 OpenGL 프로그래밍 래스터그래픽스영상 래스터그래픽스영상이란? 래스터 : CRT 의래스터 주사 (raster scan) 방식에서사용된용어

More information

Microsoft PowerPoint - lecture2-opengl.ppt [호환 모드]

Microsoft PowerPoint - lecture2-opengl.ppt [호환 모드] OpenGL & GLUT OpenGL & GLUT 321190 2011 년봄학기 3/15/2011 박경신 OpenGL http://www.opengl.org/ http://www.sgi.com/software/opengl Windows95 이후 OpenGL 이표준으로들어가있음. ftp://ftp.microsfot.com/softlib/mslfiles/opengl95.exe

More information

Microsoft PowerPoint - lecture3-ch2.ppt

Microsoft PowerPoint - lecture3-ch2.ppt Coordinate Systems Graphics Programming 321190 2007년봄학기 3/13/2007 박경신 2D Cartesian Coordinate Systems 3D Cartesian Coordinate Systems Cartesian Coordination Systems -x +y y-axis x-axis +x Two axes: x-axis

More information

OpenGL 프로그래밍 가이드 : OpenGL 1.2 공식 학습 가이드 제3판

OpenGL 프로그래밍 가이드 : OpenGL 1.2 공식 학습 가이드 제3판 OpenGL, (OpenGL GL, Graphics Library ). OpenGL 3.,,. OpenGL. 14. 3. 1, OpenGL OpenGL., OpenGL. 2, 3. 3, 3 2.. 4,. 26 Ope ngl Progra mming Guide - OpenGL 1.2 5,, (, ). 3 3. 3. OpenGL.. 6,,,.,,. 7, OpenGL.

More information

Microsoft PowerPoint - lecture2-opengl.ppt

Microsoft PowerPoint - lecture2-opengl.ppt OpenGL & GLUT OpenGL & GLUT 321190 2007년봄학기 3/9/2007 박경신 OpenGL http://www.opengl.org/ http://www.sgi.com/software/opengl Windows95 이후 OpenGL 이표준으로들어가있음. ftp://ftp.microsfot.com/softlib/mslfiles/opengl95.exe

More information

Microsoft Word - cg07-midterm.doc

Microsoft Word - cg07-midterm.doc 중간고사 담당교수 : 단국대학교멀티미디어공학전공박경신 답은반드시답안지에기술할것. 공간이부족할경우반드시답안지몇쪽의뒤에있다고명기한후기술할것. 그외의경우의답안지뒤쪽이나연습지에기술한내용은답안으로인정안함. 답에는반드시네모를쳐서확실히표시할것. 답안지에학과, 학번, 이름외에본인의암호를기입하면성적공고시학번대신암호를사용할것임. 1. 맞으면 true, 틀리면 false를적으시오.

More information

서강대학교 공과대학 컴퓨터공학과 CSE4170 기초 컴퓨터 그래픽스 중간고사 (1/8) [CSE4170: 기초 컴퓨터 그래픽스] 중간고사 (담당교수: 임 인 성) 답은 연습지가 아니라 답안지에 기술할 것. 있는 변환 행렬은 일반적으로 어떤 좌표계 에서 어떤 좌표계로의

서강대학교 공과대학 컴퓨터공학과 CSE4170 기초 컴퓨터 그래픽스 중간고사 (1/8) [CSE4170: 기초 컴퓨터 그래픽스] 중간고사 (담당교수: 임 인 성) 답은 연습지가 아니라 답안지에 기술할 것. 있는 변환 행렬은 일반적으로 어떤 좌표계 에서 어떤 좌표계로의 (/8) [CSE47: 기초 컴퓨터 그래픽스] 중간고사 (담당교수: 임 인 성) 답은 연습지가 아니라 답안지에 기술할 것 있는 변환 행렬은 일반적으로 어떤 좌표계 에서 어떤 좌표계로의 변환을 위하여 사용 하는가? 답안지 공간이 부족할 경우, 답안지 뒷면에 기 술하고, 해당 답안지 칸에 그 사실을 명기할 것 (i) 투영 참조점이 무한대점 (point at infinit)

More information

Microsoft PowerPoint - lecture2-opengl.ppt [호환 모드]

Microsoft PowerPoint - lecture2-opengl.ppt [호환 모드] OpenGL & GLUT & GLEW OpenGL & GLUT 321190 2013 년봄학기 3/12/2013 박경신 OpenGL http://www.opengl.org/ http://www.sgi.com/software/opengl Windows95 이후 OpenGL 이표준으로들어가있음. ftp://ftp.microsfot.com/softlib/mslfiles/opengl95.exe

More information

04_오픈지엘API.key

04_오픈지엘API.key 4. API. API. API..,.. 1 ,, ISO/IEC JTC1/SC24, Working Group ISO " (Architecture) " (API, Application Program Interface) " (Metafile and Interface) " (Language Binding) " (Validation Testing and Registration)"

More information

슬라이드 1

슬라이드 1 세모그래픽스 III. 게임프로그래밍에필요한 OpenGL Page 1 목차 1. 간단한 OBJ-C 2. IOS의 OGL VS Win32의 OGL 3. IOS개발환경설정 4. 뷰포트, 프로젝션, 모델뷰 ( 회전이먼저냐이동이먼저냐?) Page 2 세모그래픽스 간단한 OBJ-C 2011.07.16 김형석 Page 3 1. Obj-C (test2_cpp) #import

More information

2005CG01.PDF

2005CG01.PDF Computer Graphics # 1 Contents CG Design CG Programming 2005-03-10 Computer Graphics 2 CG science, engineering, medicine, business, industry, government, art, entertainment, advertising, education and

More information

歯Lecture2.PDF

歯Lecture2.PDF VISUAL C++/MFC Lecture 2? Update Visual C ++/MFC Graphic Library OpenGL? Frame OpenGL 3D Graphic library coding CLecture1View? OpenGL MFC coding Visual C++ Project Settings Link Tap Opengl32lib, Glu32lib,

More information

슬라이드 1

슬라이드 1 프로세싱 광운대학교로봇학부박광현 프로세싱실행 2 C:\processing-3.2.1 폴더 창나타내기 실행 정지 3 폭 높이 600 400 도형그리기 배경칠하기 5 background(255, 255, 255); R G B background(255, 0, 0); background(255, 122, 0); 선그리기 6 background(255, 122, 0);

More information

Microsoft Word - cg08-final-answer.doc

Microsoft Word - cg08-final-answer.doc 기말고사 담당교수 : 단국대학교멀티미디어공학전공박경신 답은반드시답안지에기술할것. 공간이부족할경우반드시답안지몇쪽의뒤에있다고명기한후기술할것. 그외의경우의답안지뒤쪽이나연습지에기술한내용은답안으로인정안함. 답에는반드시네모를쳐서확실히표시할것. 성적공고시중간고사때제출한암호를사용할것임. 1. 다음문제에답하시오. (50점) 1) 표면의법선벡터 (normal vector) N과표면에서광원으로향하는광원벡터

More information

0503중간고사.dvi

0503중간고사.dvi 서강대학교 공과대학 컴퓨터공학과 CSE4170 기초 컴퓨터 그래픽스 중간고사 1/9 [CSE4170: 기초 컴퓨터 그래픽스] 중간고사 담당교수: 임 인 성 답은 반드시 답안지에 기술할 것. 공간이 부족할 경우 반드시 답안지 몇 쪽의 뒤에 있다고 명기한 후 기술할 것. 그 외의 경우의 답안지 뒤쪽이나 연습지 에 기술한 내용은 답안으로 인정 안함. 1. 2차원

More information

Microsoft PowerPoint - lecture5-ch3.ppt [호환 모드]

Microsoft PowerPoint - lecture5-ch3.ppt [호환 모드] Overview Input and Interaction 514780 2018 년가을학기 9/27/2018 단국대학교박경신 입력장치 (Input device) 물리적입력장치 (Physical input devices) Mouse, Keyboard, Trackball 논리적장치 String, Locator, Pick, Choice, Valuators, Stroke

More information

Open GL

Open GL Graphics OpenGL 컴퓨터그래픽스연구실 OpenGL 관련참고사이트 OpenGL 공식사이트 http://www.opengl.org/ Khronos Group http://www.khronos.org/ Nehe Productions http://nehe.gamedev.net/ OpenGL 파일셋팅 압축을푼후다음경로로파일을복사 헤더파일 (glut.h) Microsoft

More information

단국대학교멀티미디어공학그래픽스프로그래밍중간고사 (2011 년봄학기 ) 2011 년 4 월 26 일학과학번이름 중간고사 담당교수 : 단국대학교멀티미디어공학전공박경신 l 답은반드시답안지에기술할것. 공간이부족할경우반드시답안지몇쪽의뒤에있다고명기한후기술할것. 그외의경우의답안지뒤

단국대학교멀티미디어공학그래픽스프로그래밍중간고사 (2011 년봄학기 ) 2011 년 4 월 26 일학과학번이름 중간고사 담당교수 : 단국대학교멀티미디어공학전공박경신 l 답은반드시답안지에기술할것. 공간이부족할경우반드시답안지몇쪽의뒤에있다고명기한후기술할것. 그외의경우의답안지뒤 중간고사 담당교수 : 단국대학교멀티미디어공학전공박경신 l 답은반드시답안지에기술할것. 공간이부족할경우반드시답안지몇쪽의뒤에있다고명기한후기술할것. 그외의경우의답안지뒤쪽이나연습지에기술한내용은답안으로인정안함. 답에는반드시네모를쳐서확실히표시할것. l 답안지에학과, 학번, 이름외에본인의암호를기입하면성적공고시학번대신암호를사용할것임. 1. 맞으면 true, 틀리면 false를적으시오.

More information

(Microsoft PowerPoint - JXEUOAACMYBW.ppt [\310\243\310\257 \270\360\265\345])

(Microsoft PowerPoint - JXEUOAACMYBW.ppt [\310\243\310\257 \270\360\265\345]) Discrete Techniques Historical Background 1970 년대 : local illumination models Phong shading : plastic 처럼보인다... 1980년대 : realism 의추구 global illumination models high cost, but very realistic texture mapping

More information

BMP 파일 처리

BMP 파일 처리 BMP 파일처리 김성영교수 금오공과대학교 컴퓨터공학과 학습내용 영상반전프로그램제작 2 Inverting images out = 255 - in 3 /* 이프로그램은 8bit gray-scale 영상을입력으로사용하여반전한후동일포맷의영상으로저장한다. */ #include #include #define WIDTHBYTES(bytes)

More information

Microsoft PowerPoint - lecture18-ch8

Microsoft PowerPoint - lecture18-ch8 OpenGL Texturing Texture Mapping 321190 2007년봄학기 5/25/2007 박경신 OpenGL 에서텍스쳐맵핑 (texture mapping) 을위한 3 단계 텍스쳐활성화 glenable(gl_texture_2d) 텍스쳐맵핑방법 ( 랩핑, 필터등 ) 정의 gltexparameteri(gl_texture_2d, GL_TEXTURE_WRAP_S,

More information

Microsoft Word - cg07-final.doc

Microsoft Word - cg07-final.doc 기말고사 담당교수 : 단국대학교멀티미디어공학전공박경신 답은반드시답안지에기술할것. 공간이부족할경우반드시답안지몇쪽의뒤에있다고명기한후기술할것. 그외의경우의답안지뒤쪽이나연습지에기술한내용은답안으로인정안함. 답에는반드시네모를쳐서확실히표시할것. 성적공고시중간고사때제출한암호를사용할것임. 1. 맞으면 true, 틀리면 false를적으시오. (20점) 1) 은면제거알고리즘중페인터알고리즘

More information

<4D F736F F F696E74202D B3E22032C7D0B1E220C0A9B5B5BFECB0D4C0D3C7C1B7CEB1D7B7A1B9D620C1A638B0AD202D20C7C1B7B9C0D320BCD3B5B5C0C720C1B6C0FD>

<4D F736F F F696E74202D B3E22032C7D0B1E220C0A9B5B5BFECB0D4C0D3C7C1B7CEB1D7B7A1B9D620C1A638B0AD202D20C7C1B7B9C0D320BCD3B5B5C0C720C1B6C0FD> 2006 년 2 학기윈도우게임프로그래밍 제 8 강프레임속도의조절 이대현 한국산업기술대학교 오늘의학습내용 프레임속도의조절 30fps 맞추기 스프라이트프레임속도의조절 프레임속도 (Frame Rate) 프레임속도란? 얼마나빨리프레임 ( 일반적으로하나의완성된화면 ) 을만들어낼수있는지를나타내는척도 일반적으로초당프레임출력횟수를많이사용한다. FPS(Frame Per Sec)

More information

Week3

Week3 2015 Week 03 / _ Assignment 1 Flow Assignment 1 Hello Processing 1. Hello,,,, 2. Shape rect() ellipse() 3. Color stroke() fill() color selector background() 4 Hello Processing 4. Interaction setup() draw()

More information

슬라이드 1

슬라이드 1 2007 년 2 학기윈도우게임프로그래밍 제 7 강프레임속도의조절 이대현 핚국산업기술대학교 학습내용 프레임속도의조절 30fps 맞추기 스프라이트프레임속도의조절 프레임속도 (Frame Rate) 프레임속도란? 얼마나빨리프레임 ( 일반적으로하나의완성된화면 ) 을만들어낼수있는지를나타내는척도 일반적으로초당프레임출력횟수를많이사용핚다. FPS(Frame Per Sec)

More information

Microsoft PowerPoint - lecture11-ch5.ppt [호환 모드]

Microsoft PowerPoint - lecture11-ch5.ppt [호환 모드] Viewing Viewing 329 24 년봄학기 5//24 박경신 관측의기본요소 객체 (Objects) 관측자 (Viewer) 투영선 (Projector) 투영면 (Projection plane) 투영중심 (Center of Projection: COP) COP가유한한경우 투시관측 (Perspectie iews) COP가무한한경우 평행관측 (Parallel

More information

chap7.key

chap7.key 1 7 C 2 7.1 C (System Calls) Unix UNIX man Section 2 C. C (Library Functions) C 1975 Dennis Ritchie ANSI C Standard Library 3 (system call). 4 C?... 5 C (text file), C. (binary file). 6 C 1. : fopen( )

More information

Microsoft PowerPoint D View Class.pptx

Microsoft PowerPoint D View Class.pptx Digital 3D Anthropometry 5. 3D View Class Sungmin Kim SEOUL NATIONAL UNIVERSITY 3D View Class 의설계 3 차원그래픽의개요 Introduction Surface graphics Volume graphics Lighting and shading 3차원모델을 2차원화면에표시하는클래스 Rendering

More information

0503중간고사.dvi

0503중간고사.dvi 서강대학교 공과대학 컴퓨터공학과 CSE4170 기초 컴퓨터 그래픽스 중간고사 1/8 [CSE4170: 기초 컴퓨터 그래픽스] 중간고사 담당교수: 임 인 성 답은 연습지가 아니라 답안지에 기술할 것 있는 변환 행렬은 일반적으로 어떤 좌표계 에서 어떤 좌표계로의 변환을 위하여 사용 하는가? 답안지 공간이 부족할 경우, 답안지 뒷면에 기 술하고, 해당 답안지 칸에

More information

Microsoft PowerPoint - 06-Body Data Class.pptx

Microsoft PowerPoint - 06-Body Data Class.pptx Digital 3D Anthropometry 6. Body Data Class Sungmin Kim SEOUL NATIONAL UNIVERSITY Body Data Class 의설계 Body Model 의관리 인체데이터입출력 데이터불러오기 인체모델그리기 TOpenGL의확장 프로젝트관리 프로젝트저장 / 불러오기 추가기능구현 좌표축정렬 Face, Wireframe,

More information

2011년 10월 초판 c 2011 Sony Corporation. All rights reserved. 서면 허가 없이 전체 또는 일부를 복제하는 것을 금합니다. 기능 및 규격은 통보 없이 변경될 수 있습니다. Sony와 Sony 로고는 Sony의 상표입니다. G L

2011년 10월 초판 c 2011 Sony Corporation. All rights reserved. 서면 허가 없이 전체 또는 일부를 복제하는 것을 금합니다. 기능 및 규격은 통보 없이 변경될 수 있습니다. Sony와 Sony 로고는 Sony의 상표입니다. G L HXR-NX3D1용 3D 워크플로 가이드북 2011년 10월 초판 c 2011 Sony Corporation. All rights reserved. 서면 허가 없이 전체 또는 일부를 복제하는 것을 금합니다. 기능 및 규격은 통보 없이 변경될 수 있습니다. Sony와 Sony 로고는 Sony의 상표입니다. G Lens, Exmor, InfoLITHIUM, Memory

More information

CAD 화면상에 동그란 원형 도형이 생성되었습니다. 화면상에 나타난 원형은 반지름 500인 도형입니다. 하지만 반지름이 500이라는 것은 작도자만 알고 있는 사실입니다. 반지름이 500이라는 것을 클라이언트와 작업자들에게 알려주기 위 해서는 반드시 치수가 필요하겠죠?

CAD 화면상에 동그란 원형 도형이 생성되었습니다. 화면상에 나타난 원형은 반지름 500인 도형입니다. 하지만 반지름이 500이라는 것은 작도자만 알고 있는 사실입니다. 반지름이 500이라는 것을 클라이언트와 작업자들에게 알려주기 위 해서는 반드시 치수가 필요하겠죠? 실무 인테리어를 위한 CAD 프로그램 활용 인테리어 도면 작도에 꼭 필요한 명령어 60개 Ⅷ 이번 호에서는 DIMRADIUS, DIMANGULAR, DIMTEDIT, DIMSTYLE, QLEADER, 5개의 명령어를 익히도록 하겠다. 라경모 온라인 설계 서비스 업체 '도면창고' 대 표를 지낸 바 있으며, 현재 나인슈타인 을 설립해 대표 를맡고있다. E-Mail

More information

Microsoft PowerPoint - [2009] 02.pptx

Microsoft PowerPoint - [2009] 02.pptx 원시데이터유형과연산 원시데이터유형과연산 원시데이터유형과연산 숫자데이터유형 - 숫자데이터유형 원시데이터유형과연산 표준입출력함수 - printf 문 가장기본적인출력함수. (stdio.h) 문법 ) printf( Test printf. a = %d \n, a); printf( %d, %f, %c \n, a, b, c); #include #include

More information

Microsoft PowerPoint - lecture15-ch6.ppt

Microsoft PowerPoint - lecture15-ch6.ppt Lighting OpenGL Lighting OpenGL의조명에는 3가지요소가필요 광원 (Lights) 재질 (Materials) 면의법선벡터 (Normals) 321190 2008년봄학기 5/26/2007 박경신 OpenGL Lighting OpenGL Lighting OpenGL에서제공하는조명모델 환경광 / 주변광 (ambient lights) 점광원 (point

More information

Structure and Interpretation of Computer Programs: Assignment 3 Seung-Hoon Na October 4, George (아래 3개의 문제에 대한 구현이 모두 포함된 george.rkt파일을 제출하시오.

Structure and Interpretation of Computer Programs: Assignment 3 Seung-Hoon Na October 4, George (아래 3개의 문제에 대한 구현이 모두 포함된 george.rkt파일을 제출하시오. Structure and Interpretation of Computer Programs: Assignment 3 Seung-Hoon Na October 4, 2018 1 George (아래 3개의 문제에 대한 구현이 모두 포함된 george.rkt파일을 제출하시오. 실행후 Problem 1.3에 대한 Display결과가 나와야 함) George 그림은 다음과

More information

Microsoft PowerPoint - lecture17-ch8.ppt

Microsoft PowerPoint - lecture17-ch8.ppt OpenGL Texturing Texture Mapping 321190 2007년봄학기 6/2/2007 박경신 OpenGL 에서텍스쳐맵핑 (texture mapping) 을위한 3 단계 텍스쳐활성화 glenable(gl_texture_2d) 텍스쳐맵핑방법 ( 랩핑, 필터등 ) 정의 gltexparameteri(gl_texture_2d, GL_TEXTURE_WRAP_S,

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Text-LCD Device Control - Device driver Jo, Heeseung M3 모듈에장착되어있는 Tedxt LCD 장치를제어하는 App 을개발 TextLCD 는영문자와숫자일본어, 특수문자를표현하는데사용되는디바이스 HBE-SM5-S4210 의 TextLCD 는 16 문자 *2 라인을 Display 할수있으며, 이 TextLCD 를제어하기위하여

More information

(Microsoft PowerPoint - 11\300\345.ppt [\310\243\310\257 \270\360\265\345])

(Microsoft PowerPoint - 11\300\345.ppt [\310\243\310\257 \270\360\265\345]) 입출력 C++ 의효율적인입출력방법을배워보자. 이장에서다룰내용 1 cin 과 cout 을이용한입출력 2 입출력연산자중복 3 조작자생성 4 파일입출력 01_cin 과 cout 을이용한입출력 포맷입출력 C++ 의표준입출력은 cin, cout 을사용한다. C 의 printf 는함수이므로매번여러인자를입력해줘야하지만, cin/cout 에서는형식을한번만정의하면계속사용할수있다.

More information

Microsoft Word - cg09-midterm-answer.doc

Microsoft Word - cg09-midterm-answer.doc 중간고사 담당교수 : 단국대학교멀티미디어공학전공박경신 답은반드시답안지에기술할것. 공간이부족할경우반드시답안지몇쪽의뒤에있다고명기한후기술할것. 그외의경우의답안지뒤쪽이나연습지에기술한내용은답안으로인정안함. 답에는반드시네모를쳐서확실히표시할것. 답안지에학과, 학번, 이름외에본인의암호를기입하면성적공고시학번대신암호를사용할것임. 1. 맞으면 true, 틀리면 flse를적으시오.

More information

(Microsoft PowerPoint - 07\300\345.ppt [\310\243\310\257 \270\360\265\345])

(Microsoft PowerPoint - 07\300\345.ppt [\310\243\310\257 \270\360\265\345]) 클래스의응용 클래스를자유자재로사용하자. 이장에서다룰내용 1 객체의치환 2 함수와클래스의상관관계 01_ 객체의치환 객체도변수와마찬가지로치환이가능하다. 기본예제 [7-1] 객체도일반변수와마찬가지로대입이가능하다. 기본예제 [7-2] 객체의치환시에는조심해야할점이있다. 복사생성자의필요성에대하여알아보자. [ 기본예제 7-1] 클래스의치환 01 #include

More information

; struct point p[10] = {{1, 2, {5, -3, {-3, 5, {-6, -2, {2, 2, {-3, -3, {-9, 2, {7, 8, {-6, 4, {8, -5; for (i = 0; i < 10; i++){ if (p[i].x > 0 && p[i

; struct point p[10] = {{1, 2, {5, -3, {-3, 5, {-6, -2, {2, 2, {-3, -3, {-9, 2, {7, 8, {-6, 4, {8, -5; for (i = 0; i < 10; i++){ if (p[i].x > 0 && p[i ; struct point p; printf("0이아닌점의좌표를입력하시오 : "); scanf("%d %d", &p.x, &p.y); if (p.x > 0 && p.y > 0) printf("1사분면에있다.\n"); if (p.x < 0 && p.y > 0) printf("2사분면에있다.\n"); if (p.x < 0 && p.y < 0) printf("3사분면에있다.\n");

More information

쉽게 풀어쓴 C 프로그래밍

쉽게 풀어쓴 C 프로그래밍 제 5 장생성자와접근제어 1. 객체지향기법을이해한다. 2. 클래스를작성할수있다. 3. 클래스에서객체를생성할수있다. 4. 생성자를이용하여객체를초기화할수 있다. 5. 접근자와설정자를사용할수있다. 이번장에서만들어볼프로그램 생성자 생성자 (constructor) 는초기화를담당하는함수 생성자가필요한이유 #include using namespace

More information

2002년 2학기 자료구조

2002년 2학기 자료구조 자료구조 (Data Structures) Chapter 1 Basic Concepts Overview : Data (1) Data vs Information (2) Data Linear list( 선형리스트 ) - Sequential list : - Linked list : Nonlinear list( 비선형리스트 ) - Tree : - Graph : (3)

More information

목차 제 1 장 inexio Touch Driver소개... 3 1.1 소개 및 주요 기능... 3 1.2 제품사양... 4 제 2 장 설치 및 실행... 5 2.1 설치 시 주의사항... 5 2.2 설치 권고 사양... 5 2.3 프로그램 설치... 6 2.4 하드웨

목차 제 1 장 inexio Touch Driver소개... 3 1.1 소개 및 주요 기능... 3 1.2 제품사양... 4 제 2 장 설치 및 실행... 5 2.1 설치 시 주의사항... 5 2.2 설치 권고 사양... 5 2.3 프로그램 설치... 6 2.4 하드웨 최종 수정일: 2010.01.15 inexio 적외선 터치스크린 사용 설명서 [Notes] 본 매뉴얼의 정보는 예고 없이 변경될 수 있으며 사용된 이미지가 실제와 다를 수 있습니다. 1 목차 제 1 장 inexio Touch Driver소개... 3 1.1 소개 및 주요 기능... 3 1.2 제품사양... 4 제 2 장 설치 및 실행... 5 2.1 설치 시

More information

Microsoft PowerPoint - lecture11-ch4.ppt

Microsoft PowerPoint - lecture11-ch4.ppt Geometric Objects and Transformation 321190 2007 년봄학기 4/17/2007 박경신 OpenGL Transformation OpenGL 은기본적인변환을수행하는함수를제공한다. Translation: 이동변환은 3 차원이동변위벡터 (dx, dy, dz) 를넣는다. Rotation: 회전변환은 axis( 회전축 ) 와 angle(

More information

디지털영상처리3

디지털영상처리3 비트맵개요 BMP 파일의이해실제 BMP 파일의분석 BMP 파일을화면에출력 } 비트맵 (bitmap) 윈도우즈에서영상을표현하기위해사용되는윈도우즈 GDI(Graphic Device Interface) 오브젝트의하나 } 벡터그래픽 (vector graphics) 점, 선, 면등의기본적인그리기도구를이용하여그림을그리는방식 } 윈도우즈 GDI(Graphic Device

More information

Microsoft PowerPoint - IP11.pptx

Microsoft PowerPoint - IP11.pptx 열한번째강의카메라 1/43 1/16 Review 2/43 2/16 평균값 중간값 Review 3/43 3/16 캐니에지추출 void cvcanny(const CvArr* image, CvArr* edges, double threshold1, double threshold2, int aperture_size = 3); aperture_size = 3 aperture_size

More information

Microsoft PowerPoint - lecture11-ch4

Microsoft PowerPoint - lecture11-ch4 Geometric Objects and Transformation 321190 2007 년봄학기 4/17/2007 박경신 OpenGL Transformation OpenGL 은기본적인변환을수행하는함수를제공한다. Translation: 이동변환은 3 차원이동변위벡터 (dx, dy, dz) 를넣는다. Rotation: 회전변환은 axis( 회전축 ) 와 angle(

More information

untitled

untitled if( ) ; if( sales > 2000 ) bonus = 200; if( score >= 60 ) printf(".\n"); if( height >= 130 && age >= 10 ) printf(".\n"); if ( temperature < 0 ) printf(".\n"); // printf(" %.\n \n", temperature); // if(

More information

fprintf(fp, "clf; clear; clc; \n"); fprintf(fp, "x = linspace(0, %d, %d)\n ", L, N); fprintf(fp, "U = [ "); for (i = 0; i <= (N - 1) ; i++) for (j = 0

fprintf(fp, clf; clear; clc; \n); fprintf(fp, x = linspace(0, %d, %d)\n , L, N); fprintf(fp, U = [ ); for (i = 0; i <= (N - 1) ; i++) for (j = 0 병렬계산을이용한열방정식풀기. 1. 처음 병렬계산을하기전에 C 언어를이용하여명시적유한차분법으로하나의열방정식을풀어본 다. 먼저 C 로열방정식을이해한다음초기조건만다르게하여클러스터로여러개의열방 정식을풀어보자. 2. C 를이용한명시적유한차분법으로열방적식풀기 열방정식을풀기위한자세한이론은앞서다룬 Finite-Difference method 을보기로하고 바로식 (1.10)

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 03 모델변환과시점변환 01 기하변환 02 계층구조 Modeling 03 Camera 시점변환 기하변환 (Geometric Transformation) 1. 이동 (Translation) 2. 회전 (Rotation) 3. 크기조절 (Scale) 4. 전단 (Shear) 5. 복합변환 6. 반사변환 7. 구조변형변환 2 기하변환 (Geometric Transformation)

More information

Microsoft PowerPoint - chap12-고급기능.pptx

Microsoft PowerPoint - chap12-고급기능.pptx #include int main(void) int num; printf( Please enter an integer: "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; 1 학습목표 가 제공하는 매크로 상수와 매크로

More information

chap8.PDF

chap8.PDF 8 Hello!! C 2 3 4 struct - {...... }; struct jum{ int x_axis; int y_axis; }; struct - {...... } - ; struct jum{ int x_axis; int y_axis; }point1, *point2; 5 struct {....... } - ; struct{ int x_axis; int

More information

디지털영상처리3

디지털영상처리3 비트맵 BMP 파일의 실제 BMP 파일의 BMP 파일을 화면에 개요 이해 분석 출력 } 비트맵 (bitmap) 윈도우즈에서영상을표현하기위해사용되는윈도우즈 GDI(Graphic Device Interface) 오브젝트의하나 } 벡터그래픽 (vector graphics) 점, 선, 면등의기본적인그리기도구를이용하여그림을그리는방식 } 윈도우즈 GDI(Graphic

More information

Open GL

Open GL Graphics OpenGL 컴퓨터그래픽스연구실 GLUT 모델링 정 6 면체 void glutsolidcube(gldouble size); 물체겉면이칠해진형태 void glutwirecube(gldouble size); 물체뼈대만선으로표시 size : 정육면체모서리의길이 GLUT 모델링 원구 void glutsolidsphere(gldouble radius,

More information

강의10

강의10 Computer Programming gdb and awk 12 th Lecture 김현철컴퓨터공학부서울대학교 순서 C Compiler and Linker 보충 Static vs Shared Libraries ( 계속 ) gdb awk Q&A Shared vs Static Libraries ( 계속 ) Advantage of Using Libraries Reduced

More information

À©µµ³×Æ®¿÷ÇÁ·Î±×·¡¹Ö4Àå_ÃÖÁ¾

À©µµ³×Æ®¿÷ÇÁ·Î±×·¡¹Ö4Àå_ÃÖÁ¾ P a 02 r t Chapter 4 TCP Chapter 5 Chapter 6 UDP Chapter 7 Chapter 8 GUI C h a p t e r 04 TCP 1 3 1 2 3 TCP TCP TCP [ 4 2] listen connect send accept recv send recv [ 4 1] PC Internet Explorer HTTP HTTP

More information

Microsoft PowerPoint - 3ÀÏ°_º¯¼ö¿Í »ó¼ö.ppt

Microsoft PowerPoint - 3ÀÏ°_º¯¼ö¿Í »ó¼ö.ppt 변수와상수 1 변수란무엇인가? 변수 : 정보 (data) 를저장하는컴퓨터내의특정위치 ( 임시저장공간 ) 메모리, register 메모리주소 101 번지 102 번지 변수의크기에따라 주로 byte 단위 메모리 2 기본적인변수형및변수의크기 변수의크기 해당컴퓨터에서는항상일정 컴퓨터마다다를수있음 short

More information

슬라이드 1

슬라이드 1 한국산업기술대학교 제 5 강스케일링및회전 이대현교수 학습안내 학습목표 3D 오브젝트의확대, 축소및회전방법을이해한다. 학습내용 3D 오브젝트의확대및축소 (Scaling) 3D 오브젝트의회전 (Rotation) 변홖공갂 (Transform Space) SceneNode 의크기변홖 (Scale) void setscale ( Real x, Real y, Real z)

More information

이장에서다룰내용 테두리를제어하는스타일시트 외부여백 (Margin) 과내부여백 (Padding) 관련속성 위치관련속성 2

이장에서다룰내용 테두리를제어하는스타일시트 외부여백 (Margin) 과내부여백 (Padding) 관련속성 위치관련속성 2 03 장. 테두리여백지정하는속성 이번장에서는테이블, 레이어, 폼양식등의더예쁘게꾸미기위해서 CSS 를이용하여 HTML 요소의테두리속성을바꾸어보자. 이장에서다룰내용 1 2 3 테두리를제어하는스타일시트 외부여백 (Margin) 과내부여백 (Padding) 관련속성 위치관련속성 2 01. 테두리를제어하는스타일시트 속성값설명 border-width border-left-width

More information

chap7.PDF

chap7.PDF 7 Hello!! C 2 . 3 ([] ) < > [ ]; int array[10]; < > [ ][ ]; int array [3] [5]; 4 < > [ ]={ x1,,x10} ( ); (,). ({}). : int array[10]={1,2,3,4,5,6,7,8,9,10}; (" "). : char array[7]="turbo-c"; 5 int array[2][3]={{1,2},{3,4},{5,6}};

More information

歯7장.PDF

歯7장.PDF 7 Hello!! C 2 . 3 ([] ) < > [ ]; int array[10]; < > [ ][ ]; int array [3] [5]; 4 < > [ ]={ x1,,x10} ( ); (,). ({}). : int array[10]={1,2,3,4,5,6,7,8,9,10}; (" "). : char array[7]="turbo-c"; 5 int array[2][3]={{1,2},{3,4},{5,6}};

More information

C++-¿Ïº®Çؼ³10Àå

C++-¿Ïº®Çؼ³10Àå C C++. (preprocessor directives), C C++ C/C++... C++, C. C++ C. C C++. C,, C++, C++., C++.,.. #define #elif #else #error #if #itdef #ifndef #include #line #pragma #undef #.,.,. #include #include

More information

(Microsoft PowerPoint - GEWZKYNMIJWQ.ppt [\310\243\310\257 \270\360\265\345])

(Microsoft PowerPoint - GEWZKYNMIJWQ.ppt [\310\243\310\257 \270\360\265\345]) Geometric Objects and Transformations 4. Scalars, Points, and Vectors Geometric View scalar : a real nmber.7 point : location in space.7,.5,.9 position 만있음. no sie ector : direction magnitde directed line

More information

Chapter_02-3_NativeApp

Chapter_02-3_NativeApp 1 TIZEN Native App April, 2016 Dept. of software Dankook University http://embedded.dankook.ac.kr/~baeksj 목차 2 Tizen EFL Tizen EFL 3 Tizen EFL Enlightment Foundation Libraries 타이젠핵심코어툴킷 Tizen EFL 4 Tizen

More information

제 14 장포인터활용 유준범 (JUNBEOM YOO) Ver 본강의자료는생능출판사의 PPT 강의자료 를기반으로제작되었습니다.

제 14 장포인터활용 유준범 (JUNBEOM YOO) Ver 본강의자료는생능출판사의 PPT 강의자료 를기반으로제작되었습니다. 제 14 장포인터활용 유준범 (JUNBEOM YOO) Ver. 2.0 jbyoo@konkuk.ac.kr http://dslab.konkuk.ac.kr 본강의자료는생능출판사의 PPT 강의자료 를기반으로제작되었습니다. 이번장에서학습할내용 이중포인터란무엇인가? 포인터배열 함수포인터 다차원배열과포인터 void 포인터 포인터는다양한용도로유용하게활용될수있습니다. 2 이중포인터

More information

Microsoft PowerPoint - Zebra ZPL 한글판 명령어 메뉴얼.ppt

Microsoft PowerPoint - Zebra ZPL 한글판 명령어 메뉴얼.ppt Zebra Programming Language (ZPL) 제브라프로그래밍안내서 문자인쇄 예제 1 기준점 10 Cm 1Cm ZEBRA PRINTER 5 Cm 1Cm 진행방향 위와같이 10Cm X 5Cm( 가로세로 ) 크기의라벨이있고기준점으로부터 X.Y 축으로 1Cm 떨어진곳에 ZEBRA PRINTER 를인쇄하고자한다면, 보기 1 ^FO 80,80^AE 21,10^FD

More information

Microsoft PowerPoint - chap13-입출력라이브러리.pptx

Microsoft PowerPoint - chap13-입출력라이브러리.pptx #include int main(void) int num; printf( Please enter an integer: "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; 1 학습목표 스트림의 기본 개념을 알아보고,

More information

Microsoft PowerPoint - lecture12-ch5.ppt [호환 모드]

Microsoft PowerPoint - lecture12-ch5.ppt [호환 모드] Cmer Moveme Vieig 5478 7 년가을학기 //7 단국대학교박경신 OeGL 에서카메라효과를주기위하여 i 함수의시작부분에카메라의움직임에반대되는변환행렬을적용시키면된다. 예를들어 카메라를원점에서 ui 만큼 +Z 로움직이려면 or 를 - ui 만큼움직이면된다. voi i( Projeio = gm::ereive(45. ; Vie = gm::m4(.f; //

More information

0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x = (12 + 6) / 2 * 3; x = 27 x = 3 * (8 / 4

0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x = (12 + 6) / 2 * 3; x = 27 x = 3 * (8 / 4 Introduction to software design 2012-1 Final 2012.06.13 16:00-18:00 Student ID: Name: - 1 - 0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x

More information

class Sale void makelineitem(productspecification* spec, int qty) SalesLineItem* sl = new SalesLineItem(spec, qty); ; 2. 아래의액티비티다이어그램을보고 Java 또는 C ++,

class Sale void makelineitem(productspecification* spec, int qty) SalesLineItem* sl = new SalesLineItem(spec, qty); ; 2. 아래의액티비티다이어그램을보고 Java 또는 C ++, Level 1은객관식사지선다형으로출제예정 1. 다음은 POST(Post of Sales Terminal) 시스템의한콜레보레이션다이어그램이다. POST 객체의 enteritem(upc, qty) 와 Sale 객체의 makellineitem(spec,qty) 를 Java 또는 C ++, C # 언어로구현하시오. 각메소드구현과관련하여각객체내에필요한선언이있으면선언하시오.

More information

Microsoft Word - cg12-midterm-answer

Microsoft Word - cg12-midterm-answer 중간고사 담당교수 : 단국대학교멀티미디어공학전공박경신 답은반드시답안지에기술할것. 공간이부족할경우반드시답안지몇쪽의뒤에있다고명기한후기술할것. 그외의경우의답안지뒤쪽이나연습지에기술한내용은답안으로인정안함. 답에는반드시네모를쳐서확실히표시할것. 답안지에학과, 학번, 이름외에본인의암호를기입하면성적공고시학번대신암호를사용할것임.. 맞으면 true, 틀리면 false를적으시오.

More information

Lab10

Lab10 Lab 10: Map Visualization 2015 Fall human-computer interaction + design lab. Joonhwan Lee Map Visualization Shape Shape (.shp): ESRI shp http://sgis.kostat.go.kr/html/index.html 3 d3.js SVG, GeoJSON, TopoJSON

More information

untitled

untitled 1 hamks@dongguk.ac.kr (goal) (abstraction), (modularity), (interface) (efficient) (robust) C Unix C Unix (operating system) (network) (compiler) (machine architecture) 1 2 3 4 5 6 7 8 9 10 ANSI C Systems

More information

A Hierarchical Approach to Interactive Motion Editing for Human-like Figures

A Hierarchical Approach to Interactive Motion Editing for Human-like Figures 단일연결리스트 (Singly Linked List) 신찬수 연결리스트 (linked list)? tail 서울부산수원용인 null item next 구조체복습 struct name_card { char name[20]; int date; } struct name_card a; // 구조체변수 a 선언 a.name 또는 a.date // 구조체 a의멤버접근 struct

More information

Microsoft PowerPoint - lecture5-ch3 [호환 모드]

Microsoft PowerPoint - lecture5-ch3 [호환 모드] Input and Interaction 321190 2012 년봄학기 3/22/2012 박경신 Overview 입력장치 (Input device) 물리적입력장치 (Physical input devices) Mouse, Keyboard, Trackball 논리적장치 String, Locator, Pick, Choice, Valuators, Stroke device

More information

쉽게 풀어쓴 C 프로그래밍

쉽게 풀어쓴 C 프로그래밍 제 3 장함수와문자열 1. 함수의기본적인개념을이해한다. 2. 인수와매개변수의개념을이해한다. 3. 함수의인수전달방법 2가지를이해한다 4. 중복함수를이해한다. 5. 디폴트매개변수를이해한다. 6. 문자열의구성을이해한다. 7. string 클래스의사용법을익힌다. 이번장에서만들어볼프로그램 함수란? 함수선언 함수호출 예제 #include using

More information

Let G = (V, E) be a connected, undirected graph with a real-valued weight function w defined on E. Let A be a set of E, possibly empty, that is includ

Let G = (V, E) be a connected, undirected graph with a real-valued weight function w defined on E. Let A be a set of E, possibly empty, that is includ 알고리즘설계와분석 (CSE3081(2 반 )) 기말고사 (2016년 12월15일 ( 목 ) 오전 9시40분 ~) 담당교수 : 서강대학교컴퓨터공학과임인성 < 주의 > 답안지에답을쓴후제출할것. 만약공간이부족하면답안지의뒷면을이용하고, 반드시답을쓰는칸에어느쪽의뒷면에답을기술하였는지명시할것. 연습지는수거하지않음. function MakeSet(x) { x.parent

More information

13주-14주proc.PDF

13주-14주proc.PDF 12 : Pro*C/C++ 1 2 Embeded SQL 3 PRO *C 31 C/C++ PRO *C NOT! NOT AND && AND OR OR EQUAL == = SQL,,, Embeded SQL SQL 32 Pro*C C SQL Pro*C C, C Pro*C, C C 321, C char : char[n] : n int, short, long : float

More information

06=( )백낙훈.hwp

06=( )백낙훈.hwp http://dx.doi.org/10.5392/jkca.2013.13.08.044 3 차원그래픽스기하파이프라인기반의래스터파이프라인구현 Raster Pipeline Implementation based on 3D Graphics Geometry Pipelines 백낙훈경북대학교 IT 대학컴퓨터학부 Nakhoon Baek(oceancru@gmail.com) 요약래스터연산은트루컬러이미지

More information

Microsoft PowerPoint - 07-Data Manipulation.pptx

Microsoft PowerPoint - 07-Data Manipulation.pptx Digital 3D Anthropometry 7. Data Analysis Sungmin Kim SEOUL NATIONAL UNIVERSITY Body 기본정보표시 Introduction 스케일조절하기 단면형상추출 단면정보관리 3D 단면형상표시 2 기본정보표시및스케일조절 UI 및핸들러구성 void fastcall TMainForm::BeginNewProject1Click(TObject

More information

단국대학교멀티미디어공학그래픽스프로그래밍기말고사 (2012 년봄학기 ) 2012 년 6 월 12 일학과학번이름 기말고사 담당교수 : 단국대학교멀티미디어공학전공박경신 l 답은반드시답안지에기술할것. 공간이부족할경우반드시답안지몇쪽의뒤에있다고명기한후기술할것. 그외의경우의답안지뒤

단국대학교멀티미디어공학그래픽스프로그래밍기말고사 (2012 년봄학기 ) 2012 년 6 월 12 일학과학번이름 기말고사 담당교수 : 단국대학교멀티미디어공학전공박경신 l 답은반드시답안지에기술할것. 공간이부족할경우반드시답안지몇쪽의뒤에있다고명기한후기술할것. 그외의경우의답안지뒤 기말고사 담당교수 : 단국대학교멀티미디어공학전공박경신 l 답은반드시답안지에기술할것. 공간이부족할경우반드시답안지몇쪽의뒤에있다고명기한후기술할것. 그외의경우의답안지뒤쪽이나연습지에기술한내용은답안으로인정안함. 답에는반드시네모를쳐서확실히표시할것. l 답안지에학과, 학번, 이름외에본인의암호를기입하면성적공고시학번대신암호를사용할것임. 1. 다음은 oglclass 에서제공하는

More information

B _01_M_Korea.indb

B _01_M_Korea.indb DDX7039 B64-3602-00/01 (MV) SRC... 2 2 SRC % % % % 1 2 4 1 5 4 5 2 1 2 6 3 ALL 8 32 9 16:9 LB CD () : Folder : Audio fi SRC 0 0 0 1 2 3 4 5 6 3 SRC SRC 8 9 p q w e 1 2 3 4 5 6 7 SRC SRC SRC 1 2 3

More information

Orcad Capture 9.x

Orcad Capture 9.x OrCAD Capture Workbook (Ver 10.xx) 0 Capture 1 2 3 Capture for window 4.opj ( OrCAD Project file) Design file Programe link file..dsn (OrCAD Design file) Design file..olb (OrCAD Library file) file..upd

More information

Microsoft PowerPoint - ch07 - 포인터 pm0415

Microsoft PowerPoint - ch07 - 포인터 pm0415 함수의인수 (argument) 전달방법 C 에서함수의인수전달방법 값에의한호출 (call-by-value): 기본적인방법 포인터에의한호출 (call-by-pointer): 포인터이용 참조에의한호출 (call-by-reference): 참조 (reference) 이용 7-35 값에의한호출 (call-by-value) 함수호출시에변수의값을함수에복사본으로전달 복사본이전달되며,

More information

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202839C1D6C2F7207E203135C1D6C2F >

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202839C1D6C2F7207E203135C1D6C2F > 10주차 문자 LCD 의인터페이스회로및구동함수 Next-Generation Networks Lab. 5. 16x2 CLCD 모듈 (HY-1602H-803) 그림 11-18 19 핀설명표 11-11 번호 분류 핀이름 레벨 (V) 기능 1 V SS or GND 0 GND 전원 2 V Power DD or V CC +5 CLCD 구동전원 3 V 0 - CLCD 명암조절

More information

Microsoft PowerPoint - lecture16-ch6

Microsoft PowerPoint - lecture16-ch6 Lighting OpenGL Lighting OpenGL의조명에는 3가지요소가필요 광원 (Lights) 재질 (Materials) 면의법선벡터 (Normals) 321190 2007년봄학기 5/15/2007 박경신 OpenGL Lighting OpenGL Lighting OpenGL에서제공하는조명모델 환경광 / 주변광 (ambient lights) 점광원 (point

More information

Motor

Motor Interactive Workshop for Artists & Designers Earl Park Motor Servo Motor Control #include Servo myservo; // create servo object to control a servo int potpin = 0; // analog pin used to connect

More information

Line (A) å j a k= i k #define max(a, b) (((a) >= (b))? (a) : (b)) long MaxSubseqSum0(int A[], unsigned Left, unsigned Right) { int Center, i; long Max

Line (A) å j a k= i k #define max(a, b) (((a) >= (b))? (a) : (b)) long MaxSubseqSum0(int A[], unsigned Left, unsigned Right) { int Center, i; long Max 알고리즘설계와분석 (CSE3081-2반 ) 중간고사 (2013년 10월24일 ( 목 ) 오전 10시30분 ) 담당교수 : 서강대학교컴퓨터공학과임인성수강학년 : 2학년문제 : 총 8쪽 12문제 ========================================= < 주의 > 답안지에답을쓴후제출할것. 만약공간이부족하면답안지의뒷면을이용하고반드시답을쓰는칸에답안지의어느쪽의뒷면에답을기술하였는지명시할것.

More information

HTML5

HTML5 주사위게임 류관희 충북대학교 주사위게임규칙 플레이어 두개의주사위를던졌을때두주사위윗면숫자의합 The First Throw( 두주사위의합 ) 합 : 7 혹은 11 => Win 합 : 2, 3, 혹은 12 => Lost 합 : 4, 5, 6, 8, 9, 10 => rethrow The Second Throw 합 : 첫번째던진주사위합과같은면 => Win 합 : 그렇지않으면

More information