Exemplo n.º 1
0
def dexp(v):
	x = np.linalg.norm(v)
	a = trig.sinox(x)
	b = trig.cosox2(x)
	c = trig.sinox3(x)
	I = np.identity(3)
	S = skew(v)
	W = v * v.transpose()
	return a*I + b*S + c*W
Exemplo n.º 2
0
def mt(v):
	r = v[0:3]
	t = v[3:6]
	x = np.linalg.norm(r)
	b = trig.cosox2(x)
	c = trig.sinox3(x)
	g = trig.specialFun1(x)
	h = trig.specialFun3(x)
	I = np.identity(3)
	return b*quat.skew(t) + c*(r*t.transpose() + t*r.transpose()) + v3.dot(r,t)*((c - b) * I + g*quat.skew(r) + h*r*r.transpose())