레이블이 Math인 게시물을 표시합니다. 모든 게시물 표시
레이블이 Math인 게시물을 표시합니다. 모든 게시물 표시

2016년 11월 4일 금요일

AxisAngle to Quaternion



qx = ax * sin(angle/2)
qy = ay * sin(angle/2)
qz = az * sin(angle/2)
qw = cos(angle/2)

where:

the axis is normalised so: ax*ax + ay*ay + az*az = 1
the quaternion is also normalised so cos(angle/2)2 + ax*ax * sin(angle/2)2 + ay*ay * sin(angle/2)2+ az*az * sin(angle/2)2 = 1


// assumes axis is already normalised
public void set(AxisAngle4d a1) {
  double s = Math.sin(a1.angle/2);
  x = a1.x * s;
  y = a1.y * s;
  z = a1.z * s;
  w = Math.cos(a1.angle/2);
}


http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToQuaternion/

2016년 4월 9일 토요일

MathJS project in the MFC environment.

A VS6 Project for testing MathJS script in the MFC environment.
@Pittsburgh, December 12, 2011




2015년 12월 5일 토요일

치타 무늬에 담긴 수학


Turing, Alan Mathison. "The chemical basis of morphogenesis." Philosophical Transactions of the Royal Society of London B: Biological Sciences 237.641 (1952): 37-72.

http://rstb.royalsocietypublishing.org/content/royptb/237/641/37.full.pdf

2014년 7월 6일 일요일

atan2

The atan2 function takes into account the signs of both vector components, and places the angle in the correct quadrant.



The following expression derived from the tangent half-angle formula can also be used to define atan2.




from http://en.wikipedia.org/wiki/Atan2

2014년 2월 8일 토요일

Cauchy-Lorentz Distribution


Cauchy-Lorentz distribution has "heavier tails" than the Gaussian distribution.


Implementation in Boost library:
http://www.boost.org/doc/libs/1_36_0/libs/math/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/cauchy_dist.html



2014년 1월 24일 금요일

Cholesky Decomposition


CholeskyDecomposition의 결과 return code.

struct btCholeskyDecomposition
{
  enum Result
  {
    SUCCESS,
    FAILURE_SYMMETRY,
    FAILURE_POSITIVE_DEFINITE
  };
};


2013년 12월 12일 목요일

Z-Y-X Euler Angles

Z-Y-X Euler Angles
Z-Y-X Euler Angles (or X-Y-Z fixed angles)
Rx'y'z' (a,b,c) =

[ cos(a)*cos(b), cos(a)*sin(b)*sin(c) - cos(c)*sin(a), sin(a)*sin(c) + cos(a)*cos(c)*sin(b)]
[ cos(b)*sin(a), cos(a)*cos(c) + sin(a)*sin(b)*sin(c), cos(c)*sin(a)*sin(b) - cos(a)*sin(c)]
[       -sin(b),                        cos(b)*sin(c),                        cos(b)*cos(c)]



X-Y-Z Euler Angles
Rz'y'x' (a,b,c) =

[                        cos(b)*cos(c),                       -cos(b)*sin(c),         sin(b)]
[ cos(a)*sin(c) + cos(c)*sin(a)*sin(b), cos(a)*cos(c) - sin(a)*sin(b)*sin(c), -cos(b)*sin(a)]
[ sin(a)*sin(c) - cos(a)*cos(c)*sin(b), cos(c)*sin(a) + cos(a)*sin(b)*sin(c),  cos(a)*cos(b)]



Rz'y'x' (c,b,a) =
[                        cos(a)*cos(b),                       -cos(b)*sin(a),         sin(b)]
[ cos(c)*sin(a) + cos(a)*sin(b)*sin(c), cos(a)*cos(c) - sin(a)*sin(b)*sin(c), -cos(b)*sin(c)]
[ sin(a)*sin(c) - cos(a)*cos(c)*sin(b), cos(a)*sin(c) + cos(c)*sin(a)*sin(b),  cos(b)*cos(c)]




2013년 9월 1일 일요일

Lifelines



Lifelines of referenced historical figures

2013년 8월 26일 월요일

Eigenvalues of rotation matrix : 0~180 degrees

Eigenvalue의 의미를 보여주는 그래프. y축은 imaginary axis.


추가 1)
When an n×n rotation matrix, Q, does not include −1 as an eigenvalue, so that none of the planar rotations of which it is composed are 180° rotations, then Q+I is an invertible matrix. Most rotation matrices fit this description.




2013년 6월 20일 목요일

Typical orbits

회전체 모드해석 수업때 이종원 교수님 강의 중 나온 내용.
Matlab으로 그려본 것.
그림만 봐도 spectrum 해석하기 이전에 분석할 수 있음.


Hypocycloid

Hypotrochoid

Epitrochoid

Epitrochoid 와 Hypotrochoid에 대한 추가 문서 : http://www.durangobill.com/Trochoids.html


2012년 12월 30일 일요일

Curvature Scale Space

Smooth operator 결과. sigma 를 높임에 따라 뭉게진다.
cyan은 원 sine curve + 15% noise

2차원 커브에 적용. 빨간 점은 커브가 zero-crossing되는 지점.

재밌다 ㅋㅋ

Thanks to Roy


2012년 3월 16일 금요일

Gaussian profile of Illustrator format


Illustrator source : Download
profile calculated from Matlab

2011년 12월 4일 일요일

QR factorization



QR factorization에서 R이 upper triangle인 이유.



Euler angles from a rotation matrix



Computing Euler angles from a rotation matrix
http://www.gregslabaugh.name/publications/euler.pdf