C# 클래스 HyperbolicModels.SphericalTrig

파일 보기 프로젝트 열기: roice3/Honeycombs 1 사용 예제들

공개 메소드들

메소드 설명
IntersectionCircleCircle ( Vector3D sphereCenter, Circle3D c1, Circle3D c2, Vector3D &i1, Vector3D &i2 ) : void

NOTE: Not general, and assumes some things we know about this problem domain, e.g. that c1 and c2 live on the same sphere of radius 1, and have two intersection points.

IntersectionGCGC ( Vector3D gc1, Vector3D gc2, Vector3D &i1, Vector3D &i2 ) : bool

Returns the two intersection points of two great circles. gc1 and gc2 are the great circle normal vectors. Fails if the input circles are the same.

IntersectionSmart ( Vector3D sphereCenter, Circle3D c1, Circle3D c2, Vector3D &i1, Vector3D &i2 ) : bool

Had to break the intersection method into separate cases (depending on when circles are great circles or not), because the spherical pythagorean theorem breaks down in GC cases.

비공개 메소드들

메소드 설명
Clamp ( double val ) : double

Clamps the input to [-1,1]. This is to avoid floating point issues when taking arcsin and arccos.

CosAngle ( Vector3D p1, Vector3D p2 ) : double

Calculate the cosine of the angle between two vectors.

GetGCNormal ( Vector3D p1, Vector3D p2, Vector3D &normal ) : bool

Return the normal of the great circle defined by the two vectors. Return false if we fail to get the normal (happens if p1 = p2).

IntersectionCircleGC ( Circle3D c, Vector3D gc, List iPoints ) : bool

Returns intersection points between a circle and a great circle. There may be 0, 1, or 2 intersection points. Returns false if the circle is the same as gc.

IsGC ( Circle3D c ) : bool
SinAngle ( Vector3D p1, Vector3D p2 ) : double

Calculate the sine of the angle between two vectors.

메소드 상세

IntersectionCircleCircle() 공개 정적인 메소드

NOTE: Not general, and assumes some things we know about this problem domain, e.g. that c1 and c2 live on the same sphere of radius 1, and have two intersection points.
public static IntersectionCircleCircle ( Vector3D sphereCenter, Circle3D c1, Circle3D c2, Vector3D &i1, Vector3D &i2 ) : void
sphereCenter Vector3D
c1 R3.Geometry.Circle3D
c2 R3.Geometry.Circle3D
i1 Vector3D
i2 Vector3D
리턴 void

IntersectionGCGC() 공개 정적인 메소드

Returns the two intersection points of two great circles. gc1 and gc2 are the great circle normal vectors. Fails if the input circles are the same.
public static IntersectionGCGC ( Vector3D gc1, Vector3D gc2, Vector3D &i1, Vector3D &i2 ) : bool
gc1 Vector3D
gc2 Vector3D
i1 Vector3D
i2 Vector3D
리턴 bool

IntersectionSmart() 공개 정적인 메소드

Had to break the intersection method into separate cases (depending on when circles are great circles or not), because the spherical pythagorean theorem breaks down in GC cases.
public static IntersectionSmart ( Vector3D sphereCenter, Circle3D c1, Circle3D c2, Vector3D &i1, Vector3D &i2 ) : bool
sphereCenter Vector3D
c1 R3.Geometry.Circle3D
c2 R3.Geometry.Circle3D
i1 Vector3D
i2 Vector3D
리턴 bool