Baljit Singh created MATH-1507: ---------------------------------- Summary: Barycenter of a clockwise SphericalPolygonsSet is incorrect. Key: MATH-1507 URL: https://issues.apache.org/jira/browse/MATH-1507 Project: Commons Math Issue Type: Bug Affects Versions: 3.6.1 Reporter: Baljit Singh
Let's say there is a circle on a spherical surface. * The circle center is given by S2Point(theta=-0.6981, phi=0.87266). The radius is irrelevant. * Let's discretize this circle into a polygon with 100 edges. Let's make the orientation {color:#FF0000}clockwise{color}. * Since its a clockwise circle, from symmetry, we know that the barycenter would be around S2Point(theta=2.44346, phi=2.268928), which is just the reverse of the normal vector at the circle center. * Using SphericalPolygonsSet, the calculated barycenter is S2Point(theta=2.4922, phi=0.69889). A few things I've already tested: * For counterclockwise, the result is correct. * The perimeter and surface area of the polygon is correct for both counterclockwise and clockwise. -- This message was sent by Atlassian Jira (v8.3.4#803005)