-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.txt
128 lines (81 loc) · 2.46 KB
/
test.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
Test vspool library
Import:
>>> from vspool import *
These numbers were verified by Rhino drawing of configuration.
See tests.PNG
Base Test:
>>> Cx,Cy = 0,4 # center of spool
>>> Px,Py = 7,-1 # point being plotted
>>> r = 3 # radius of spool
>>> cs = vspoolinverse(Cx,Cy,Px,Py,r)
>>> print(cs)
10.9916946...
The same, but abbreviated: Test #1
>>> print(vspoolinverse(0,4,7,-1,3))
10.9916946...
>>> print(vspoolinversecc(0,4,7,-1,3))
16.694975679575...
Below and to the left: Test #2
>>> print(vspoolinverse(0,4,-3,0,3))
12.573395633...
>>> print(vspoolinversecc(0,4,-3,0,3))
8.71238898...
Above and to the left:
This is an interesting case in that it shows that the top of the spool is an arbitrary measurement starting point.
The length of the line not touching the spool is added, and the length of the line which would touch if wrapped around is subtracted.
>>> print(vspoolinverse(0,4,-1,9,3))
0.705574...
>>> print(vspoolinversecc(0,4,-1,9,3))
1.889947732...
All quandrants test series, verified with Rhino
Test #4:
>>> print(vspoolinverse(1,3,2,6,2))
1.3208366...
>>> print(vspoolinversecc(1,3,2,6,2))
0.0338343864...
Test #5:
>>> print(vspoolinverse(1,3,4,4,2))
3.175427...
>>> print(vspoolinversecc(1,3,4,4,2))
10.74561456476...
Test #6:
>>> print(vspoolinverse(1,3,4,2,2))
4.462429257581...
>>> print(vspoolinversecc(1,3,4,2,2))
9.458612347174...
Test #7:
>>> print(vspoolinverse(1,3,2,0,2))
6.31701969...
>>> print(vspoolinversecc(1,3,2,0,2))
7.604021911...
Test #8: (------- Note! expected values mirror along this line -------)
>>> print(vspoolinverse(1,3,0,0,2))
7.604021911...
>>> print(vspoolinversecc(1,3,0,0,2))
6.31701969...
Test #9:
>>> print(vspoolinverse(1,3,-2,2,2))
9.458612347174...
>>> print(vspoolinversecc(1,3,-2,2,2))
4.462429257581...
Test #10:
>>> print(vspoolinverse(1,3,-2,4,2))
10.74561456476...
>>> print(vspoolinversecc(1,3,-2,4,2))
3.175427...
Test #11:
>>> print(vspoolinverse(1,3,0,6,2))
0.0338343864...
>>> print(vspoolinversecc(1,3,0,6,2))
1.3208366...
--------------- Forward calculation tests ---------------------
Control line at top of spool leading out to right:
>>> print(vspoolforward(1,1,1,5,pi/2))
(6.0, 2.0)
Control line at right side of spool leading straight down:
>>> print(vspoolforward(1,1,1,5,0))
(2.0, -2.4292036732...)
Control line at bottom of spool leading left:
>>> print(vspoolforward(1,1,1,5,-pi/2+0.001))
(-0.8584064..., -0.0018589070...)
end of tests.