MCPcopy Create free account
hub / github.com/BIMCoderLiang/LNLib / Stereographic

Method Stereographic

src/LNLib/Algorithm/Projection.cpp:45–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45LNLib::XYZ LNLib::Projection::Stereographic(const XYZ& pointOnSphere, double radius)
46{
47 double x = pointOnSphere.GetX();
48 double y = pointOnSphere.GetY();
49 double z = pointOnSphere.GetZ();
50
51 double alpha = -2 * radius / (z - 2 * radius);
52 double u = alpha * x;
53 double v = alpha * y;
54
55 return XYZ(u, v, 0);
56}

Callers

nothing calls this directly

Calls 4

XYZClass · 0.50
GetXMethod · 0.45
GetYMethod · 0.45
GetZMethod · 0.45

Tested by

no test coverage detected