No BSD License  

Highlights from
Skyplot1001

image thumbnail
from Skyplot1001 by Markus Penzkofer
Virtual Planetarium showing stars, the planets, the sun and the moon.

[x,y,z]=pol2cart(r,theta,phi)
function [x,y,z]=pol2cart(r,theta,phi)

% function [x,y,z]=pol2cart(r,theta,phi)
%
% transformation from polar coordinates to cartesian coordinates
% algorithms by Montenbruck/Pfleger: "Astronomy with the Personal Computer"
%
% 05.05.04 M.Penzkofer

rho = pi/180;

RCST = r*cos(theta*rho);
x = RCST*cos(phi*rho);
y = RCST*sin(phi*rho);
z = r*sin(theta*rho);

Contact us at files@mathworks.com