Skip to content

Commit f044a65

Browse files
committed
Begin tests for extrapolated intersection
This uses a lot of images because generating tests for these is hard. The image files are all very small (<5kb) so it shouldn't make downloading the repo significantly slower. This algorithm can be tricky to get right so I wanted to have a very exhaustive test suite. * pygorithm/geometry/extrapolated_intersection.py - add more helper functions * pygorithm/geometry/polygon2.py - fix fuzzing test sometimes failing * tests/test_geometry.py - add regression test for polygon, add tests for first two functions of extrapolated_intersection + imgs/test_geometry/test_extrapolated_intersection - images that help visualize what the tests are doing. the naming convention is explained in test_geometry.TestExtrapolatedIntersection docstring
1 parent ce9d89e commit f044a65

File tree

66 files changed

+2956
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2956
-5
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
;This file was created by Graph (http://www.padowan.dk)
2+
;Do not change this file from other programs.
3+
[Graph]
4+
Version = 4.4.2.543
5+
MinVersion = 2.5
6+
OS = Windows NT 6.2
7+
8+
[Axes]
9+
xMin = -0.6
10+
xMax = 6.6
11+
xTickUnit = 1
12+
xGridUnit = 1
13+
xAutoTick = 0
14+
yMin = -0.4
15+
yMax = 4.4
16+
yTickUnit = 1
17+
yGridUnit = 1
18+
yAutoTick = 0
19+
AxesColor = clBlue
20+
GridColor = 0x00FF9999
21+
NumberFont = Times New Roman,16,clBlack
22+
LabelFont = Times New Roman,16,clBlack,B
23+
ShowLegend = 0
24+
Radian = 1
25+
LegendPlacement = 0
26+
LegendPos = 1.24145785876993,3.21633085896076
27+
28+
[PointSeries1]
29+
FillColor = clRed
30+
LineColor = clBlue
31+
Size = 5
32+
Style = 0
33+
LineStyle = 0
34+
ShowLabels = 1
35+
LabelPosition = 5
36+
PointCount = 2
37+
Points = 6,2;2,4;
38+
LegendText = Line
39+
40+
[PointSeries2]
41+
FillColor = clBlack
42+
LineColor = clBlue
43+
Size = 3
44+
Style = 7
45+
LineStyle = 0
46+
LabelPosition = 1
47+
PointCount = 2
48+
Points = 1,1;6,1;
49+
LegendText = Point (extrapolated)
50+
51+
[PointSeries3]
52+
FillColor = clBlack
53+
LineColor = clBlue
54+
Size = 5
55+
Style = 0
56+
LineStyle = 0
57+
ShowLabels = 1
58+
LabelPosition = 1
59+
PointCount = 1
60+
Points = 1,1;
61+
LegendText = Point
62+
63+
[Data]
64+
TextLabelCount = 0
65+
FuncCount = 0
66+
PointSeriesCount = 3
67+
ShadeCount = 0
68+
RelationCount = 0
69+
OleObjectCount = 0
70+
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
;This file was created by Graph (http://www.padowan.dk)
2+
;Do not change this file from other programs.
3+
[Graph]
4+
Version = 4.4.2.543
5+
MinVersion = 2.5
6+
OS = Windows NT 6.2
7+
8+
[Axes]
9+
xMin = -0.6
10+
xMax = 6.6
11+
xTickUnit = 1
12+
xGridUnit = 1
13+
xAutoTick = 0
14+
yMin = -0.4
15+
yMax = 4.4
16+
yTickUnit = 1
17+
yGridUnit = 1
18+
yAutoTick = 0
19+
AxesColor = clBlue
20+
GridColor = 0x00FF9999
21+
NumberFont = Times New Roman,16,clBlack
22+
LabelFont = Times New Roman,16,clBlack,B
23+
ShowLegend = 0
24+
Radian = 1
25+
LegendPlacement = 0
26+
LegendPos = 1.24145785876993,3.21633085896076
27+
28+
[PointSeries1]
29+
FillColor = clRed
30+
LineColor = clBlue
31+
Size = 5
32+
Style = 0
33+
LineStyle = 0
34+
ShowLabels = 1
35+
LabelPosition = 5
36+
PointCount = 2
37+
Points = 6,2;2,4;
38+
LegendText = Line
39+
40+
[PointSeries2]
41+
FillColor = clBlack
42+
LineColor = clBlue
43+
Size = 3
44+
Style = 7
45+
LineStyle = 0
46+
LabelPosition = 1
47+
PointCount = 2
48+
Points = 1,1;1,4;
49+
LegendText = Point (extrapolated)
50+
51+
[PointSeries3]
52+
FillColor = clBlack
53+
LineColor = clBlue
54+
Size = 5
55+
Style = 0
56+
LineStyle = 0
57+
ShowLabels = 1
58+
LabelPosition = 1
59+
PointCount = 1
60+
Points = 1,1;
61+
LegendText = Point
62+
63+
[Data]
64+
TextLabelCount = 0
65+
FuncCount = 0
66+
PointSeriesCount = 3
67+
ShadeCount = 0
68+
RelationCount = 0
69+
OleObjectCount = 0
70+
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
;This file was created by Graph (http://www.padowan.dk)
2+
;Do not change this file from other programs.
3+
[Graph]
4+
Version = 4.4.2.543
5+
MinVersion = 2.5
6+
OS = Windows NT 6.2
7+
8+
[Axes]
9+
xMin = -0.6
10+
xMax = 6.6
11+
xTickUnit = 1
12+
xGridUnit = 1
13+
xAutoTick = 0
14+
yMin = -0.4
15+
yMax = 4.4
16+
yTickUnit = 1
17+
yGridUnit = 1
18+
yAutoTick = 0
19+
AxesColor = clBlue
20+
GridColor = 0x00FF9999
21+
NumberFont = Times New Roman,16,clBlack
22+
LabelFont = Times New Roman,16,clBlack,B
23+
ShowLegend = 0
24+
Radian = 1
25+
LegendPlacement = 0
26+
LegendPos = 1.24145785876993,3.21633085896076
27+
28+
[PointSeries1]
29+
FillColor = clRed
30+
LineColor = clBlue
31+
Size = 5
32+
Style = 0
33+
LineStyle = 0
34+
ShowLabels = 1
35+
LabelPosition = 5
36+
PointCount = 2
37+
Points = 6,4;2,4;
38+
LegendText = Line
39+
40+
[PointSeries2]
41+
FillColor = clBlack
42+
LineColor = clBlue
43+
Size = 3
44+
Style = 7
45+
LineStyle = 0
46+
LabelPosition = 1
47+
PointCount = 2
48+
Points = 4,1;1,4;
49+
LegendText = Point (extrapolated)
50+
51+
[PointSeries3]
52+
FillColor = clBlack
53+
LineColor = clBlue
54+
Size = 5
55+
Style = 0
56+
LineStyle = 0
57+
ShowLabels = 1
58+
LabelPosition = 1
59+
PointCount = 1
60+
Points = 4,1;
61+
LegendText = Point
62+
63+
[Data]
64+
TextLabelCount = 0
65+
FuncCount = 0
66+
PointSeriesCount = 3
67+
ShadeCount = 0
68+
RelationCount = 0
69+
OleObjectCount = 0
70+
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
;This file was created by Graph (http://www.padowan.dk)
2+
;Do not change this file from other programs.
3+
[Graph]
4+
Version = 4.4.2.543
5+
MinVersion = 2.5
6+
OS = Windows NT 6.2
7+
8+
[Axes]
9+
xMin = -0.6
10+
xMax = 6.6
11+
xTickUnit = 1
12+
xGridUnit = 1
13+
xAutoTick = 0
14+
yMin = -0.4
15+
yMax = 4.4
16+
yTickUnit = 1
17+
yGridUnit = 1
18+
yAutoTick = 0
19+
AxesColor = clBlue
20+
GridColor = 0x00FF9999
21+
NumberFont = Times New Roman,16,clBlack
22+
LabelFont = Times New Roman,16,clBlack,B
23+
ShowLegend = 0
24+
Radian = 1
25+
LegendPlacement = 0
26+
LegendPos = 1.24145785876993,3.21633085896076
27+
28+
[PointSeries1]
29+
FillColor = clRed
30+
LineColor = clBlue
31+
Size = 5
32+
Style = 0
33+
LineStyle = 0
34+
ShowLabels = 1
35+
LabelPosition = 4
36+
PointCount = 2
37+
Points = 1,2;5,4;
38+
LegendText = Line
39+
40+
[PointSeries2]
41+
FillColor = clBlack
42+
LineColor = clBlue
43+
Size = 3
44+
Style = 7
45+
LineStyle = 0
46+
LabelPosition = 1
47+
PointCount = 2
48+
Points = 2,1;6,4;
49+
LegendText = Point (extrapolated)
50+
51+
[PointSeries3]
52+
FillColor = clBlack
53+
LineColor = clBlue
54+
Size = 5
55+
Style = 0
56+
LineStyle = 0
57+
ShowLabels = 1
58+
LabelPosition = 1
59+
PointCount = 1
60+
Points = 2,1;
61+
LegendText = Point
62+
63+
[Data]
64+
TextLabelCount = 0
65+
FuncCount = 0
66+
PointSeriesCount = 3
67+
ShadeCount = 0
68+
RelationCount = 0
69+
OleObjectCount = 0
70+
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
;This file was created by Graph (http://www.padowan.dk)
2+
;Do not change this file from other programs.
3+
[Graph]
4+
Version = 4.4.2.543
5+
MinVersion = 2.5
6+
OS = Windows NT 6.2
7+
8+
[Axes]
9+
xMin = -0.6
10+
xMax = 6.6
11+
xTickUnit = 1
12+
xGridUnit = 1
13+
xAutoTick = 0
14+
yMin = -0.4
15+
yMax = 4.4
16+
yTickUnit = 1
17+
yGridUnit = 1
18+
yAutoTick = 0
19+
AxesColor = clBlue
20+
GridColor = 0x00FF9999
21+
NumberFont = Times New Roman,16,clBlack
22+
LabelFont = Times New Roman,16,clBlack,B
23+
ShowLegend = 0
24+
Radian = 1
25+
LegendPlacement = 0
26+
LegendPos = 1.24145785876993,3.21633085896076
27+
28+
[PointSeries1]
29+
FillColor = clRed
30+
LineColor = clBlue
31+
Size = 5
32+
Style = 0
33+
LineStyle = 0
34+
ShowLabels = 1
35+
LabelPosition = 5
36+
PointCount = 2
37+
Points = 6,2;2,4;
38+
LegendText = Line
39+
40+
[PointSeries2]
41+
FillColor = clBlack
42+
LineColor = clBlue
43+
Size = 3
44+
Style = 7
45+
LineStyle = 0
46+
LabelPosition = 1
47+
PointCount = 2
48+
Points = 1,1;2,4;
49+
LegendText = Point (extrapolated)
50+
51+
[PointSeries3]
52+
FillColor = clBlack
53+
LineColor = clBlue
54+
Size = 5
55+
Style = 0
56+
LineStyle = 0
57+
ShowLabels = 1
58+
LabelPosition = 1
59+
PointCount = 1
60+
Points = 1,1;
61+
LegendText = Point
62+
63+
[Data]
64+
TextLabelCount = 0
65+
FuncCount = 0
66+
PointSeriesCount = 3
67+
ShadeCount = 0
68+
RelationCount = 0
69+
OleObjectCount = 0
70+

0 commit comments

Comments
 (0)