슬라이드 제목 없음 - seoul national...

52
PostScript Language 서울대학교 컴퓨터공학부 김명수 http://cse.snu.ac.kr/mskim http://3map.snu.ac.kr

Upload: others

Post on 20-Sep-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript Language

서울대학교 컴퓨터공학부 김명수

http://cse.snu.ac.kr/mskim http://3map.snu.ac.kr

Page 2: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript Language

• Adobe사에서 개발한 페이지 서술 언어 • 2차원 정적 그래픽스 라이브러리 • 주로 레이저 프린터 출력용으로 많이 사용 • 스택기반의 언어 • “2 3 +”과 같은 형태의 Postfix 문법을 사용

Page 3: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 관련 사이트

• BLUE BOOK을 얻는 사이트 http://www-cdf.fnal.gov/offline/PostScript/BLUEBOOK.PDF • BLUE BOOK의 예제들을 얻는 사이트 http://www.science.uva.nl/~robbert/ps/bluebook/ • AFPL Ghostscript와 GSview를 얻는 사이트 http://www.cs.wisc.edu/~ghost

Page 4: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

BLUE BOOK

Page 5: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 예제

Page 6: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 프로그램 예제

Page 7: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 스택

Page 8: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 연산

Page 9: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 연산

Page 10: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 연산

Page 11: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 연산

Page 12: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 연산

Page 13: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 연산

Page 14: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 연산

Page 15: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 연산

Page 16: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

스택 처리

Page 17: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 그래픽스

Page 18: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 그래픽스

Page 19: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 그래픽스

Page 20: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 그래픽스

Page 21: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 그래픽스

Page 22: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 그래픽스

Page 23: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 그래픽스

Page 24: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 변수

Page 25: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 변수

Page 26: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 프러시저

Page 27: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 프러시저

Page 28: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 프러시저

Page 29: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 폰트

Page 30: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 문자열

Page 31: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 문자열

Page 32: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

PostScript 폰트

Page 33: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

사용된 프러시저들

Page 34: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

명함 글자의 폰트정의

Page 35: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

명함 테두리

Page 36: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

명함 내용

Page 37: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

좌표변환 (평행이동)

Page 38: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

좌표변환 (평행이동)

Page 39: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

좌표변환 (회전이동)

Page 40: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

좌표변환 (회전이동)

Page 41: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

좌표변환 (크기변환)

Page 42: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

좌표변환 (크기변환)

Page 43: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

원호그리기

Page 44: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

원과 타원

Page 45: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

원호로 모서리 깍기

Page 46: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

원호로 모서리 깍기

Page 47: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

클리핑

Page 48: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

클리핑 경로설정

Page 49: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

문자열로 클리핑한 경우

Page 50: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

선분의 끝부분 마무리

Page 51: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

선분의 연결부분 마무리

Page 52: 슬라이드 제목 없음 - Seoul National University3map.snu.ac.kr/courses/2013/cg/Postscript.pdf · Define procedures--- {72 mul} def /box % stack: x y = { newpath moveto 1 inch

점선 그리기