
Rp = @(theta) [cos(theta) -sin(theta) 0;
	       sin(theta)  cos(theta) 0;
	       0           0          1];

Rt = @(theta) (1/sqrt(2))*[0 0 cos(theta);
			   0 0 sin(theta);
			   1 1 0];

# rotation med vinkel phi och theta i 'positiv' riktning
R0 = @(phi,theta) cos(phi)*Rp(theta) + sin(phi)*Rt(theta);

R = @(phi,theta) (1/norm(R0(phi,theta)))*R0(phi,theta);

# singulär bana
s_lambda = @(phi) 0.5*(cos(phi).^2 + 1);

# indikatorfunktion
omgivning = @(x,p,epsilon) abs(norm(x - p)) <= epsilon; 

