grid_generator 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acddab5011b965463fd4d6c32658625dc9d422d6a2d77783eb5781f96eab7b61
|
4
|
+
data.tar.gz: a36995c4a1245a747c40a085e44449f9aeb99e702985fd05b19432c345a5bcbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d696ab2d3b0e3b159a187ab8a9d57f9e32fa783fd7eeb63ffdb8d379cd7c09395310f6082aa4dbb513bffda5e86701e96a97242efb4f25457c04af3c01fbe697
|
7
|
+
data.tar.gz: c51a85633fa079e31ea14dca1e4d54699a890f031bb8de2764abeb406667d0cfc45859f32b2782f2e875e15e0d7ed61e7ce97a4c74802f19e747707cdddcfc28
|
data/Gemfile.lock
CHANGED
@@ -50,34 +50,34 @@ module GridGenerator
|
|
50
50
|
case [row_num, col_num]
|
51
51
|
when [0, 0] # Left Up
|
52
52
|
[
|
53
|
-
[ x, y ],
|
54
|
-
[ x+2*units, y+units ],
|
55
|
-
[ x, y+2*units ]
|
53
|
+
Matrix.column_vector([ x, y ]),
|
54
|
+
Matrix.column_vector([ x+2*units, y+units ]),
|
55
|
+
Matrix.column_vector([ x, y+2*units ])
|
56
56
|
]
|
57
57
|
when [0, side_size] # Left Front
|
58
58
|
[
|
59
|
-
[ x, y ],
|
60
|
-
[ x+2*units, y+units ],
|
61
|
-
[ x+2*units, y+3*units ]
|
59
|
+
Matrix.column_vector([ x, y ]),
|
60
|
+
Matrix.column_vector([ x+2*units, y+units ]),
|
61
|
+
Matrix.column_vector([ x+2*units, y+3*units ])
|
62
62
|
]
|
63
63
|
when [side_size, 0] # Left Left
|
64
64
|
[
|
65
|
-
[ x, y ],
|
66
|
-
[ x+2*units, y+3*units ],
|
67
|
-
[ x, y+2*units ]
|
65
|
+
Matrix.column_vector([ x, y ]),
|
66
|
+
Matrix.column_vector([ x+2*units, y+3*units ]),
|
67
|
+
Matrix.column_vector([ x, y+2*units ])
|
68
68
|
]
|
69
69
|
when [side_size, side_size] # Left Down
|
70
70
|
[
|
71
|
-
[ x+2*units, y ],
|
72
|
-
[ x+2*units, y+2*units ],
|
73
|
-
[ x, y+units ]
|
71
|
+
Matrix.column_vector([ x+2*units, y ]),
|
72
|
+
Matrix.column_vector([ x+2*units, y+2*units ]),
|
73
|
+
Matrix.column_vector([ x, y+units ])
|
74
74
|
]
|
75
75
|
when [(side_size/2), (side_size/2)] # Left Center
|
76
76
|
[
|
77
|
-
[ x+2*units, y ],
|
78
|
-
[ x+4*units, y+3*units ],
|
79
|
-
[ x+2*units, y+4*units ],
|
80
|
-
[ x, y+units ]
|
77
|
+
Matrix.column_vector([ x+2*units, y ]),
|
78
|
+
Matrix.column_vector([ x+4*units, y+3*units ]),
|
79
|
+
Matrix.column_vector([ x+2*units, y+4*units ]),
|
80
|
+
Matrix.column_vector([ x, y+units ])
|
81
81
|
]
|
82
82
|
else
|
83
83
|
nil
|
@@ -42,7 +42,7 @@ module GridGenerator
|
|
42
42
|
when [(side_size/2),(side_size/2)] # Right Center
|
43
43
|
grid_y+(side_size/2)*units
|
44
44
|
else
|
45
|
-
nil
|
45
|
+
nil
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
@@ -50,34 +50,34 @@ module GridGenerator
|
|
50
50
|
case [row_num, col_num]
|
51
51
|
when [0, 0] # Right Front
|
52
52
|
[
|
53
|
-
[ x, y+units ],
|
54
|
-
[ x+2*units, y ],
|
55
|
-
[ x, y+3*units ]
|
53
|
+
Matrix.column_vector([ x, y+units ]),
|
54
|
+
Matrix.column_vector([ x+2*units, y ]),
|
55
|
+
Matrix.column_vector([ x, y+3*units ])
|
56
56
|
]
|
57
57
|
when [0, side_size] # Right Up
|
58
58
|
[
|
59
|
-
[ x, y+units ],
|
60
|
-
[ x+2*units, y ],
|
61
|
-
[ x+2*units, y+2*units ]
|
59
|
+
Matrix.column_vector([ x, y+units ]),
|
60
|
+
Matrix.column_vector([ x+2*units, y ]),
|
61
|
+
Matrix.column_vector([ x+2*units, y+2*units ])
|
62
62
|
]
|
63
63
|
when [side_size, 0] # Right Down
|
64
64
|
[
|
65
|
-
[ x, y ],
|
66
|
-
[ x+2*units, y+units ],
|
67
|
-
[ x, y+2*units ]
|
65
|
+
Matrix.column_vector([ x, y ]),
|
66
|
+
Matrix.column_vector([ x+2*units, y+units ]),
|
67
|
+
Matrix.column_vector([ x, y+2*units ])
|
68
68
|
]
|
69
69
|
when [side_size, side_size] # Right Right
|
70
70
|
[
|
71
|
-
[ x+2*units, y ],
|
72
|
-
[ x+2*units, y+2*units ],
|
73
|
-
[ x, y+3*units ]
|
71
|
+
Matrix.column_vector([ x+2*units, y ]),
|
72
|
+
Matrix.column_vector([ x+2*units, y+2*units ]),
|
73
|
+
Matrix.column_vector([ x, y+3*units ])
|
74
74
|
]
|
75
75
|
when [(side_size/2), (side_size/2)] # Right Center
|
76
76
|
[
|
77
|
-
[ x+2*units, y ],
|
78
|
-
[ x+4*units, y+units ],
|
79
|
-
[ x+2*units, y+4*units ],
|
80
|
-
[ x, y+3*units ]
|
77
|
+
Matrix.column_vector([ x+2*units, y ]),
|
78
|
+
Matrix.column_vector([ x+4*units, y+units ]),
|
79
|
+
Matrix.column_vector([ x+2*units, y+4*units ]),
|
80
|
+
Matrix.column_vector([ x, y+3*units ])
|
81
81
|
]
|
82
82
|
else
|
83
83
|
[]
|
@@ -50,34 +50,34 @@ module GridGenerator
|
|
50
50
|
case [row_num, col_num]
|
51
51
|
when [0, 0] # Top Back
|
52
52
|
[
|
53
|
-
[ x+2*units, y ],
|
54
|
-
[ x+4*units, y+units ],
|
55
|
-
[ x, y+units ]
|
53
|
+
Matrix.column_vector([ x+2*units, y ]),
|
54
|
+
Matrix.column_vector([ x+4*units, y+units ]),
|
55
|
+
Matrix.column_vector([ x, y+units ])
|
56
56
|
]
|
57
57
|
when [0, side_size] # Top Right
|
58
58
|
[
|
59
|
-
[ x, y ],
|
60
|
-
[ x+2*units, y+units ],
|
61
|
-
[ x, y+2*units ]
|
59
|
+
Matrix.column_vector([ x, y ]),
|
60
|
+
Matrix.column_vector([ x+2*units, y+units ]),
|
61
|
+
Matrix.column_vector([ x, y+2*units ])
|
62
62
|
]
|
63
63
|
when [side_size, 0] # Top Left
|
64
64
|
[
|
65
|
-
[ x+2*units, y ],
|
66
|
-
[ x+2*units, y+2*units ],
|
67
|
-
[ x, y+units ]
|
65
|
+
Matrix.column_vector([ x+2*units, y ]),
|
66
|
+
Matrix.column_vector([ x+2*units, y+2*units ]),
|
67
|
+
Matrix.column_vector([ x, y+units ])
|
68
68
|
]
|
69
69
|
when [side_size, side_size] # Top Front
|
70
70
|
[
|
71
|
-
[ x, y ],
|
72
|
-
[ x+4*units, y ],
|
73
|
-
[ x+2*units, y+units ]
|
71
|
+
Matrix.column_vector([ x, y ]),
|
72
|
+
Matrix.column_vector([ x+4*units, y ]),
|
73
|
+
Matrix.column_vector([ x+2*units, y+units ])
|
74
74
|
]
|
75
75
|
when [(side_size/2), (side_size/2)] # Top Center
|
76
76
|
[
|
77
|
-
[ x, y ],
|
78
|
-
[ x+4*units, y ],
|
79
|
-
[ x+4*units, y+2*units ],
|
80
|
-
[ x, y+2*units ]
|
77
|
+
Matrix.column_vector([ x, y ]),
|
78
|
+
Matrix.column_vector([ x+4*units, y ]),
|
79
|
+
Matrix.column_vector([ x+4*units, y+2*units ]),
|
80
|
+
Matrix.column_vector([ x, y+2*units ])
|
81
81
|
]
|
82
82
|
else
|
83
83
|
nil
|