function [ loc ] = sensorRing( r, n, pos, ori )
%sensorRing Distribute coils around a sensor
%   Distributes n coils in a circle with radius r around a sensor defined
%   by pos and ori (both 1x3d). Returns locations.

    alpha = (1:n)*(360/n);
    tmp = [sind(alpha') cosd(alpha') zeros(n,1)];
    rot = align_vector([0 0 1],ori);
    for i = 1:n
        tmp2(i,:) = tmp(i,:)*rot';
    end
    loc = repmat(pos,[n 1])+tmp2.*r;
end

