Skip to content

Commit

Permalink
trying to pull
Browse files Browse the repository at this point in the history
  • Loading branch information
seub committed Nov 21, 2015
1 parent 5f8d542 commit d30e119
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 40 deletions.
1 change: 1 addition & 0 deletions Hitchin.pro
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# unix:QMAKE_CXXFLAGS_RELEASE -= -O1
# unix:QMAKE_CXXFLAGS_RELEASE -= -O2
# unix:QMAKE_CXXFLAGS_RELEASE *= -O3

QMAKE_MAC_SDK = macosx10.11

QT += core \
Expand Down
40 changes: 0 additions & 40 deletions h2geodesic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,43 +452,3 @@ bool H2GeodesicArc::shareEndpoint(const H2GeodesicArc &L1, const H2GeodesicArc &
L2.getEndpoints(p2,q2);
return (p1==p2)||(p1==q2)||(q1==p2)||(q1==q2);
}

bool H2GeodesicArc::pointOnGeodesicIsInsideArc(const H2Point &p) const
{
// assert that p is on this->getGeodesic()
H2Isometry A;
Complex imageP2, imageP;
A.setDiskCoordinates(Complex(1.0,0.0),p1.getDiskCoordinate());
imageP2 = (A*p2).getDiskCoordinate();
imageP = (A*p).getDiskCoordinate();
return 0.0 <= real(imageP/imageP2) <= 1.0;
}

double H2GeodesicArc::distanceGeodesicArcs(const H2GeodesicArc &L1, const H2GeodesicArc &L2)
{
H2Point p1,p2;
H2Isometry A;
Complex z1,z2,u;
if (!H2Geodesic::closestPoints(L1.getGeodesic(),L2.getGeodesic(),p1,p2))
{
throw(QString("Error in H2GeodesicArc::distanceGeodesicArcs: Two geodesic arcs have a common point at infinity"));
}
if (L1.pointOnGeodesicIsInsideArc(p1) && L2.pointOnGeodesicIsInsideArc(p2))
{
return H2Point::distance(p1,p2);
}
H2Point L1endpoint1,L1endpoint2,L2endpoint1,L2endpoint2;
L1.getEndpoints(L1endpoint1,L1endpoint2);
L2.getEndpoints(L2endpoint1,L2endpoint2);
std::vector<double> fourDistances;
fourDistances.push_back(H2Point::distance(L1endpoint1,L2endpoint1));
fourDistances.push_back(H2Point::distance(L1endpoint1,L2endpoint2));
fourDistances.push_back(H2Point::distance(L1endpoint2,L2endpoint1));
fourDistances.push_back(H2Point::distance(L1endpoint2,L2endpoint2));
return *std::min_element(fourDistances.begin(),fourDistances.end());
}





0 comments on commit d30e119

Please sign in to comment.