4 // Copyright (c) 2016 Oracle and/or its affiliates.
6 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
8 // Use, modification and distribution is subject to the Boost Software License,
9 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
10 // http://www.boost.org/LICENSE_1_0.txt)
12 #ifndef BOOST_GEOMETRY_TEST_INTERSECTION_CASES_HPP
13 #define BOOST_GEOMETRY_TEST_INTERSECTION_CASES_HPP
21 struct expected_result
27 struct expected_results
33 expected_result gnomonic_vincenty;
34 expected_result gnomonic_thomas;
35 expected_result sjoberg_vincenty;
36 expected_result sjoberg_thomas;
37 expected_result sjoberg_andoyer;
38 expected_result great_elliptic;
43 expected_results expected[] =
48 { 0.0000000000000000, 0.0000000000000000 },
49 { 0.0000000000000000, 0.0000000000000000 },
50 { 0.0000000000626537, -0.0000000000000000 },
51 { -0.0000000187861002, -0.0000000000000000 },
52 { -0.0000055778585615, -0.0000000000000000 },
53 { -0.0000000000000000, -0.0000000000000000 }
55 // TODO: Newton method in Sjoberg formula is not used in this case
56 // due to f1 - f2 == 0. The other method is used instead.
57 // Hence different results. Look into this.
60 { 0.0000000000000000, 0.0000000000000000 },
61 { 0.0000000000000000, 0.0000000000000000 },
62 { 0.0000000000000000, 0.0000000000626632 },
63 { -0.0000000000000006, -0.0000000187889745 },
64 { -0.0000000000000001, -0.0000055787431353 },
65 { -0.0000000000000000, 0.0000000000000000 }
67 // TODO: Newton method in Sjoberg formula is not used in this case
68 // due to f1 - f2 == 0. The other method is used instead.
69 // Hence different results. Look into this.
72 { 0.0000000000000000, 0.0000000000000000 },
73 { 0.0000000000000000, 0.0000000000000000 },
74 { -0.0000000000000000, -0.0000000000626632 },
75 { -0.0000000000000004, 0.0000000187889746 },
76 { 0.0000000000000001, 0.0000055787431353 },
77 { 0.0000000000000000, 0.0000000000000000 }
81 { 0.0000000000000000, 0.0000000000000000 },
82 { 0.0000000000000000, 0.0000000000000000 },
83 { -0.0000000000626537, -0.0000000000000000 },
84 { 0.0000000187860994, 0.0000000000000001 },
85 { 0.0000055778585615, -0.0000000000000000 },
86 { -0.0000000000000000, 0.0000000000000000 }
90 { 0.5000000000000000, 0.5000573755188470 },
91 { 0.5000000000000000, 0.5000573755109839 },
92 { 0.5000000000313266, 0.5000573755188389 },
93 { 0.4999999906069524, 0.5000573755152582 },
94 { 0.4999972102164753, 0.5000573755151276 },
95 { 0.4999999999999999, 0.5000571197534014 }
99 { 0.5000000000000000, 0.5000573755188470 },
100 { 0.5000000000000000, 0.5000573755109839 },
101 { 0.5000000000000000, 0.5000573755501669 },
102 { 0.4999999999999996, 0.5000573661218464 },
103 { 0.4999999999999999, 0.5000545856093679 },
104 { 0.4999999999999999, 0.5000571197534014 }
108 { 0.5000000000000000, 0.5000573755188470 },
109 { 0.5000000000000000, 0.5000573755109839 },
110 { 0.4999999999999999, 0.5000573754875109 },
111 { 0.4999999999999999, 0.5000573849086647 },
112 { 0.5000000000000000, 0.5000601654208935 },
113 { 0.4999999999999999, 0.5000571197534014 }
117 { 0.5000000000000000, 0.5000573755188470 },
118 { 0.5000000000000000, 0.5000573755109839 },
119 { 0.4999999999686731, 0.5000573755188389 },
120 { 0.5000000093930521, 0.5000573755152582 },
121 { 0.5000027897835244, 0.5000573755151276 },
122 { 0.4999999999999999, 0.5000571197534014 }
128 { -0.9981650042162076, -0.999999718164758 },
131 { -0.9981731758085121, -0.9999997213000095 }
134 {-66, -14}, {-1, -1},
137 { -15.83269406235058, -4.87746450262433 },
140 { -15.82846301029918, -4.869650527718342 }
146 { -10.28209064194141, -5.124101297536392 },
149 { -10.29663941896089, -5.123527178300465 }
155 { -19.95519754153282, -6.521540589691206 },
158 { -19.95535387979888, -6.517861579906892 }
164 { -3.424525475838061, -5.070550173747042 },
167 { -3.424493504575876, -5.070060631936228 }
173 { -0.9999999978280006, -5.00000000000684 },
176 { -0.9999999999999919, -5 }
182 { -40.00000000470697, -4.999999999854269 },
185 { -40.00000000000003, -4.999999999999998 }
191 { -40.04870859732954, -4.998490166905039 },
194 { -39.87674154148858, -5.003778171392734 }
200 { -12.49994722584679, -4.492062263169279 },
203 { -12.49786552878283, -4.48224349980724 }
209 { -14.99999999880286, -5.280237387890117 },
212 { -14.99999999999999, -5.278284829442087 }
218 { -12.68814198534678, -5.255404335144863 },
221 { -12.68883814704657, -5.253634733357015 }
227 { -6.793546728871506, -5.153444544719724 },
230 { -6.794933162619669, -5.152409434095275 }
236 { -22.13104411461423, -5.130155316882458 },
239 { -22.13016591567375, -5.129277412801533 }
245 { -14.99999999908104, -5.187213913248173 },
248 { -15.00000000000009, -5.185931965560752 }
250 {-92, -24}, {44, 19},
254 { -31.65127861442256, -10.84411293410938 },
257 { -31.65294079308247, -10.76785432928444 }
263 { -32.33383382062637, -10.80295061031259 },
266 { -32.26069578187354, -10.73176059393484 }
272 { -25.71257598566304, -11.13752154787724 },
275 { -25.67761999514295, -11.05881610957402 }
277 {-54, -21}, {20, 17},
281 { -22.96397490169162, -6.181426780426698 },
284 { -22.95999443662035, -6.172089364736989 }
286 {-31, -10}, {-31, -2},
287 {-37, -10}, {-25, -2},
290 { -31.00000000000001, -6.062729839503469 },
293 { -31, -6.062411484514648 }
295 {-26, -10}, {-26, 13},
296 {-37, -4}, {-18, -4},
299 { -25.99999999999969, -4.05441766735837 },
302 { -26, -4.05405101510235 }
304 {-26, -10}, {154, 78},
305 {-46, 41}, {-13, 36},
308 { -26, 39.19492836828103 },
311 { -26, 39.19004133747198 }
313 {-26, -10}, {154, 68},
317 { -26.00000000000013, 83.7164889918963 },
320 { -26.00000000000002, 83.71603758698208 }
322 {-25, 55}, {155, 68},
323 {178, 79}, {124, 80},
326 { 155, 80.55982670305147 },
329 { 155, 80.55961176607357 }
333 size_t const expected_size = sizeof(expected) / sizeof(expected_results);
335 #endif // BOOST_GEOMETRY_TEST_INTERSECTION_CASES_HPP