본문 바로가기

Homogeneous transformation Homogeneous transform (http://web.cs.iastate.edu/~cs577/handouts/homogeneous-transform.pdf) Local transformation: post-multiplication Global transformation: pre-multiplication main%% Linear Algebra things%% 1. Make T from three points 'ps2R'% 2, Local transformation (translation + rotation): post-multiplication%ccc%% 1. Make T from three points 'ps2R'ccc p1 = -1+2*rand(1,3);p2 = -1+2*rand(1,3);p.. 더보기
Compute the distance from the cube and a point Compute the distance from the point and the cube. Here, we use the method from:https://math.stackexchange.com/questions/2133217/minimal-distance-to-a-cube-in-2d-and-3d-from-a-point-lying-outside Followings are the MATLAB implementation of this method. Results:Codes:mian.m% Initialize the cube informationt = rand(1,3);xyz_min = 1.0+rand(1,3);xyz_len = 1.0+rand(1,3);R = eye(3,3); % Get costsn = 5e.. 더보기
오랜만 오랜만의 이런 일기 한 4일 째 새벽 4시가 넘어서 잠에드는 것 같다. 한 달 동안 해야하는 것을 1주일도 안되는 시간에 하려니, 이렇게 된다. 어쩔 수 없지. 다들 각자의 사정이 있는 것이니까. 시간이 지나면 지날 수록 꼰대가 되지 않기 위한 노력을 더 많이 해야함을 느낀다. 점점 말은 줄이고, 욕심도 줄이고, 더 많이 듣고, 더 많이 이해를 하려고 해야한다. 누구나 전성기가 있다. 모가 되었던 자기의 커리어 하이는 있는 것이니까. 여러 의미의 전성기가 있을 것이다. 체력의 전성기, 인맥의 전성기, 재력의 전성기. 모가 되었던, 과거를 돌아보며, 현재를 직시하지 못하면 끝이다. 결국 중요한건, 나 스스로 얼마나 잘 할 수 있느냐이다. 의존과 협업은 언제나 한끝 차이이다. 그리고 그 미묘한 경계선이 욕심.. 더보기
Socket communication between MATLAB and Python MATLAB sideccc%% Socket communication with Python% This is Server-side (so run this first).ccc % Open Socketip = '0.0.0.0';port = 2002;fprintf('Socket openning @%s:%d ... ',ip,port);t = tcpip(ip, port, 'NetworkRole','server');fopen(t);fprintf('Opened.\n');tick = 0; while true % Read from socket (wait here) while t.BytesAvailable == 0, WAIT=true; end data = fread(t, t.BytesAvailable); string = ch.. 더보기