cdm/src/main/java/ucar/unidata/geoloc/projection/proj4/LambertConformalConicEllipse.java
public ProjectionPoint latLonToProj(LatLonPoint latLon, ProjectionPointImpl result) {
    double fromLat = Math.toRadians(latLon.getLatitude());
    double theta = computeTheta(latLon.getLongitude());

		double rho = 0.0;
		if (Math.abs(Math.abs(fromLat) - MapMath.HALFPI) >= TOL) {
			double term;
      if (isSpherical)
        term = Math.pow(Math.tan(MapMath.QUARTERPI + .5 * fromLat), -n);
      else
        term = Math.pow(MapMath.tsfn(fromLat, Math.sin(fromLat), e), n);
			rho = c * term;
    }

		double toX = (rho * Math.sin(theta));
		double toY = (rho0 - rho * Math.cos(theta));

    result.setLocation(totalScale * toX + falseEasting, totalScale * toY + falseNorthing);
    return result;
  }
public ProjectionPoint latLonToProj(LatLonPoint latLon, ProjectionPointImpl result) {
    double fromLat = Math.toRadians(latLon.getLatitude());
    double theta = computeTheta(latLon.getLongitude());

		double rho = 0.0;
		if (Math.abs(Math.abs(fromLat) - MapMath.HALFPI) >= TOL) {
			double term;
      if (isSpherical)
        term = Math.pow(Math.tan(MapMath.QUARTERPI + .5 * fromLat), -n);
      else
        term = Math.pow(MapMath.tsfn(fromLat, Math.sin(fromLat), e), n);
			rho = c * term;
    }

		double toX = (rho * Math.sin(theta));
		double toY = (rho0 - rho * Math.cos(theta));

    result.setLocation(totalScale * toX + falseEasting, totalScale * toY + falseNorthing);
    return result;
  }
public ProjectionPoint latLonToProj ( LatLonPoint latLon , ProjectionPointImpl result ) { double fromLat = Math . toRadians ( latLon . getLatitude ( ) ) ; double theta = computeTheta ( latLon . getLongitude ( ) ) ; double rho = 0.0 ; if ( Math . abs ( Math . abs ( fromLat ) - MapMath . HALFPI ) >= TOL ) { double term ; if ( isSpherical ) term = Math . pow ( Math . tan ( MapMath . QUARTERPI + .5 * fromLat ) , - n ) ; else term = Math . pow ( MapMath . tsfn ( fromLat , Math . sin ( fromLat ) , e ) , n ) ; rho = c * term ; } double toX = ( rho * Math . sin ( theta ) ) ; double toY = ( rho0 - rho * Math . cos ( theta ) ) ; result . setLocation ( totalScale * toX + falseEasting , totalScale * toY + falseNorthing ) ; return result ; }
also see Snyder p 101
also see Snyder p 101