﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
243	psSphereTransformApply()	gusciora@…	Paul Price	"I have included the code for the sphere transform below.  This originated from a
personal email with Gene.  I don't see this formula in the ADD.  Can you verify
that this is correct?

    x = coord->r;
    y = coord->d;
    dx = x - transform->phiP;
    sinY = cos(y) * sin(dx) * transform->sinDeltaP +
           sin(y) * transform->cosDeltaP;
    cosY = sqrt(1.0 - sinY * sinY);
    sinX = (cos(y) * sin(dx) * transform->cosDeltaP - 
           sin(y) * transform->sinDeltaP) / cos(y);
    cosX = cos(y) * cos(dx) / cos(y);

    out->r = atan2(sinX, cosX) + transform->alphaP;
    out->d = atan2(sinY, cosY);"	defect	closed	high		PSLib ADD	unspecified	normal	worksforme		
