
% Initial version: Magnus Billvik, Swedish Institute of Space Physics,
% Uppsala, June 2005

function drawmodellonglatf(x,y,z,str,val,center)

[cphi, ctheta, crho]=cart2sphere(center(1), center(2), center(3));
[phi, theta, rho]=cart2sphere(x,y,z);
phi=phi*180/pi;
theta=theta*180/pi;

phi(length(phi)+1)=cphi*180/pi;
theta(length(theta)+1)=ctheta*180/pi;


h=fill(phi, theta, [0.95 0.95 0.95]);
set(h, 'EdgeColor', [0.95 0.95 0.95]);
hold on;

%for i=1:(length(phi)-1)
%    line([phi(i) phi(i+1)], [theta(i) theta(i+1)], str, val);
%end

