Programming/openGL2015. 7. 22. 19:24

openGL Super bible에 보이진 않아서 찾아보니 명확하게!


Even

T=[n-1 n-2 n]


Odd

T=[n-2 n-1 n]


[링크 : http://www.matrix44.net/cms/notes/opengl-3d-graphics/understanding-gl_triangle_strip]

'Programming > openGL' 카테고리의 다른 글

myAHRS cube 예제  (0) 2016.02.02
openCV <-> openGL  (0) 2015.09.24
openGL super bible 3rd ed - 깊이, 은면처리  (0) 2015.07.21
openGL super bible 3rd ed - 점선면 관련  (0) 2015.07.21
glColor*  (0) 2015.07.20
Posted by 구차니

극좌표계를 확장해서

원통좌표계, 구면좌표계가 나왔다고 한다.


일단.. 극좌표계는 (r, theta)로 표현하는데

완통좌표계(r, theta, z)도 구면좌표계(r, theta, phi)는 같은 방법으로 각도와 거리로 나타내니까...


[링크 : https://en.wikipedia.org/wiki/Polar_coordinate_system]

  [링크 : https://ko.wikipedia.org/wiki/극좌표계]

[링크 : https://en.wikipedia.org/wiki/Spherical_coordinate_system]

  [링크 : https://ko.wikipedia.org/wiki/구면좌표계]

[링크 : https://en.wikipedia.org/wiki/Cylindrical_coordinate_system]

  [링크 : https://ko.wikipedia.org/wiki/원통좌표계]

'이론 관련 > 3D 그래픽 관련' 카테고리의 다른 글

path tracing - rendering  (0) 2016.12.14
visual SLAM - Simultaneous Localization and Mapping  (0) 2016.03.10
극좌표계 / 구면좌표계  (0) 2013.03.26
shader  (0) 2011.11.20
vertex normal - 버텍스 노말  (0) 2011.10.13
Posted by 구차니
Programming/openGL2015. 7. 21. 22:23

depth 테스트 - 픽셀별 계산으로 부하가 많음

glutInitDisplayMode(GLUT_DEPTH);

glEnable(GL_DEPTH_TEST);

glClear(GL_DEPTH_BUFFER_BIT);

glDepthMask(bMask);



cull - 법선벡터의 방향으로 면을 추려냄

glEnable(GL_CULL_FACE);

glFrontFace(GL_CCW); // default

glFrontFace(GL_CW);

삼각형이나 폴라곤 그릴시 와인딩이 중요


'Programming > openGL' 카테고리의 다른 글

openCV <-> openGL  (0) 2015.09.24
openGL triangle winding  (0) 2015.07.22
openGL super bible 3rd ed - 점선면 관련  (0) 2015.07.21
glColor*  (0) 2015.07.20
우분투에서 openGL 시작하기  (0) 2015.07.20
Posted by 구차니
Programming/openGL2015. 7. 21. 21:51

// 점

glGetFloatv(GL_POINT_SIZE_RANGE);

glGetFloatv(GL_POINT_SIZE_GRANULARITY);

glPointSize(pointsize);

glBegin(GL_POINTS);

glVertex3f(0.0, 0.0, 0.0);

glEnd();


// 선

glGetFloatv(GL_LINE_WIDTH_RANGE);

glGetFloatv(GL_LINE_WIDTH_GRANULARITY);

glLineWidth(linewidth);

glBegin(GL_LINES);

glVertex3f(0.0, 0.0, 0.0);

glVertex3f(1.0, 0.0, 0.0);

glEnd();


// 점선

glEnable(GL_LINE_STIPPLE);

glLineStipple(factor, pattern);




// 폴리곤 평면채우기(각도에 변하지 않는 패턴반복)

glEnable(GL_POLYGON_STIPPLE);

glPolygonStipple(pBitmap); // 32x32 bitmap


'Programming > openGL' 카테고리의 다른 글

openGL triangle winding  (0) 2015.07.22
openGL super bible 3rd ed - 깊이, 은면처리  (0) 2015.07.21
glColor*  (0) 2015.07.20
우분투에서 openGL 시작하기  (0) 2015.07.20
GL2PS : an OpenGL to PostScript printing library  (0) 2014.03.06
Posted by 구차니


class wizard 라고 해야하나?

VC에서는 별도로 있었는데 여기는 위에 있었구만 -_-

암튼 상단에서 Form 중 원하는 핸들러를 선택하면 함수가 추가 똮!


그리고 속성에서 Form의 KeyPreview를 True로 해주어야 한다고 한다.


아무튼.. 디버깅으로 입력받는 키를 찾아보니 아래와 같은 숫자가 나온다.

Private Sub Form1_KeyDown(KeyCode As Integer, Shift As Integer)

    Select Case KeyCode

        Case 37: 'left

        Case 38: ' up

        Case 40: ' down

        Case 39: ' right

        Case 107: ' +

        Case 109: ' -

    End Select

End Sub


Private Sub Form1_KeyUp(KeyCode As Integer, Shift As Integer)


End Sub 


[링크 : http://www.vbforums.com/showthread.php?367165-VB6-Using-the-KeyDown-Event]

Posted by 구차니
Programming/openGL2015. 7. 20. 22:03

glColor의 경우 클램프되어 있는 변수는 아니나

내부적으로 clamp 되어 사용이 된다.


void glColor3f( GLfloat red, GLfloat green, GLfloat blue )


Neither floating-point nor signed integer values are clamped to the range [0,1] before the current color is updated. However, color components are clamped to this range before they are interpolated or written into a color buffer.

[링크 : http://linux.die.net/man/3/glcolor3f]



void glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )

[링크 : http://linux.die.net/man/3/glclearcolor]

Posted by 구차니
Programming/openGL2015. 7. 20. 21:48

예전에 컴파일 하는법이랑 다 적은거 같은데..

다 어디로 갔지? ㅠㅠ


$ sudo apt-get install freeglut3-dev

$ gcc -lglut -lm -lGL -lGLU test.c


[링크 : http://ubuntuforums.org/showthread.php?t=345177]


2011/09/07 - [Linux/Ubuntu] - ubuntu 에서 openGL 프로그래밍하기

2012/06/02 - [Programming/openGL] - openGL gcc에서 컴파일 하기


'Programming > openGL' 카테고리의 다른 글

openGL super bible 3rd ed - 점선면 관련  (0) 2015.07.21
glColor*  (0) 2015.07.20
GL2PS : an OpenGL to PostScript printing library  (0) 2014.03.06
openGL state variables  (0) 2013.12.12
openGL에서 AVI 동영상 재생하기  (0) 2013.04.09
Posted by 구차니
Programming/lisp2015. 7. 19. 22:36

(read)



.. 먼가 허무하네? -_-a


[링크 : http://www.tutorialspoint.com/lisp/lisp_input_output.htm]

'Programming > lisp' 카테고리의 다른 글

lisp 예제  (0) 2014.04.05
lisp 반복문 dolist, dotimes, do  (0) 2013.01.30
lisp cond  (0) 2013.01.28
lisp when/unless macro  (2) 2013.01.28
lisp 명령어 if progn  (0) 2013.01.28
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2015. 7. 19. 22:25

어드레스 맵 구조 까지 나오는 예제가 있으면 좋으련만...

그나저나 SDA, SCL에 풀업을 꼭 달으라네..


[링크 : http://electronicsdo.tistory.com/entry/I2C-The-I2C-of-ATmega128]

SCL 과 SDA 단자는 오픈 콜렉터 또는 오픈 드레인 방식으로 되어 있어 Wired-AND 기능을 합니다. 이 단자는 외부에 풀업 저항(수 K 오옴) 을 연결해 주어야 합니다.

[링크 : http://cafe.daum.net/_c21_/bbs_search_read?grpid=lH2L&fldid=GSYT&datanum=85]


SDA,SCL핀에 풀업저항을 꼭 달아줍니다.

[링크 : http://openctrl.tistory.com/entry/I2C-TWI]


자체 Pull-Up 저항은

30-50kΩ 정도로 저항치가 좀 높은 편이라서, 실제로 Data 와 Clock 라인에는

4.7kΩ 정도로 따로 Pull-Up 저항을 걸어두는 편이 좋습니다.

[링크 : http://egloos.zum.com/bellona/v/1345440]

'embeded > AVR (ATmega,ATtiny)' 카테고리의 다른 글

USART UBRR error rate  (0) 2015.07.29
avr-libc 8bit AVR C++  (0) 2015.07.28
atmega128 gpio 인터럽트 데이터시트 내용  (0) 2015.07.18
AVR Studio / AVRdude 연동  (0) 2015.03.12
AVRISP 호환 제품 ?  (0) 2015.03.11
Posted by 구차니
파일방2015. 7. 19. 22:06

임베디드 쪽이라던가 조금 뜨는(?) 녀석 같은데..

lighttpd 등과 비교해서 머가 우위일려나...


[링크 : https://embedthis.com/goahead/]

[링크 : http://egloos.zum.com/sharkynara/v/1485910]





GoAhead is only 115K of code

[링크 : https://embedthis.com/goahead/overview.html]


HTTP Server Engine

Full HTTP/1.1 support

Single-threaded, event-based server


Performance

Request throughput (> 10,000 requests per second)

Event-based core for efficient processing of multiple requests

Small memory footprint: 115K code


Dynamic Content

Server-Side JavaScript

CGI/1.1

GoActions — In-memory URL actions

Custom C Handlers


Javascript Templates (JST)

Web page templating engine

Embedded Javascript (subset) in HTML pages

Fast, automatic reloading of updated web pages

Ajax View Controls with jQuery support

Session state management


Developer Support

Extensive C API


Embedding Support

Supports ARM, MIPS, X86, PPC and Sparc processors

Execute from ROM (XIP)


Standards

HTTP/1.1

CGI/1.1

[링크 : https://embedthis.com/goahead/specs.html]



Linux Appliance Design: A Hands-on Guide to Building Linux Appliances

lighttpd 1.4.14

goahead 2.1.8

비교 우위 정하기 모호한.. 테이블 내용

[링크 : https://books.google.co.kr/books...]


'파일방' 카테고리의 다른 글

라즈베리 파이 오디오 스트리밍 관련 문서  (0) 2015.09.18
HelpNDoc  (0) 2015.07.29
OMV - Opensource Media Valut  (0) 2015.07.15
freetype / jam  (0) 2015.06.25
knime - 빅데이터 분석툴  (0) 2015.05.28
Posted by 구차니