Changeset 1328 for XIOS/dev/branch_openmp/extern/remap/src/clipper.cpp
- Timestamp:
- 11/15/17 12:14:34 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/extern/remap/src/clipper.cpp
r1205 r1328 4274 4274 { 4275 4275 //The equation of a line in general form (Ax + By + C = 0) 4276 //given 2 points (x ,y) & (x,y) is ...4277 //(y - y)x + (x - x)y + (y - y)x - (x - x)y= 04278 //A = (y - y); B = (x - x); C = (y - y)x - (x - x)y4279 //perpendicular distance of point (x ,y) = (Ax + By + C)/Sqrt(A + B)4276 //given 2 points (x¹,y¹) & (x²,y²) is ... 4277 //(y¹ - y²)x + (x² - x¹)y + (y² - y¹)x¹ - (x² - x¹)y¹ = 0 4278 //A = (y¹ - y²); B = (x² - x¹); C = (y² - y¹)x¹ - (x² - x¹)y¹ 4279 //perpendicular distance of point (x³,y³) = (Ax³ + By³ + C)/Sqrt(A² + B²) 4280 4280 //see http://en.wikipedia.org/wiki/Perpendicular_distance 4281 4281 double A = double(ln1.Y - ln2.Y);
Note: See TracChangeset
for help on using the changeset viewer.