% GREATCIRCLE" plots a single great circle on a stereonet

function [x,y] = greatcircle(dip,dipdir)
% plots great circle on stereogram

beta = linspace(0,pi,181);
alpha = atan( sin(beta).* tan(dip.*pi/180) );
R = tan(pi/4 - 0.5.*alpha);
theta = beta - dipdir .* pi/180;
x = R .* cos(theta);
y = R .* sin(theta);
plot(x,y,'k-','LineWidth',0.1);
