javascript calls to cos and sin should be in radians (not degrees!)