Programming/openGL2019. 5. 31. 19:02

일단은 소스도 분석을 좀 해봐야지 이해가 잘되려나?

 

[링크 : https://www.mesa3d.org/download.html]

[링크 : https://mesa.freedesktop.org/archive/] gl glx

[링크 : http://ftp://ftp.freedesktop.org/pub/mesa/glu/] glu

[링크 : http://ftp://ftp.freedesktop.org/pub/mesa/glut/] glut

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

openGL superbible 3rd ed. 읽기 시작  (0) 2020.04.03
gluPerspective / gluLookat 소스코드  (0) 2019.06.01
glulookat / gluperspective / glfrustrum / glortho  (0) 2019.05.30
gl model view projection mat  (0) 2019.05.29
gluPerspective()  (0) 2019.05.28
Posted by 구차니
프로그램 사용/nginx2019. 5. 31. 16:51

솔찍히 잘 모르겠네

location 안에 넣으라는데 안되는거 같기도 하고..

try_files $uri $uri/ /index.html;

[링크 : https://wkdtjsgur100.github.io/react-router-deploy/]

 

+

이상한 짓이 되는 느낌인데

react나 angular.js 에서 링크로 되는 부분을 아래처럼 reverse proxy를 통해 돌려주면 되긴 한다.

좀 깔끔하게.. 여러가지 경로에 대해서 보내는 법을 찾아야 할 듯 한데.. 어떻게 해야 하려나?

proxy_pass http://127.0.0.1:4200/index.html?link;

 

+

변수가 있는데 영 안되네.. 후...

[링크 : http://nginx.org/en/docs/http/ngx_http_core_module.html]

[링크 : https://ohgyun.com/622]

 

+

2019.10.11

$args 로 하위 url을 넘겨 줄수 있는 것으로 보임

[링크 : https://www.serverlab.ca/tutorials/linux/web-servers-linux/how-to-configure-nginx-for-angular-and-reactjs/]

Posted by 구차니
Programming/openGL2019. 5. 30. 19:04

다른 유틸리티를 같은 레벨로 봤군...

gluLookAt과 gluPerspective는 카메라를 조작하는 방법인데

glu로 시작하듯 gl Utility 계열이고

gl로 시작하는 glFrustum 과 glOrtho는

프로젝션 뷰를 perspective와 orthogonal로 설정하도록 한다.

 

Name
gluLookAt — define a viewing transformation

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

[링크 : https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluLookAt.xml]

 

Name
gluPerspective — set up a perspective projection matrix

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

[링크 : https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluPerspective.xml]

 

Name
glFrustum — multiply the current matrix by a perspective matrix

C Specification
void glFrustum( GLdouble left,
  GLdouble right,
  GLdouble bottom,
  GLdouble top,
  GLdouble nearVal,
  GLdouble farVal);

[링크 : h]ttps://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glFrustum.xml]

 

Name
glOrtho — multiply the current matrix with an orthographic matrix

C Specification
void glOrtho( GLdouble left,
  GLdouble right,
  GLdouble bottom,
  GLdouble top,
  GLdouble nearVal,
  GLdouble farVal);

[링크 : https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glOrtho.xml]

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

gluPerspective / gluLookat 소스코드  (0) 2019.06.01
gl glx glu glut 소스코드  (0) 2019.05.31
gl model view projection mat  (0) 2019.05.29
gluPerspective()  (0) 2019.05.28
glfw3 in ubuntu 19.04  (0) 2019.05.10
Posted by 구차니
embeded/raspberry pi2019. 5. 30. 18:29

 

[링크 : http://www.python-exemplary.com/index_en.php?inhalt_links=navigation_en.inc.php&inhalt_mitte=raspi/en/bluetooth.inc.php]

[링크 : https://www.raspberrypi.org/forums/viewtopic.php?t=181792]

 

$ hciconfig -a
hci0: Type: Primary  Bus: USB
BD Address: 40:2C:F4:DB:D9:97  ACL MTU: 1021:8  SCO MTU: 64:1
UP RUNNING PSCAN ISCAN 
RX bytes:697 acl:0 sco:0 events:55 errors:0
TX bytes:5299 acl:0 sco:0 commands:53 errors:0
Features: 0xff 0xff 0x8f 0xfe 0x9b 0xff 0x79 0x83
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
Link policy: RSWITCH HOLD SNIFF PARK 
Link mode: SLAVE ACCEPT 
Name: 'mini2760'
Class: 0x1c010c
Service Classes: Rendering, Capturing, Object Transfer
Device Class: Computer, Laptop
HCI Version: 2.1 (0x4)  Revision: 0x132
LMP Version: 2.1 (0x4)  Subversion: 0x4203
Manufacturer: Broadcom Corporation (15)

[링크 : https://www.instructables.com/id/Turn-the-Raspberry-Pi-into-a-Bluetooth-Device/] << 

[: https://www.instructables.com/id/Install-Bluetooth-in-Linux-System/]

 

[링크 : https://raspberrypi.stackexchange.com/questions/47708/setup-raspberry-pi-3-as-bluetooth-speaker]

 

+

Setting Up Bluetooth Serial Port Profile on Raspberry Pi using sdptool

[링크 : https://scribles.net/setting-up-bluetooth-serial-port-profile-on-raspberry-pi/]

 

app

[링크 : https://play.google.com/store/apps/details?id=de.kai_morich.serial_bluetooth_terminal&hl=en_US]

'embeded > raspberry pi' 카테고리의 다른 글

sd formatter 바뀌었네?  (0) 2019.07.23
라즈베리 파이 2 lakka 설정  (1) 2019.07.23
라즈베리 파이 3.5인치 모니터(SPI)  (0) 2019.04.17
rpi bt  (0) 2019.04.08
라즈베리 파이 3b 외장 안테나 부품 실장 관련  (0) 2019.04.05
Posted by 구차니
프로그램 사용/docker2019. 5. 30. 17:18

아무생각이 없으니 이렇게 했겠지만..

docker create를 통해서 다운로드 받은 이미지를

컨테이너로 생성하는데 아무생각 없이 계속 create를 하니 계속 생겨날줄 알았는데 하나만 생겨난다.

$ sudo docker create atmoz/sftp
0eccda7b1d98f8a1c0330eaa6c8a507c7e4f8a52b65bc9667425be0b1b26dc94

$ sudo docker container ls
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

$ sudo docker create atmoz/sftp
1ff507e5604be9a49cc235137eef12accfe8385c098b5a980089b6badc5398aa

$ sudo docker container ls -all
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
1ff507e5604b        atmoz/sftp          "/entrypoint"       9 seconds ago       Created                                 suspicious_colden

$ sudo docker create atmoz/sftp
cbc11639cbb8263621b2106ecd9c50e265924052f620245a477e00e08c30cdbb

$ sudo docker container ls -all
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
cbc11639cbb8        atmoz/sftp          "/entrypoint"       2 seconds ago       Created                                 xenodochial_goldstine

 

그래서 테스트 하고 나서 삭제하려는데 어라?

지워도 지워도 계속 생겨난다 -ㅁ-?

 

$ sudo docker ps -all
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
1ff507e5604b        atmoz/sftp          "/entrypoint"       7 minutes ago       Created                                 suspicious_colden

$ sudo docker rm 1ff507e5604b
1ff507e5604b

$ sudo docker ps -all
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
0eccda7b1d98        atmoz/sftp          "/entrypoint"       8 minutes ago       Created                                 hopeful_hugle

$ sudo docker rm 0eccda7b1d98
0eccda7b1d98

$ sudo docker ps -all
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

 

의도된 작동인지 버그인지 내가 착각하는건지 모르겠네 -ㅁ-?

 

요약)

1. create로 container 생성시 계속 생겨나지만 가장 최신 녀석만 목록에 나옴

2. rm으로 container 삭제시에도 fifo 처럼 마지막에 생성된 녀석들의 이름만 나옴

'프로그램 사용 > docker' 카테고리의 다른 글

docker ps 옵션 차이  (0) 2019.06.11
docker 컨테이너 이미지 이름으로 검색하기  (0) 2019.06.10
docker 자원 제한하기  (0) 2019.05.17
docker exited  (0) 2019.05.17
docker start run attach  (0) 2019.05.17
Posted by 구차니
Programming/node.js2019. 5. 29. 17:56

별다른 설정없이 해서 그런가

아니면 SSHD의 효과로 캐싱이 되서 그런가 속도 단축되지 않네..

 

$ time npm run build

real    0m54.356s
user    1m14.008s
sys     0m1.938s

 

$ time npm-run-all build

real    0m20.614s
user    0m26.791s
sys     0m0.973s

 

$ time npm run build

real    0m20.614s 
user    0m26.791s 
sys     0m0.973s 

 

[링크 : https://www.npmjs.com/package/npm-run-all]

'Programming > node.js' 카테고리의 다른 글

electron ipc  (0) 2019.06.07
electron.js  (0) 2019.06.03
pdf 내용 추출  (0) 2019.05.27
node.js express 301 redirect  (0) 2019.05.15
node.js 항목 확인  (0) 2019.04.23
Posted by 구차니
Programming/openGL2019. 5. 29. 08:06

오랫만에 다시 보니 기억이 하나도 안나네.. 큭...

행렬부터 다시 공부해야하나?

 

[링크  : http://www.opengl-tutorial.org/kr/beginners-tutorials/tutorial-3-matrices/]

[링크  : https://solarianprogrammer.com/2013/05/22/opengl-101-matrices-projection-view-model/]

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

gl glx glu glut 소스코드  (0) 2019.05.31
glulookat / gluperspective / glfrustrum / glortho  (0) 2019.05.30
gluPerspective()  (0) 2019.05.28
glfw3 in ubuntu 19.04  (0) 2019.05.10
openGL vao(Vertex Array Object)  (0) 2019.05.07
Posted by 구차니
Programming/openGL2019. 5. 28. 19:04

오랫만에 다시 공부하게 되네 후..

일단 위의 함수는 z값에 대한 Near와 Far 값이 존재하는데

둘다 양수여야 하고 0 이상의 값을 가져야 한다.

(그걸 모르고 예전엔 0을 넣고 왜 안되는 거야! 하고 있었으니..)

zNear

Specifies the distance from the viewer to the near clipping plane (always positive).

zFar

Specifies the distance from the viewer to the far clipping plane (always positive).

Notes

Depth buffer precision is affected by the values specified for zNear and zFar. The greater the ratio of zFar to zNear is, the less effective the depth buffer will be at distinguishing between surfaces that are near each other. If

r = zFar zNear

roughly log 2  r bits of depth buffer precision are lost. Because r approaches infinity as zNear approaches 0, zNear must never be set to 0.

[링크 : https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluPerspective.xml]

 

실제코드인진 모르겠지만

znear가 0 이면, ymax xmax가 다 0이 되네

// Matrix will receive the calculated perspective matrix.
// You would have to upload to your shader
// or use glLoadMatrixf if you aren't using shaders.
void glhPerspectivef2(float *matrix, float fovyInDegrees, float aspectRatio,
                      float znear, float zfar)
{
    float ymax, xmax;
    float temp, temp2, temp3, temp4;
    ymax = znear * tanf(fovyInDegrees * M_PI / 360.0);
    // ymin = -ymax;
    // xmin = -ymax * aspectRatio;
    xmax = ymax * aspectRatio;
    glhFrustumf2(matrix, -xmax, xmax, -ymax, ymax, znear, zfar);
}

 

DIV/0의 향연이니.. 아마 입력 단계에서 zNear / nFar가 0이면 계산을 하지 않도록 할지도?

void glhFrustumf2(float *matrix, float left, float right, float bottom, float top,
                  float znear, float zfar)
{
    float temp, temp2, temp3, temp4;
    temp = 2.0 * znear;
    temp2 = right - left;
    temp3 = top - bottom;
    temp4 = zfar - znear;
    matrix[0] = temp / temp2;
    matrix[1] = 0.0;
    matrix[2] = 0.0;
    matrix[3] = 0.0;
    matrix[4] = 0.0;
    matrix[5] = temp / temp3;
    matrix[6] = 0.0;
    matrix[7] = 0.0;
    matrix[8] = (right + left) / temp2;
    matrix[9] = (top + bottom) / temp3;
    matrix[10] = (-zfar - znear) / temp4;
    matrix[11] = -1.0;
    matrix[12] = 0.0;
    matrix[13] = 0.0;
    matrix[14] = (-temp * zfar) / temp4;
    matrix[15] = 0.0;
}

[링크 : https://www.khronos.org/opengl/wiki/GluPerspective_code]

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

glulookat / gluperspective / glfrustrum / glortho  (0) 2019.05.30
gl model view projection mat  (0) 2019.05.29
glfw3 in ubuntu 19.04  (0) 2019.05.10
openGL vao(Vertex Array Object)  (0) 2019.05.07
glfw - gl framework  (0) 2019.05.07
Posted by 구차니
개소리 왈왈/자전거2019. 5. 28. 12:42

1. 나가다가 핸폰 떨궈서 S펜 뽀개먹음..

뽀각~

 

일단은.. 순간접착제로 해놨는데 접합부가 적어서 힘을 못 받을것 같으니 최대한 오래 마르도록 냅둬야겠다..

예전에 3만원 한 것 같은데, 찾아보니 많이 착해진 듯?

 

[링크 : http://itempage3.auction.co.kr/DetailView.aspx?itemno=B370174078]

 

2. 엘리베이터 기다리다 앞 기어에 다리 찍혀서 피 철철

 

아놔.. 무슨 날이냐...

 

'개소리 왈왈 > 자전거' 카테고리의 다른 글

오랫만에 자전거  (0) 2020.05.06
자전거 대행진  (0) 2019.06.09
2019 자전거 대행진 신청!  (2) 2019.04.24
2019 서울 자전거 대행진!  (2) 2019.04.23
출근길 광고전단 - 바이크파크 + 자전거  (2) 2019.04.03
Posted by 구차니
Linux API/linux2019. 5. 27. 19:09

xrandr을 이용해서 하거나 iio 관련해서 찾아보는데

어떠한 데몬이 어떤 키값을 통해서 작동을 하는지 감이 안온다.

 

/lib/udev/hwdb.d/60-keyboard.hwdb

 

키값을 읽어오는 명령어인데 회전 키를 누르면 두개가 뜬다. 도대체 어떤 키지?

$ sudo showkey -s
kb mode was ?UNKNOWN?
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...

0x6b 0xeb 
0x6b 0xeb 
0x6b 0xeb 

[링크 : https://unix.stackexchange.com/questions/49650/how-to-get-keycodes-for-xmodmap]

'Linux API > linux' 카테고리의 다른 글

open() read() write() close()를 이용한 cp 예제  (0) 2020.09.28
fopen64  (0) 2019.06.24
전원버튼 IRQ 발생 관련  (0) 2018.04.23
linux kernel governor 관련 코드  (0) 2018.04.17
linux shared memory 관련  (0) 2016.12.22
Posted by 구차니