Added test files for segment-circles.

This commit is contained in:
Shai Hirsch 2001-07-05 08:00:00 +00:00
parent 73ba00f777
commit 2f2e4fc904
7 changed files with 198 additions and 0 deletions

View File

@ -0,0 +1,36 @@
#-----------------------------------------------------------
# Data block
#-----------------------------------------------------------
# Number of curves
3
# Curve #0: segment.
s -1 0 1 2
# Curve #1: the upper part of the unit circle.
a 0 0 1 -1 0 1 0
# Curve #2: the lower part of the unit circle whose centre is (0,2)
a 0 2 1 1 2 -1 2
#-----------------------------------------------------------
# Number of "stand alone" points
5
-1 0
-0.5 0.5
0 1
0.5 0.5
1 2
#-----------------------------------------------------------
# Execution block
#-----------------------------------------------------------
curve_compare_at_x 0 1 0 EQUAL.
curve_compare_at_x 0 1 1 SMALLER.
curve_compare_at_x 0 1 2 EQUAL.
curve_compare_at_x 0 1 3 LARGER.
curve_compare_at_x_left 0 1 0 EQUAL. # Not defined to the left.
curve_compare_at_x_left 0 1 2 SMALLER.
curve_compare_at_x_left 0 1 4 LARGER.
curve_compare_at_x_left 1 2 2 SMALLER.
curve_compare_at_x_right 0 1 0 SMALLER.
curve_compare_at_x_right 0 1 2 LARGER.
curve_compare_at_x_right 0 1 4 EQUAL. # Not defined to the right.
curve_compare_at_x_right 1 2 2 SMALLER.

View File

@ -0,0 +1,37 @@
#-----------------------------------------------------------
# Data block
#-----------------------------------------------------------
# Number of curves
9
a 2 0 4 0 0 2 2
a -2 0 4 -2 2 0 0
a 0 -2 4 0 0 2 -2
a 0 -2 4 -2 -2 0 0
s 0 3 0 0
s 0 0 3 3
s 0 0 1 -2
s 0 0 -1 -2
s 0 0 -3 3
#-----------------------------------------------------------
# Number of "stand alone" points
1
0 0
#-----------------------------------------------------------
# Execution block
#-----------------------------------------------------------
curve_is_between_cw 5 0 2 0 TRUE.
curve_is_between_cw 6 0 2 0 FALSE.
curve_is_between_cw 3 0 2 0 FALSE.
curve_is_between_cw 4 0 2 0 FALSE.
curve_is_between_cw 5 2 0 0 FLASE.
curve_is_between_cw 6 2 0 0 TRUE.
curve_is_between_cw 3 2 0 0 TRUE.
curve_is_between_cw 4 2 0 0 TRUE. # Test fails !!!
curve_is_between_cw 5 1 3 0 TRUE.
curve_is_between_cw 8 1 3 0 FALSE.
curve_is_between_cw 4 1 0 0 TRUE.
curve_is_between_cw 7 1 0 0 FALSE.

View File

@ -0,0 +1,25 @@
#-----------------------------------------------------------
# Data block
#-----------------------------------------------------------
# Number of curves
2
a 0 0 1 -0.6 0.8 0.8 0.6
s 0 1 2 8
#-----------------------------------------------------------
# Number of "stand alone" points
4
-1 0
-0.5 1
0.5 2
1.5 3
#-----------------------------------------------------------
# Execution block
#-----------------------------------------------------------
curve_is_in_x_range 0 0 FALSE.
curve_is_in_x_range 1 0 FALSE.
curve_is_in_x_range 0 1 TRUE.
curve_is_in_x_range 1 1 FALSE.
curve_is_in_x_range 0 2 TRUE.
curve_is_in_x_range 1 2 TRUE.
curve_is_in_x_range 0 3 FALSE.
curve_is_in_x_range 1 3 TRUE.

View File

@ -0,0 +1,18 @@
#-----------------------------------------------------------
# Data block
#-----------------------------------------------------------
# Number of curves
2
a 0 0 9 -3 0 3 0
s 0 0 2 2
#-----------------------------------------------------------
# Number of "stand alone" points
2
0 3
1 1
#-----------------------------------------------------------
# Execution block
#-----------------------------------------------------------
curve_split 0 0.
curve_split 1 1.

View File

@ -0,0 +1,26 @@
#-----------------------------------------------------------
# Data block
#-----------------------------------------------------------
# Number of curves
5
a 0 0 4 -2 0 2 0
a 0 0 4 2 0 -2 0
a 3 0 4 1 0 5 0
s -2 2 6 0
s 2 1 10 -1
#-----------------------------------------------------------
# Number of "stand alone" points
3
0 0
3 0
5 0
#-----------------------------------------------------------
# Execution block
#-----------------------------------------------------------
do_intersect_to_right 0 1 0 TRUE. # Mutual end-point.
do_intersect_to_right 0 2 0 TRUE.
do_intersect_to_right 0 3 0 TRUE.
do_intersect_to_right 0 3 1 FALSE. # Intersect only to the left.
do_intersect_to_right 2 4 2 FALSE. # Intersect only to the left.
do_intersect_to_right 3 4 1 TRUE. # Overlapping
do_intersect_to_right 1 2 0 FALSE. # No intersection at all.

View File

@ -0,0 +1,33 @@
#-----------------------------------------------------------
# Data block
#-----------------------------------------------------------
# Number of curves
3
a 0 0 1 -1 0 1 0
s 0 0 1 1
s 0 0 0 0.5
#-----------------------------------------------------------
# Number of "stand alone" points
8
-2 1
-1 0.5
0 -1
0 0.5
0 0.25
0 1
1 0
1 1
#-----------------------------------------------------------
# Execution block
#-----------------------------------------------------------
curve_get_point_status 0 0 CURVE_NOT_IN_RANGE.
curve_get_point_status 0 1 ABOVE_CURVE.
curve_get_point_status 0 2 UNDER_CURVE.
curve_get_point_status 0 5 ON_CURVE.
curve_get_point_status 1 1 CURVE_NOT_IN_RANGE.
curve_get_point_status 1 6 UNDER_CURVE.
curve_get_point_status 1 7 ON_CURVE.
curve_get_point_status 2 2 UNDER_CURVE.
curve_get_point_status 2 3 ON_CURVE.
curve_get_point_status 2 4 ON_CURVE.
curve_get_point_status 2 5 ABOVE_CURVE.

View File

@ -0,0 +1,23 @@
#-----------------------------------------------------------
# Data block
#-----------------------------------------------------------
# Number of curves
4
a 0 0 1 -1 0 1 0
s -1 0 1 2
s -1 2 1 0
a 0 0 1 0 1 1 0
#-----------------------------------------------------------
# Number of "stand alone" points
3
-0.5 0
0 0
0.5 0
#-----------------------------------------------------------
# Execution block
#-----------------------------------------------------------
nearest_intersection_to_right 0 1 0 0 1 0 1 TRUE.
nearest_intersection_to_right 0 2 0 0 1 0 1 TRUE.
nearest_intersection_to_right 0 1 1 0 0 0 0 FALSE.
nearest_intersection_to_right 1 2 2 0 0 0 0 FALSE.
nearest_intersection_to_right 0 3 0 0 1 1 0 TRUE.