찾아봐도 레지스트리도 없고, 폴더도 없고 흐음.. 그래도 찜찜한데..
기사 업데이트 내용으로 사실무근에 백신 프로그램의 오진이라고 하는데
평소에 하는 짓꺼리가 참으로 이쁘다 보니 믿을수가 있어야 말이지 -_-

[링크 : http://www.kbench.com/news/?cc=62&pr=0&no=98717]
[링크 : http://hummingbird.tistory.com/2880]
    [링크 : http://download.cnet.com/8301-2007_4-20048963-12.html]
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2011. 3. 31. 09:37
아래는 winavr의 iom64.h의 내용중 일부이다
/* Input Pins, Port A */
#define PINA      _SFR_IO8(0x19)

/* Data Direction Register, Port A */
#define DDRA      _SFR_IO8(0x1A)

/* Data Register, Port A */
#define PORTA     _SFR_IO8(0x1B)

정리하자면
PINA는 입력된 값을 읽고
PORTA는 출력할 값을 읽고
DDRA는 그 포트의 방향을 정해준다.

예를들어, UART 같은 경우
TX 값은 PORTA에 쓰고, RX값은 PINA에서 읽는 식이라고 하면 되려나?
Pin* is for read, Port* is for write and DDR* is for direction... 
* = Register ( A, D,C...) 

PIN* is the register you use to read the value on a port if it is an input (so if the corresponding bit in DDR* is '0'). PORT* is used to output values, or to read earlier outputted values back.
 
[링크 : http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=197070]
 


Posted by 구차니
Microsoft/Visual Studio2011. 3. 30. 22:55
비쥬얼 스튜디오에서 아무생각없이 프로젝트를 생성하고
openGL 설정을 하고 컴파일을 하는데 아래와 같은 에러가 발생했다.

링크하고 있습니다...
MSVCRTD.lib(crtexew.obj) :
error LNK2019: _WinMain@16 외부 기호(참조 위치: ___tmainCRTStartup 함수)에서 확인하지 못했습니다.
C:\orbit\Debug\orbit.exe : fatal error LNK1120: 1개의 확인할 수 없는 외부 참조입니다.

아무튼 프로젝트를 생성할때 보면
"Win32 프로젝트" 와


"Win32 콘솔 응용 프로그램" 으로 나뉘는데


Win32 프로젝트는 WinMain() 이 entry 포인트이기 때문에 위와 같은 에러가 발생한다.
정말 독립된 프로그램을 작성한다면 "Win32 콘솔 응용 프로그램"을 선택해야 한다.

Posted by 구차니
개소리 왈왈2011. 3. 30. 19:17
기간은 31일까지이니 필요하신분은 고고싱~

[링크 : http://sqlgate.com/kr/support/sqlgate_survey_event.html]

'개소리 왈왈' 카테고리의 다른 글

쉼표  (6) 2011.04.03
500ml 중 1회 분량 200ml  (0) 2011.04.02
오오 폐건전지를 이래서 수거하는 거였군!  (4) 2011.03.27
내 눈깔  (2) 2011.03.21
허스키 익스프레스 서비스 종료  (0) 2011.03.21
Posted by 구차니
Programming/openGL2011. 3. 30. 07:35
머리를 자른건가 -_-!
절두체(frustum)라는 것은 "평행한 두 평면"으로 잘려진 도형을 의미한다.
예를 들어 직사각형처럼 긴 육면체를 두개의 평면으로 적당하게 잘라서 정육면체로 만들수 있고
원추를 잘라 마름모형 6면체로도 만들수 있다.




간단하게 원근감을 나타내기 위한 방법으로서, 투형되는 공간의 부피를 설정하는 함수이다.
void glFrustum(GLdouble left, GLdouble right,
                      GLdouble bottom, GLdouble top,
                      GLdouble nearVal, GLdouble farVal);

glFrustum describes a perspective matrix that produces a perspective projection.

[링크 : http://www.opengl.org/sdk/docs/man/xhtml/glFrustum.xml] 

그런데... 어떻게 윗면과 아랫면의 크기를 정하지?
무조건 중심점에서 해당 좌표까지의 크기에서 near / far로 자르는걸려나? 
Posted by 구차니
Programming/openGL2011. 3. 29. 23:22
여전히 glPushMatrix / glPopMatrix의 마법은 이해를 하지 못했지만
이녀석이 없으면 이상한 좌표축에서 이상하게 작동하는 것으로 보인다 -_-

아무튼 glPushMatrix 이후에는 추가된 개체를 중심으로
glRotate / glTranslatef 가 수행이 되며 push/pop이라는 용어가 보여주듯
스택에 차곡차곡 쌓이며 추가된 이후의 객체에 대해 적용이 된다.

스택에 들어가는 것과 공간의 변화를 한번 정리해보자면 다음과 같은데

어떻게 보면 Rotate와 Translate는 좌표계 자체를 변경시키며
왜곡된(?) 공간에 개체를 놓으면서 회전을 시키는 식으로 구성이 된 것으로 보인다.

#include "windows.h"
#include "GL/gl.h"
#include "GL/glu.h"
#include "GL/glut.h"

static int year = 0, day = 0;

void display(void)
{
	glClear(GL_COLOR_BUFFER_BIT);
	glColor3f(1.0, 1.0, 1.0);

	glPushMatrix();
		glutWireSphere(1.0, 20, 16);   /* draw sun */

		glRotatef((GLfloat) year, 0.0, 1.0, 0.0);
		glTranslatef(2.0, 0.0, 0.0);
		glRotatef((GLfloat) day, 0.0, 1.0, 0.0);
		glutWireSphere(0.2, 10, 8);    /* draw smaller planet */
	glPopMatrix();

	glutSwapBuffers();
}

void reshape(int w, int h)
{
	glViewport(0, 0, (GLsizei) w, (GLsizei) h); 
	glMatrixMode(GL_PROJECTION);
		glLoadIdentity();
		gluPerspective(60.0, (GLfloat) w/(GLfloat) h, 1.0, 20.0);
	
	glMatrixMode(GL_MODELVIEW); //GL_PROJECTION
		glLoadIdentity();
		gluLookAt(0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
}

void keyboard(unsigned char key, int x, int y)
{
	switch (key)
	{
	  case 'd':
		  day = (day + 10) % 360;
		  glutPostRedisplay();
		  break;
	  case 'D':
		  day = (day - 10) % 360;
		  glutPostRedisplay();
		  break;
	  case 'y':
		  year = (year + 5) % 360;
		  glutPostRedisplay();
		  break;
	  case 'Y':
		  year = (year - 5) % 360;
		  glutPostRedisplay();
		  break;
	  default:
		  break;
	}
}

int main(int argc, char** argv)
{
	glutInit(&argc, argv);
	glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
	glutInitWindowSize(500, 500); 
	glutInitWindowPosition(100, 100);
	glutCreateWindow(argv[0]);

	glClearColor(0.0, 0.0, 0.0, 0.0);
	glShadeModel(GL_FLAT); //GL_SMOOTH

	glutDisplayFunc(display); 
	glutReshapeFunc(reshape);
	glutKeyboardFunc(keyboard);
	glutMainLoop();
	return 0;
}

void glMatrixMode(GLenum mode);
    GL_MODELVIEW  Applies subsequent matrix operations to the modelview matrix stack.
    GL_PROJECTION Applies subsequent matrix operations to the projection matrix stack.
    GL_TEXTURE    Applies subsequent matrix operations to the texture matrix stack.
    GL_COLOR      Applies subsequent matrix operations to the color matrix stack.

void glShadeModel(GLenum mode);
    GL_FLAT     Smooth shading causes the computed colors of vertices to be interpolated as the primitive is rasterized, typically assigning different colors to each resulting pixel fragment.
    GL_SMOOTH   Flat shading selects the computed color of just one vertex and assigns it to all the pixel fragments generated by rasterizing a single primitive. 

void glPushMatrix(void);
void glPopMatrix(void);

void glTranslated(GLdouble x, GLdouble y, GLdouble z);
void glTranslatef(GLfloat x,  GLfloat y,  GLfloat z);

void glutSolidSphere(GLdouble radius, GLint slices, GLint stacks);
void glutWireSphere(GLdouble radius, GLint slices, GLint stacks);

void glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
void glRotatef(GLfloat angle,  GLfloat x,  GLfloat y,  GLfloat z);

void gluPerspective(GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);

void gluLookAt(GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ,
                        GLdouble centerX, GLdouble centerY, GLdouble centerZ,
                        GLdouble upX, GLdouble upY, GLdouble upZ);

[링크 : http://www.opengl.org/sdk/docs/man/xhtml/glTranslate.xml]             glTranslatef
[링크 : http://www.opengl.org/sdk/docs/man/xhtml/glRotate.xml]                 glRotate
[링크 : http://www.opengl.org/sdk/docs/man/xhtml/glShadeModel.xml]        glShadeModel
[링크 : http://www.opengl.org/sdk/docs/man/xhtml/glPushMatrix.xml]          glPushMatrix / glPopMatrix
[링크 : http://www.opengl.org/sdk/docs/man/xhtml/glMatrixMode.xml]         glMatrixMode

[링크 : http://www.opengl.org/sdk/docs/man/xhtml/gluPerspective.xml]        gluPerspective
[링크 : http://www.opengl.org/sdk/docs/man/xhtml/gluLookAt.xml]               gluLookAt

[링크 : http://www.opengl.org/documentation/specs/glut/spec3/node81.html] glutWireSphere 

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

glViewport  (0) 2011.04.05
glFrustum - 절두체  (6) 2011.03.30
openGL callback function - GLUT 키보드 / 마우스 입력  (0) 2011.03.28
freeglut  (0) 2011.03.26
openGL - glbegin()  (2) 2011.03.25
Posted by 구차니
옵저버 같은 홈페이지인데
정부에서 공식발표하는 자료를 이용하여 실시간 업뎃을 한다는데
"정부" 제공이라면 충분히 은폐가 된 정보일 가능성이 높으니 믿어도 될랑가 -_-
[링크 : http://www.stubbytour.com/nuc/index.asp]


아무튼 한국전역에서 방사성 요오드가 발견되었다는 뉘우스~
[링크 : http://photo.media.daum.net/.../view.html?photoid=5414&newsid=20110329140628913&p=yonhap]





이러다가 피로는 간때문이야~ 가 아니라
피로는 핵때문이야~ 이렇게 될듯 -_-



어제 자전거 꼴랑 1시간 탔다고 피곤해진게
자전거 때문이 아닌것 같은 기분탓?!?!? 
Posted by 구차니
Programming/openGL2011. 3. 28. 22:42
freeGLUT가 아닌 이상에는
역시나 GLUT에는 마우스 콜백중 휠관련은 없는건가..

[링크 : http://www.opengl.org/resources/libraries/glut/spec3/node45.html]
    [링크 : http://www.opengl.org/resources/libraries/glut/spec3/node49.html] << 키 입력
    [링크 : http://www.opengl.org/resources/libraries/glut/spec3/node50.html] << 마우스 입력
   [링크 : http://www.opengl.org/resources/libraries/glut/spec3/node54.html] << F1 와 같은 펑션키

glutKeyboardFunc(void (*func)(unsigned char key, int x, int y))
    sets key processing routine
    x and y are mouse coordinates when the key 'key' was pressed
    see glutGetModifiers for state of modifier keys (eg. ctrl,...)

glutSpecialFunc(void (*func)(int key, int x, int y));
 
glutMouseFunc(void (*func)(int button, int state, int x, int y))
    mouse function callback
    button: GLUT_LEFT_BUTTON, GLUT_MIDDLE_BUTTON, GLUT_RIGHT_BUTTON
    state: GLUT_UP, GLUT_DOWN
    x, y: mouse coordinates 
 
[링크 : http://www.cosc.brocku.ca/Offerings/3P98/course/lectures/OpenGL/glut_ref.html]

----
2011.09.29 추가
휠 관련 freeglut 콜백
glutMouseWheelFunc(void( *callback )( int wheel, int direction, int x, int y ));

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

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

glFrustum - 절두체  (6) 2011.03.30
openGL tutorial - 태양과 지구 돌리기  (0) 2011.03.29
freeglut  (0) 2011.03.26
openGL - glbegin()  (2) 2011.03.25
openGL - glortho()  (4) 2011.03.25
Posted by 구차니
무언가를 알아가고 공부하면서
자신에 대해 알게되는 유일한 진리

"아.. 내가 정말 아는게 없구나."




세상은 넓고 강적은 많다지만...(응?)
나이 먹어가면서 깨닫는게 아는게 없다라는 사실 한가지로 수렴해 간다는 사실은
참으로 우울하고 비참하게 만들어가는 것 같다.



그래도 이걸 넘어서야 할텐데 어찌될랑가! 
Posted by 구차니
Terminal High Altitude Area Defense (THAAD), formerly Theater High Altitude Area Defense, is a United States Army system to shoot down short, medium, and intermediate ballistic missilesin their terminal phase using a hit-to-kill approach.

[링크 : http://en.wikipedia.org/wiki/Terminal_High_Altitude_Area_Defense]

패트리어트 가 마하 5인데
THAAD는 2.8km/s 라고 기술해 주는 센스 -_-
대충 계산하면 마하 8~9 정도 되는듯 한데 어디서 UFO라도 주운건가!

[링크 : http://en.wikipedia.org/wiki/MIM-104_Patriot
Posted by 구차니