diff --git a/examples/chrome_dino.scad b/examples/chrome_dino.scad index 66e55679..0930c6ec 100644 --- a/examples/chrome_dino.scad +++ b/examples/chrome_dino.scad @@ -1,5 +1,5 @@ -use ; -use ; +use ; +use ; w = 5; merged_dino = false; @@ -136,7 +136,7 @@ module cactus(w) { translate([2 * w, w * 7]) scale(w) blocks( - px_polygon([ + vx_polygon([ [0, 2], [3, 2], [5, 4], @@ -152,7 +152,7 @@ module cactus(w) { translate([-2 * w, w * 5]) scale(w) blocks( - px_polygon([ + vx_polygon([ [-1, 0], [-3, 0], [-6, 2], @@ -167,7 +167,7 @@ module cactus(w) { scale(w) blocks( - px_polygon([ + vx_polygon([ [-2, 0], [2, 0], [2, 20], @@ -187,11 +187,11 @@ module base(w, base_x_blocks, base_y_blocks) { translate([0, base_y_blocks * w / 2]) scale(w) - blocks(px_circle(base_y_blocks / 2, filled = true)); + blocks(vx_circle(base_y_blocks / 2, filled = true)); translate([base_x_blocks * w, base_y_blocks * w / 2]) scale(w) - blocks(px_circle(base_y_blocks / 2, filled = true)); + blocks(vx_circle(base_y_blocks / 2, filled = true)); } } diff --git a/examples/dot_photo_sphere.scad b/examples/dot_photo_sphere.scad index 5066e8e7..e7b29390 100644 --- a/examples/dot_photo_sphere.scad +++ b/examples/dot_photo_sphere.scad @@ -1,4 +1,4 @@ -use ; +use ; use ; photo_size = [100, 100]; @@ -106,7 +106,7 @@ levels = [ [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255] ]; -dots = px_gray(levels, center = true, normalize = true); +dots = vx_gray(levels, center = true, normalize = true); color("white") for(dot = dots) { diff --git a/examples/stereographic_caterpillar.scad b/examples/stereographic_caterpillar.scad index 785ca8b7..1941507c 100644 --- a/examples/stereographic_caterpillar.scad +++ b/examples/stereographic_caterpillar.scad @@ -1,4 +1,4 @@ -use ; +use ; use ; px_width = 0.8; @@ -107,7 +107,7 @@ levels = [ ]; module shadow(levels, px_width) { - dots = px_gray(levels, center = true, normalize = true); + dots = vx_gray(levels, center = true, normalize = true); difference() { square(len(levels), center = true); render() union() { diff --git a/examples/taiwan/TaiwaneseBlackBear.scad b/examples/taiwan/TaiwaneseBlackBear.scad index 84aba230..2a8476a6 100644 --- a/examples/taiwan/TaiwaneseBlackBear.scad +++ b/examples/taiwan/TaiwaneseBlackBear.scad @@ -1,8 +1,8 @@ use ; -use ; -use ; -use ; -use ; +use ; +use ; +use ; +use ; module blocks(points) { for(pt = points) { @@ -14,32 +14,32 @@ module blocks(points) { // Well, quick and dirty!! color("MediumSeaGreen") translate([3, -5, -27]) - for(pt = px_polygon([for(p = shape_taiwan(92, distance = 1)) [round(p[0]), round(p[1])]], filled = true)) { + for(pt = vx_polygon([for(p = shape_taiwan(92, distance = 1)) [round(p[0]), round(p[1])]], filled = true)) { translate(pt) linear_extrude(1, scale = 0.5) square(1, center = true); } color(c = [0.3, 0.3, 0.3]) { - blocks(px_sphere(10)); - translate([7, 0, 9]) blocks(px_sphere(3)); - translate([-7, 0, 9]) blocks(px_sphere(3)); - translate([0, 0, -13]) blocks(px_sphere(12)); - translate([6, 0, -26]) blocks(px_cylinder([3, 4], 6)); - translate([-6, 0, -26]) blocks(px_cylinder([3, 4], 6)) + blocks(vx_sphere(10)); + translate([7, 0, 9]) blocks(vx_sphere(3)); + translate([-7, 0, 9]) blocks(vx_sphere(3)); + translate([0, 0, -13]) blocks(vx_sphere(12)); + translate([6, 0, -26]) blocks(vx_cylinder([3, 4], 6)); + translate([-6, 0, -26]) blocks(vx_cylinder([3, 4], 6)) translate([10, 0, -13]) cube([6, 5, 10], center = true); translate([-10, 0, -13]) cube([6, 5, 10], center = true); } color("white") { - translate([3, -7, 2]) blocks(px_sphere(2)); - translate([-3, -7, 2]) blocks(px_sphere(2)); - translate([0, -7, 0]) blocks(px_sphere(3)); - translate([0, -9, -4]) blocks(px_sphere(1)); - blocks(px_polyline([[0, -12, -10], [5, -9, -7], [8, -6, -6]])); - blocks(px_polyline([[0, -12, -10], [5, -9, -8], [8, -6, -7]])); - blocks(px_polyline([[0, -12, -10], [5, -9, -9], [8, -6, -8]])); - blocks(px_polyline([[0, -12, -10], [5, -9, -9], [8, -6, -8]])); - blocks(px_polyline([[0, -12, -10], [-5, -9, -7], [-8, -6, -6]])); - blocks(px_polyline([[0, -12, -10], [-5, -9, -8], [-8, -6, -7]])); - blocks(px_polyline([[0, -12, -10], [-5, -9, -9], [-8, -6, -8]])); + translate([3, -7, 2]) blocks(vx_sphere(2)); + translate([-3, -7, 2]) blocks(vx_sphere(2)); + translate([0, -7, 0]) blocks(vx_sphere(3)); + translate([0, -9, -4]) blocks(vx_sphere(1)); + blocks(vx_polyline([[0, -12, -10], [5, -9, -7], [8, -6, -6]])); + blocks(vx_polyline([[0, -12, -10], [5, -9, -8], [8, -6, -7]])); + blocks(vx_polyline([[0, -12, -10], [5, -9, -9], [8, -6, -8]])); + blocks(vx_polyline([[0, -12, -10], [5, -9, -9], [8, -6, -8]])); + blocks(vx_polyline([[0, -12, -10], [-5, -9, -7], [-8, -6, -6]])); + blocks(vx_polyline([[0, -12, -10], [-5, -9, -8], [-8, -6, -7]])); + blocks(vx_polyline([[0, -12, -10], [-5, -9, -9], [-8, -6, -8]])); } \ No newline at end of file diff --git a/examples/taiwan/leopard_cat_taiwan.scad b/examples/taiwan/leopard_cat_taiwan.scad index 7dcfa46d..eaa70ab1 100644 --- a/examples/taiwan/leopard_cat_taiwan.scad +++ b/examples/taiwan/leopard_cat_taiwan.scad @@ -1,4 +1,4 @@ -use ; +use ; use ; levels = [ @@ -132,7 +132,7 @@ levels = [ [196, 188, 193, 191, 185, 194, 191, 190, 196, 191, 194, 195, 162, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] ]; -dots = px_gray(levels, center = true, invert = true, normalize = true); +dots = vx_gray(levels, center = true, invert = true, normalize = true); linear_extrude(1.5) difference() { translate([6.5, -10]) rotate(22.5) diff --git a/examples/pixel_vase.scad b/examples/voxel_vase.scad similarity index 71% rename from examples/pixel_vase.scad rename to examples/voxel_vase.scad index 5131bd71..3d645880 100644 --- a/examples/pixel_vase.scad +++ b/examples/voxel_vase.scad @@ -1,6 +1,6 @@ use ; -use ; -use ; +use ; +use ; x1 = 5; x2 = 20; @@ -18,18 +18,18 @@ module pixel_vase(x1, x2, x3, thickness) { [p0, p1, p2, p3, p4] )) [round(pt[0]), round(pt[1]), round(pt[2])]]; - px_path = px_polyline(rounded_points); - leng = len(px_path); + vx_path = vx_polyline(rounded_points); + leng = len(vx_path); - for(p = px_cylinder(px_path[0][0], 1, true)) { + for(p = vx_cylinder(vx_path[0][0], 1, true)) { linear_extrude(1) translate([p[0], p[1]]) square(1.1, center = true); } for(i = [0:leng - 1]) { - r = px_path[i][0]; - for(p = px_cylinder(r, 1, thickness = thickness)) { + r = vx_path[i][0]; + for(p = vx_cylinder(r, 1, thickness = thickness)) { translate([0, 0, i]) linear_extrude(1) translate([p[0], p[1]]) diff --git a/examples/px_spiral_text.scad b/examples/vx_spiral_text.scad similarity index 95% rename from examples/px_spiral_text.scad rename to examples/vx_spiral_text.scad index 26e80fbf..a9df4318 100644 --- a/examples/px_spiral_text.scad +++ b/examples/vx_spiral_text.scad @@ -1,5 +1,5 @@ use ; -use ; +use ; tx = "3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172"; @@ -9,7 +9,7 @@ linear_extrude(2) translate(pts[i]) difference() { square(7, center = true); - render() for(p = px_ascii(tx[i], center = true)) { + render() for(p = vx_ascii(tx[i], center = true)) { translate(p) square(.8); } } diff --git a/src/voxel/_impl/_vx_circle_impl.scad b/src/voxel/_impl/_vx_circle_impl.scad new file mode 100644 index 00000000..ac99ae04 --- /dev/null +++ b/src/voxel/_impl/_vx_circle_impl.scad @@ -0,0 +1,54 @@ +function _vx_circle_y(f, y) = f >= 0 ? y - 1 : y; +function _vx_circle_ddf_y(f, ddf_y) = f >= 0 ? ddf_y + 2 : ddf_y; +function _vx_circle_f(f, ddf_y) = f >= 0 ? f + ddf_y : f; + +function _vx_circle(f, ddf_x, ddf_y, x, y, filled) = + x >= y ? [] : + let( + ny = _vx_circle_y(f, y), + nddf_y = _vx_circle_ddf_y(f, ddf_y), + nx = x + 1, + nddf_x = ddf_x + 2, + nf = _vx_circle_f(f, ddf_y) + nddf_x + ) + concat( + filled ? + concat( + [for(xi = -nx; xi <= nx; xi = xi + 1) [xi, -ny]], + [for(xi = -ny; xi <= ny; xi = xi + 1) [xi, -nx]], + [for(xi = -ny; xi <= ny; xi = xi + 1) [xi, nx]], + [for(xi = -nx; xi <= nx; xi = xi + 1) [xi, ny]] + ) + : + [ + [-nx, -ny], [nx, -ny], + [-ny, -nx], [ny, -nx], + [-ny, nx], [ny, nx], + [-nx, ny], [nx, ny] + ], + _vx_circle(nf, nddf_x, nddf_y, nx, ny, filled) + ); + +function _vx_circle_impl(radius, filled) = + let( + f = 1 - radius, + ddf_x = 1, + ddf_y = -2 * radius, + x = 0, + y = radius + ) + concat( + filled ? + concat( + [[0, radius], [0, -radius]], + [for(xi = -radius; xi <= radius; xi = xi + 1) [xi, 0]] + ) + : + [ + [0, -radius], + [-radius, 0], + [radius, 0], + [0, radius] + ], + _vx_circle(f, ddf_x, ddf_y, x, y, filled) + ); \ No newline at end of file diff --git a/src/voxel/_impl/_vx_cylinder_impl.scad b/src/voxel/_impl/_vx_cylinder_impl.scad new file mode 100644 index 00000000..de3d2bb9 --- /dev/null +++ b/src/voxel/_impl/_vx_cylinder_impl.scad @@ -0,0 +1,49 @@ +function _vx_cylinder_vx_circle(radius, filled, thickness) = + let(range = [-radius: radius - 1]) + filled ? [ + for(y = range) + for(x = range) + let(v = [x, y]) + if(norm(v) < radius) v + ] : + let(ishell = radius * radius - 2 * thickness * radius) + [ + for(y = range) + for(x = range) + let( + v = [x, y], + leng = norm(v) + ) + if(leng < radius && (leng * leng) > ishell) v + ]; + +function _vx_cylinder_diff_r(r, h, filled, thickness) = + let( + r1 = r[0], + r2 = r[1] + ) + r1 == r2 ? _vx_cylinder_same_r(r1, h, filled, thickness) : + let(dr = (r2 - r1) / (h - 1)) + [ + for(i = 0; i < h; i = i + 1) + let(r = round(r1 + dr * i)) + each [ + for(pt = _vx_cylinder_vx_circle(r, filled, thickness)) + [pt[0], pt[1], i] + ] + ]; + +function _vx_cylinder_same_r(r, h, filled, thickness) = + let(c = _vx_cylinder_vx_circle(r, filled, thickness)) + [ + for(i = 0; i < h; i = i + 1) + each [ + for(pt = c) + [pt[0], pt[1], i] + ] + ]; + +function _vx_cylinder_impl(r, h, filled, thickness) = + is_num(r) ? + _vx_cylinder_same_r(r, h, filled, thickness) : + _vx_cylinder_diff_r(r, h, filled, thickness); \ No newline at end of file diff --git a/src/voxel/_impl/_vx_from_impl.scad b/src/voxel/_impl/_vx_from_impl.scad new file mode 100644 index 00000000..e7adc30b --- /dev/null +++ b/src/voxel/_impl/_vx_from_impl.scad @@ -0,0 +1,21 @@ +function _vx_from_row(r_count, row_bits, width, height, center, invert) = + let( + half_w = width / 2, + half_h = height / 2, + offset_x = center ? 0 : half_w, + offset_y = center ? -half_h : 0, + bit = invert ? 0 : 1 + ) + [for(i = 0; i < width; i = i + 1) if(row_bits[i] == bit) [i - half_w + offset_x, r_count + offset_y]]; + +function _vx_from_impl(binaries, center, invert) = + let( + width = len(binaries[0]), + height = len(binaries), + offset_i = height / 2 + ) + [ + for(i = height - 1; i > -1; i = i - 1) + let(row = _vx_from_row(height - i - 1, binaries[i], width, height, center, invert)) + if(row != []) each row + ]; \ No newline at end of file diff --git a/src/voxel/_impl/_vx_gray_impl.scad b/src/voxel/_impl/_vx_gray_impl.scad new file mode 100644 index 00000000..fa54e3da --- /dev/null +++ b/src/voxel/_impl/_vx_gray_impl.scad @@ -0,0 +1,29 @@ +function _vx_gray_row(r_count, row_bits, width, height, center, invert, normalize) = + let( + half_w = width / 2, + half_h = height / 2, + offset_x = center ? 0 : half_w, + offset_y = center ? -half_h : 0, + level = invert ? 0 : 255, + nmal = normalize ? 255 : 1 + ) + [ + for(i = 0; i < width; i = i + 1) + if(row_bits[i] != level) + [ + [i - half_w + offset_x, r_count + offset_y], + invert ? row_bits[i] / nmal : (255 - row_bits[i]) / nmal + ] + ]; + +function _vx_gray_impl(levels, center, invert, normalize) = + let( + width = len(levels[0]), + height = len(levels), + offset_i = height / 2 + ) + [ + for(i = height - 1; i > -1; i = i - 1) + let(row = _vx_gray_row(height - i - 1, levels[i], width, height, center, invert, normalize)) + if(row != []) each row + ]; \ No newline at end of file diff --git a/src/voxel/_impl/_vx_line_impl.scad b/src/voxel/_impl/_vx_line_impl.scad new file mode 100644 index 00000000..0b6dad7d --- /dev/null +++ b/src/voxel/_impl/_vx_line_impl.scad @@ -0,0 +1,202 @@ + +use <../../__comm__/__to3d.scad>; +use <../../__comm__/__to2d.scad>; + +function _vx_line_zsgn(a) = a == 0 ? a : a / abs(a); + +// x-dominant +function _vx_line_xdominant_y(y, yd, sy) = yd >= 0 ? y + sy : y; +function _vx_line_xdominant_yd(yd, ax, ay) = (yd >= 0 ? yd - ax : yd) + ay; +function _vx_line_xdominant_z(z, zd, sz) = zd >= 0 ? z + sz : z; +function _vx_line_xdominant_zd(zd, ax, az) = (zd >= 0 ? zd - ax : zd) + az; + +function _vx_line_xdominant(start, end, a, s) = + let( + x = start[0], + y = start[1], + z = start[2], + ax = a[0], + ay = a[1], + az = a[2], + sx = s[0], + sy = s[1], + sz = s[2], + shrx = floor(ax / 2), + yd = ay - shrx, + zd = az - shrx, + endx = end[0] + ) + concat( + [start], + _vx_line_xdominant_sub( + x + sx, + _vx_line_xdominant_y(y, yd, sy), + _vx_line_xdominant_z(z, zd, sz), + endx, + a, + s, + _vx_line_xdominant_yd(yd, ax, ay), + _vx_line_xdominant_zd(zd, ax, az) + ) + ); + +function _vx_line_xdominant_sub(x, y, z, endx, a, s, yd, zd) = + let( + ax = a[0], + ay = a[1], + az = a[2], + sx = s[0], + sy = s[1], + sz = s[2] + ) + x == endx ? [] : + concat([[x, y, z]], + _vx_line_xdominant_sub( + x + sx, + _vx_line_xdominant_y(y, yd, sy), + _vx_line_xdominant_z(z, zd, sz), + endx, + a, + s, + _vx_line_xdominant_yd(yd, ax, ay), + _vx_line_xdominant_zd(zd, ax, az) + ) + ); + +// y-dominant +function _vx_line_ydominant_x(x, xd, sx) = xd >= 0 ? x + sx : x; +function _vx_line_ydominant_xd(xd, ax, ay) = (xd >= 0 ? xd - ay : xd) + ax; +function _vx_line_ydominant_z(z, zd, sz) = zd >= 0 ? z + sz : z; +function _vx_line_ydominant_zd(zd, ay, az) = (zd >= 0 ? zd - ay : zd) + az; + +function _vx_line_ydominant(start, end, a, s) = + let( + x = start[0], + y = start[1], + z = start[2], + ax = a[0], + ay = a[1], + az = a[2], + sx = s[0], + sy = s[1], + sz = s[2], + shry = floor(ay / 2), + xd = ax - shry, + zd = az - shry, + endy = end[1] + ) + concat( + [start], + _vx_line_ydominant_sub( + _vx_line_ydominant_x(x, xd, sx), + y + sy, + _vx_line_ydominant_z(z, zd, sz), + endy, + a, + s, + _vx_line_ydominant_xd(xd, ax, ay), + _vx_line_ydominant_zd(zd, ay, az) + ) + ); + +function _vx_line_ydominant_sub(x, y, z, endy, a, s, xd, zd) = + let( + ax = a[0], + ay = a[1], + az = a[2], + sx = s[0], + sy = s[1], + sz = s[2] + ) + y == endy ? [] : + concat([[x, y, z]], + _vx_line_ydominant_sub( + _vx_line_ydominant_x(x, xd, sx), + y + sy, + _vx_line_ydominant_z(z, zd, sz), + endy, + a, + s, + _vx_line_ydominant_xd(xd, ax, ay), + _vx_line_ydominant_zd(zd, ay, az) + ) + ); + +// z-dominant +function _vx_line_zdominant_x(x, xd, sx) = xd >= 0 ? x + sx : x; +function _vx_line_zdominant_xd(xd, ax, az) = (xd >= 0 ? xd - az : xd) + ax; + +function _vx_line_zdominant_y(y, yd, sy) = yd >= 0 ? y + sy : y; +function _vx_line_zdominant_yd(yd, ay, az) = (yd >= 0 ? yd - az : yd) + ay; + +function _vx_line_zdominant(start, end, a, s) = + let( + x = start[0], + y = start[1], + z = start[2], + ax = a[0], + ay = a[1], + az = a[2], + sx = s[0], + sy = s[1], + sz = s[2], + shrz = floor(az / 2), + xd = ax - shrz, + yd = ay - shrz, + endz = end[2] + ) + concat( + [start], + _vx_line_zdominant_sub( + _vx_line_zdominant_x(x, xd, sx), + _vx_line_zdominant_y(y, yd, sy), + z + sz, + endz, + a, + s, + _vx_line_zdominant_xd(xd, ax, az), + _vx_line_zdominant_yd(yd, ay, az) + ) + ); + +function _vx_line_zdominant_sub(x, y, z, endz, a, s, xd, yd) = + let( + ax = a[0], + ay = a[1], + az = a[2], + sx = s[0], + sy = s[1], + sz = s[2] + ) + z == endz ? [] : + concat([[x, y, z]], + _vx_line_zdominant_sub( + _vx_line_zdominant_x(x, xd, sx), + _vx_line_zdominant_y(y, yd, sy), + z + sz, + endz, + a, + s, + _vx_line_zdominant_xd(xd, ax, az), + _vx_line_zdominant_yd(yd, ay, az) + ) + ); + +function _vx_line_impl(p1, p2) = + let( + is_2d = len(p1) == 2, + start_pt = is_2d ? __to3d(p1) : p1, + end_pt = is_2d ? __to3d(p2) : p2, + dt = end_pt - start_pt, + ax = floor(abs(dt[0]) * 2), + ay = floor(abs(dt[1]) * 2), + az = floor(abs(dt[2]) * 2), + sx = _vx_line_zsgn(dt[0]), + sy = _vx_line_zsgn(dt[1]), + sz = _vx_line_zsgn(dt[2]), + points = ax >= max(ay, az) ? _vx_line_xdominant(start_pt, end_pt, [ax, ay, az], [sx, sy, sz]) : ( + ay >= max(ax, az) ? _vx_line_ydominant(start_pt, end_pt, [ax, ay, az], [sx, sy, sz]) : + _vx_line_zdominant(start_pt, end_pt, [ax, ay, az], [sx, sy, sz]) + ) + ) + is_2d ? [for(pt = points) __to2d(pt)] : points; \ No newline at end of file diff --git a/src/voxel/vx_ascii.scad b/src/voxel/vx_ascii.scad new file mode 100644 index 00000000..b2bd5ba5 --- /dev/null +++ b/src/voxel/vx_ascii.scad @@ -0,0 +1,971 @@ +/** +* vx_ascii.scad +* +* @copyright Justin Lin, 2020 +* @license https://opensource.org/licenses/lgpl-3.0.html +* +* @see https://openhome.cc/eGossip/OpenSCAD/lib2x-vx_ascii.html +* +**/ + +use ; + +function vx_ascii(char, center = false, invert = false) = + let(code = ord(char)) + assert(code > 31 && code < 127, "not printable character") + let( + idx = code - 32, + binaries = [ + [// " " + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "!" + [0,0,0,0,0,0,0,0], + [0,0,0,0,1,0,0,0], + [0,0,0,0,1,0,0,0], + [0,0,0,0,1,0,0,0], + [0,0,0,0,1,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,1,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "\"" + [0,0,0,0,0,0,0,0], + [0,0,0,1,0,1,0,0], + [0,0,0,1,0,1,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "#" + [0,0,0,0,0,0,0,0], + [0,0,1,0,0,1,0,0], + [0,1,1,1,1,1,1,0], + [0,0,1,0,0,1,0,0], + [0,0,1,0,0,1,0,0], + [0,1,1,1,1,1,1,0], + [0,0,1,0,0,1,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "$" + [0,0,0,0,0,0,0,0], + [0,0,0,1,0,0,0,0], + [0,0,1,1,1,1,0,0], + [0,1,0,1,0,0,0,0], + [0,0,1,1,1,1,0,0], + [0,0,0,1,0,0,1,0], + [0,1,1,1,1,1,0,0], + [0,0,0,1,0,0,0,0] + ], + [// "%" + [0,0,0,0,0,0,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,1,1,0,0], + [0,0,0,1,1,0,0,0], + [0,0,1,1,0,0,0,0], + [0,1,1,0,0,1,1,0], + [0,1,0,0,0,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "&" + [0,0,0,0,0,0,0,0], + [0,0,1,1,0,0,0,0], + [0,1,0,0,1,0,0,0], + [0,0,1,1,0,0,0,0], + [0,1,0,0,1,0,1,0], + [0,1,0,0,0,1,0,0], + [0,0,1,1,1,0,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "'" + [0,0,0,0,0,0,0,0], + [0,0,0,0,1,0,0,0], + [0,0,0,0,1,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "(" + [0,0,0,0,0,0,0,0], + [0,0,0,1,1,1,0,0], + [0,0,1,1,1,0,0,0], + [0,0,1,1,0,0,0,0], + [0,0,1,1,0,0,0,0], + [0,0,1,1,1,0,0,0], + [0,0,0,1,1,1,0,0], + [0,0,0,0,0,0,0,0] + ], + [// ")" + [0,0,0,0,0,0,0,0], + [0,0,1,1,1,0,0,0], + [0,0,0,1,1,1,0,0], + [0,0,0,0,1,1,0,0], + [0,0,0,0,1,1,0,0], + [0,0,0,1,1,1,0,0], + [0,0,1,1,1,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "*" + [0,0,0,0,0,0,0,0], + [0,1,0,1,0,1,0,0], + [0,0,1,1,1,0,0,0], + [0,0,0,1,0,0,0,0], + [0,0,1,1,1,0,0,0], + [0,1,0,1,0,1,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "+" + [0,0,0,0,0,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,1,1,1,1,1,1,0], + [0,1,1,1,1,1,1,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "," + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,1,1,0,0,0,0] + ], + [// "-" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,1,1,1,1,1,1,0], + [0,1,1,1,1,1,1,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "." + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "/" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,1,1,0], + [0,0,0,0,1,1,0,0], + [0,0,0,1,1,0,0,0], + [0,0,1,1,0,0,0,0], + [0,1,1,0,0,0,0,0], + [0,1,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "0" + [0,0,0,0,0,0,0,0], + [0,0,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,1,1,1,0], + [0,1,1,1,1,1,1,0], + [0,1,1,0,0,1,1,0], + [0,0,1,1,1,1,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "1" + [0,0,0,0,0,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,1,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,1,1,1,1,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "2" + [0,0,0,0,0,0,0,0], + [0,0,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,0,0,0,1,1,0,0], + [0,0,0,1,1,0,0,0], + [0,0,1,1,0,0,0,0], + [0,1,1,1,1,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "3" + [0,0,0,0,0,0,0,0], + [0,1,1,1,1,1,1,0], + [0,0,0,0,1,1,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,0,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,0,1,1,1,1,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "4" + [0,0,0,0,0,0,0,0], + [0,0,0,0,1,1,0,0], + [0,0,0,1,1,1,0,0], + [0,0,1,1,1,1,0,0], + [0,1,1,0,1,1,0,0], + [0,1,1,1,1,1,1,0], + [0,0,0,0,1,1,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "5" + [0,0,0,0,0,0,0,0], + [0,1,1,1,1,1,1,0], + [0,1,1,0,0,0,0,0], + [0,1,1,1,1,1,0,0], + [0,0,0,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,0,1,1,1,1,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "6" + [0,0,0,0,0,0,0,0], + [0,0,1,1,1,1,0,0], + [0,1,1,0,0,0,0,0], + [0,1,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,0,1,1,1,1,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "7" + [0,0,0,0,0,0,0,0], + [0,1,1,1,1,1,1,0], + [0,0,0,0,0,1,1,0], + [0,0,0,0,1,1,0,0], + [0,0,0,1,1,0,0,0], + [0,0,1,1,0,0,0,0], + [0,0,1,1,0,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "8" + [0,0,0,0,0,0,0,0], + [0,0,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,0,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,0,1,1,1,1,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "9" + [0,0,0,0,0,0,0,0], + [0,0,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,0,1,1,1,1,1,0], + [0,0,0,0,0,1,1,0], + [0,0,0,0,1,1,0,0], + [0,0,1,1,1,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// ":" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// ";" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,1,1,0,0,0,0] + ], + [// "<" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,1,1,0], + [0,0,0,0,1,1,0,0], + [0,0,0,1,1,0,0,0], + [0,0,1,1,0,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,0,1,1,0,0], + [0,0,0,0,0,1,1,0] + ], + [// "=" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,1,1,1,1,1,1,0], + [0,0,0,0,0,0,0,0], + [0,1,1,1,1,1,1,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// ">" + [0,0,0,0,0,0,0,0], + [0,1,1,0,0,0,0,0], + [0,0,1,1,0,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,0,1,1,0,0], + [0,0,0,1,1,0,0,0], + [0,0,1,1,0,0,0,0], + [0,1,1,0,0,0,0,0] + ], + [// "?" + [0,0,0,0,0,0,0,0], + [0,0,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,0,0,0,1,1,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "@" + [0,0,0,0,0,0,0,0], + [0,0,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,1,0,1,0], + [0,1,1,0,1,1,1,0], + [0,1,1,0,0,0,0,0], + [0,0,1,1,1,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "A" + [0,0,0,0,0,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,1,1,1,1,0], + [0,1,1,0,0,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "B" + [0,0,0,0,0,0,0,0], + [0,1,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,1,1,1,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "C" + [0,0,0,0,0,0,0,0], + [0,0,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,0,0,0], + [0,1,1,0,0,0,0,0], + [0,1,1,0,0,1,1,0], + [0,0,1,1,1,1,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "D" + [0,0,0,0,0,0,0,0], + [0,1,1,1,1,0,0,0], + [0,1,1,0,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,1,1,0,0], + [0,1,1,1,1,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "E" + [0,0,0,0,0,0,0,0], + [0,1,1,1,1,1,1,0], + [0,1,1,0,0,0,0,0], + [0,1,1,1,1,1,0,0], + [0,1,1,0,0,0,0,0], + [0,1,1,0,0,0,0,0], + [0,1,1,1,1,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "F" + [0,0,0,0,0,0,0,0], + [0,1,1,1,1,1,1,0], + [0,1,1,0,0,0,0,0], + [0,1,1,1,1,1,0,0], + [0,1,1,0,0,0,0,0], + [0,1,1,0,0,0,0,0], + [0,1,1,0,0,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "G" + [0,0,0,0,0,0,0,0], + [0,0,1,1,1,1,1,0], + [0,1,1,0,0,0,0,0], + [0,1,1,0,0,0,0,0], + [0,1,1,0,1,1,1,0], + [0,1,1,0,0,1,1,0], + [0,0,1,1,1,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "H" + [0,0,0,0,0,0,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,1,1,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "I" + [0,0,0,0,0,0,0,0], + [0,1,1,1,1,1,1,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,1,1,1,1,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "J" + [0,0,0,0,0,0,0,0], + [0,0,0,1,1,1,1,0], + [0,0,0,0,1,1,0,0], + [0,0,0,0,1,1,0,0], + [0,0,0,0,1,1,0,0], + [0,1,0,0,1,1,0,0], + [0,1,1,1,1,1,0,0], + [0,0,0,0,0,0,0,0], + ], + [// "K" + [0,0,0,0,0,0,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,1,1,0,0], + [0,1,1,1,1,0,0,0], + [0,1,1,1,1,0,0,0], + [0,1,1,0,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "L" + [0,0,0,0,0,0,0,0], + [0,1,1,0,0,0,0,0], + [0,1,1,0,0,0,0,0], + [0,1,1,0,0,0,0,0], + [0,1,1,0,0,0,0,0], + [0,1,1,0,0,0,0,0], + [0,1,1,1,1,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "M" + [0,0,0,0,0,0,0,0], + [1,1,0,0,0,1,1,0], + [1,1,1,0,1,1,1,0], + [1,1,1,1,1,1,1,0], + [1,1,0,1,0,1,1,0], + [1,1,0,0,0,1,1,0], + [1,1,0,0,0,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "N" + [0,0,0,0,0,0,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,1,0,1,1,0], + [0,1,1,1,1,1,1,0], + [0,1,1,1,1,1,1,0], + [0,1,1,0,1,1,1,0], + [0,1,1,0,0,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "O" + [0,0,0,0,0,0,0,0], + [0,0,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,0,1,1,1,1,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "P" + [0,0,0,0,0,0,0,0], + [0,1,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,1,1,1,0,0], + [0,1,1,0,0,0,0,0], + [0,1,1,0,0,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "Q" + [0,0,0,0,0,0,0,0], + [0,0,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,1,1,1,0,0], + [0,0,1,1,0,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "R" + [0,0,0,0,0,0,0,0], + [0,1,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,1,1,1,0,0], + [0,1,1,0,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "S" + [0,0,0,0,0,0,0,0], + [0,0,1,1,1,1,0,0], + [0,1,1,0,0,0,0,0], + [0,0,1,1,1,1,0,0], + [0,0,0,0,0,1,1,0], + [0,0,0,0,0,1,1,0], + [0,0,1,1,1,1,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "T" + [0,0,0,0,0,0,0,0], + [0,1,1,1,1,1,1,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "U" + [0,0,0,0,0,0,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,1,1,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "V" + [0,0,0,0,0,0,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,0,1,1,1,1,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "W" + [0,0,0,0,0,0,0,0], + [1,1,0,0,0,1,1,0], + [1,1,0,0,0,1,1,0], + [1,1,0,1,0,1,1,0], + [1,1,1,1,1,1,1,0], + [1,1,1,0,1,1,1,0], + [1,1,0,0,0,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "X" + [0,0,0,0,0,0,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,0,1,1,1,1,0,0], + [0,0,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "Y" + [0,0,0,0,0,0,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,0,1,1,1,1,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "Z" + [0,0,0,0,0,0,0,0], + [0,1,1,1,1,1,1,0], + [0,0,0,0,1,1,0,0], + [0,0,0,1,1,0,0,0], + [0,0,1,1,0,0,0,0], + [0,1,1,0,0,0,0,0], + [0,1,1,1,1,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "/" + [0,0,0,0,0,0,0,0], + [0,0,1,1,1,1,0,0], + [0,0,1,1,0,0,0,0], + [0,0,1,1,0,0,0,0], + [0,0,1,1,0,0,0,0], + [0,0,1,1,0,0,0,0], + [0,0,1,1,1,1,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "\\" + [0,0,0,0,0,0,0,0], + [0,1,1,0,0,0,0,0], + [0,0,1,1,0,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,0,1,1,0,0], + [0,0,0,0,0,1,1,0], + [0,0,0,0,0,0,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "]" + [0,0,0,0,0,0,0,0], + [0,0,1,1,1,1,0,0], + [0,0,0,0,1,1,0,0], + [0,0,0,0,1,1,0,0], + [0,0,0,0,1,1,0,0], + [0,0,0,0,1,1,0,0], + [0,0,1,1,1,1,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "^" + [0,0,0,0,0,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,1,0,0,0,0,1,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "_" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [1,1,1,1,1,1,1,1] + ], + [// "`" + [0,0,0,0,0,0,0,0], + [0,0,0,1,0,0,0,0], + [0,0,0,0,1,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "a" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,1,1,1,1,0,0], + [0,0,0,0,0,1,1,0], + [0,0,1,1,1,1,1,0], + [0,1,1,0,0,1,1,0], + [0,0,1,1,1,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "b" + [0,0,0,0,0,0,0,0], + [0,1,1,0,0,0,0,0], + [0,1,1,0,0,0,0,0], + [0,1,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,1,1,1,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "c" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,1,1,1,1,0,0], + [0,1,1,0,0,0,0,0], + [0,1,1,0,0,0,0,0], + [0,1,1,0,0,0,0,0], + [0,0,1,1,1,1,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "d" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,1,1,0], + [0,0,0,0,0,1,1,0], + [0,0,1,1,1,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,0,1,1,1,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "e" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,1,1,1,1,0], + [0,1,1,0,0,0,0,0], + [0,0,1,1,1,1,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "f" + [0,0,0,0,0,0,0,0], + [0,0,0,0,1,1,1,0], + [0,0,0,1,1,0,0,0], + [0,0,1,1,1,1,1,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "g" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,0,1,1,1,1,1,0], + [0,0,0,0,0,1,1,0], + [0,1,1,1,1,1,0,0] + ], + [// "h" + [0,0,0,0,0,0,0,0], + [0,1,1,0,0,0,0,0], + [0,1,1,0,0,0,0,0], + [0,1,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "i" + [0,0,0,0,0,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,1,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,1,1,1,1,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "j" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,1,1,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,1,1,0], + [0,0,0,0,0,1,1,0], + [0,0,0,0,0,1,1,0], + [0,0,0,0,0,1,1,0], + [0,0,1,1,1,1,0,0] + ], + [// "k" + [0,0,0,0,0,0,0,0], + [0,1,1,0,0,0,0,0], + [0,1,1,0,0,0,0,0], + [0,1,1,0,1,1,0,0], + [0,1,1,1,1,0,0,0], + [0,1,1,0,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "l" + [0,0,0,0,0,0,0,0], + [0,0,1,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,1,1,1,1,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "m" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,1,1,1,1,1], + [0,1,1,1,1,1,1,1], + [0,1,1,0,1,0,1,1], + [0,1,1,0,0,0,1,1], + [0,0,0,0,0,0,0,0] + ], + [// "n" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,1,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "o" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,0,1,1,1,1,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "p" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,1,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,1,1,1,0,0], + [0,1,1,0,0,0,0,0], + [0,1,1,0,0,0,0,0] + ], + [// "q" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,1,1,1,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,0,1,1,1,1,1,0], + [0,0,0,0,0,1,1,0], + [0,0,0,0,0,1,1,0] + ], + [// "r" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,1,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,0,0,0], + [0,1,1,0,0,0,0,0], + [0,1,1,0,0,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "s" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,1,1,1,1,1,0], + [0,1,1,0,0,0,0,0], + [0,0,1,1,1,1,0,0], + [0,0,0,0,0,1,1,0], + [0,1,1,1,1,1,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "t" + [0,0,0,0,0,0,0,0], + [0,0,0,1,1,0,0,0], + [0,1,1,1,1,1,1,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,0,1,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "u" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,0,1,1,1,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "v" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,1,1,0,0,1,1,0], + [0,0,1,1,1,1,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "w" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,1,1,0,0,0,1,1], + [0,1,1,0,1,0,1,1], + [0,1,1,1,1,1,1,1], + [0,0,1,1,1,1,1,0], + [0,0,1,1,0,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "x" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,1,1,0,0,1,1,0], + [0,0,1,1,1,1,0,0], + [0,0,0,1,1,0,0,0], + [0,0,1,1,1,1,0,0], + [0,1,1,0,0,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "y" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,1,1,1,1,1,1,0], + [0,0,0,0,1,1,0,0], + [0,0,0,1,1,0,0,0], + [0,0,1,1,0,0,0,0], + [0,1,1,1,1,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "z" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,1,1,1,1,1,1,0], + [0,0,0,0,1,1,0,0], + [0,0,0,1,1,0,0,0], + [0,0,1,1,0,0,0,0], + [0,1,1,1,1,1,1,0], + [0,0,0,0,0,0,0,0] + ], + [// "{" + [0,0,0,0,0,0,0,0], + [0,0,0,1,1,1,0,0], + [0,0,1,1,0,0,0,0], + [0,1,1,1,0,0,0,0], + [0,1,1,1,0,0,0,0], + [0,0,1,1,0,0,0,0], + [0,0,0,1,1,1,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "|" + [0,0,0,0,0,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,1,1,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "}" + [0,0,0,0,0,0,0,0], + [0,0,1,1,1,0,0,0], + [0,0,0,0,1,1,0,0], + [0,0,0,0,1,1,1,0], + [0,0,0,0,1,1,1,0], + [0,0,0,0,1,1,0,0], + [0,0,1,1,1,0,0,0], + [0,0,0,0,0,0,0,0] + ], + [// "~" + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,1,1,0,0,0,0], + [0,1,0,1,1,0,1,0], + [0,0,0,0,1,1,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0] + ] + ] + ) + vx_from(binaries[idx], center = center, invert = invert); \ No newline at end of file diff --git a/src/voxel/vx_circle.scad b/src/voxel/vx_circle.scad new file mode 100644 index 00000000..83ff2662 --- /dev/null +++ b/src/voxel/vx_circle.scad @@ -0,0 +1,17 @@ +/** +* vx_circle.scad +* +* @copyright Justin Lin, 2020 +* @license https://opensource.org/licenses/lgpl-3.0.html +* +* @see https://openhome.cc/eGossip/OpenSCAD/lib2x-vx_circle.html +* +**/ + +use <_impl/_vx_circle_impl.scad>; +use <../util/sort.scad>; +use <../util/dedup.scad>; + +function vx_circle(radius, filled = false) = + let(all = _vx_circle_impl(radius, filled)) + dedup(sort(all, by = "vt"), sorted = true); \ No newline at end of file diff --git a/src/voxel/vx_cylinder.scad b/src/voxel/vx_cylinder.scad new file mode 100644 index 00000000..0c44cdfd --- /dev/null +++ b/src/voxel/vx_cylinder.scad @@ -0,0 +1,17 @@ +/** +* vx_cylinder.scad +* +* @copyright Justin Lin, 2020 +* @license https://opensource.org/licenses/lgpl-3.0.html +* +* @see https://openhome.cc/eGossip/OpenSCAD/lib2x-vx_cylinder.html +* +**/ + +use <_impl/_vx_cylinder_impl.scad>; +use <../util/sort.scad>; +use <../util/dedup.scad>; + +function vx_cylinder(r, h, filled = false, thickness = 1) = + let(all = _vx_cylinder_impl(r, h, filled, thickness)) + dedup(sort(all, by = "vt"), sorted = true); \ No newline at end of file diff --git a/src/voxel/vx_difference.scad b/src/voxel/vx_difference.scad new file mode 100644 index 00000000..c2535e8f --- /dev/null +++ b/src/voxel/vx_difference.scad @@ -0,0 +1,6 @@ +use <../util/sort.scad>; +use <../util/has.scad>; + +function vx_difference(points1, points2) = + let(sorted = sort(points2, by = "vt")) + [for(p = points1) if(!has(sorted, p, sorted = true)) p]; \ No newline at end of file diff --git a/src/voxel/vx_from.scad b/src/voxel/vx_from.scad new file mode 100644 index 00000000..8ff72567 --- /dev/null +++ b/src/voxel/vx_from.scad @@ -0,0 +1,13 @@ +/** +* vx_from.scad +* +* @copyright Justin Lin, 2020 +* @license https://opensource.org/licenses/lgpl-3.0.html +* +* @see https://openhome.cc/eGossip/OpenSCAD/lib2x-vx_from.html +* +**/ + +use <_impl/_vx_from_impl.scad>; + +function vx_from(binaries, center = false, invert = false) = _vx_from_impl(binaries, center, invert); \ No newline at end of file diff --git a/src/voxel/vx_gray.scad b/src/voxel/vx_gray.scad new file mode 100644 index 00000000..dcbed2d2 --- /dev/null +++ b/src/voxel/vx_gray.scad @@ -0,0 +1,14 @@ +/** +* vx_gray.scad +* +* @copyright Justin Lin, 2020 +* @license https://opensource.org/licenses/lgpl-3.0.html +* +* @see https://openhome.cc/eGossip/OpenSCAD/lib2x-vx_gray.html +* +**/ + +use <_impl/_vx_gray_impl.scad>; + +function vx_gray(levels, center = false, invert = false, normalize = false) = + _vx_gray_impl(levels, center, invert, normalize); \ No newline at end of file diff --git a/src/voxel/vx_intersection.scad b/src/voxel/vx_intersection.scad new file mode 100644 index 00000000..04f99344 --- /dev/null +++ b/src/voxel/vx_intersection.scad @@ -0,0 +1,11 @@ +use <../util/sort.scad>; +use <../util/has.scad>; + +function vx_intersection(points1, points2) = + let( + leng1 = len(points1), + leng2 = len(points2), + pts_pair = leng1 > leng2 ? [points1, points2] : [points2, points1], + sorted = sort(pts_pair[1], by = "vt") + ) + [for(p = pts_pair[0]) if(has(sorted, p, sorted = true)) p]; \ No newline at end of file diff --git a/src/voxel/vx_line.scad b/src/voxel/vx_line.scad new file mode 100644 index 00000000..0381ac3b --- /dev/null +++ b/src/voxel/vx_line.scad @@ -0,0 +1,13 @@ +/** +* vx_line.scad +* +* @copyright Justin Lin, 2020 +* @license https://opensource.org/licenses/lgpl-3.0.html +* +* @see https://openhome.cc/eGossip/OpenSCAD/lib2x-vx_line.html +* +**/ + +use <_impl/_vx_line_impl.scad>; + +function vx_line(p1, p2) = _vx_line_impl(p1, p2); \ No newline at end of file diff --git a/src/voxel/vx_polygon.scad b/src/voxel/vx_polygon.scad new file mode 100644 index 00000000..8ce50534 --- /dev/null +++ b/src/voxel/vx_polygon.scad @@ -0,0 +1,31 @@ +use <../in_shape.scad>; +use <../util/sort.scad>; +use <../util/dedup.scad>; +use ; + +function vx_polygon(points, filled = false) = + let(contour = vx_polyline(concat(points, [points[0]]))) + !filled ? contour : + let( + sortedXY = sort(contour, by = "vt"), + ys = [for(p = sortedXY) p[1]], + rows = [ + for(y = [min(ys):max(ys)]) + let( + idxes = search(y, sortedXY, num_returns_per_match = 0, index_col_num = 1) + ) + [for(i = idxes) sortedXY[i]] + ], + all = concat( + sortedXY, + [ + for(row = rows) + let(to = len(row) - 1, y = row[0][1]) + if(to > 0 && (row[0][0] + 1 != row[to][0])) + for(i = [row[0][0] + 1:row[to][0] - 1]) + let(p = [i, y]) + if(in_shape(points, p)) p + ] + ) + ) + dedup(sort(all, by = "vt"), sorted = true); \ No newline at end of file diff --git a/src/voxel/vx_polyline.scad b/src/voxel/vx_polyline.scad new file mode 100644 index 00000000..169d1a43 --- /dev/null +++ b/src/voxel/vx_polyline.scad @@ -0,0 +1,28 @@ +/** +* vx_polyline.scad +* +* @copyright Justin Lin, 2020 +* @license https://opensource.org/licenses/lgpl-3.0.html +* +* @see https://openhome.cc/eGossip/OpenSCAD/lib2x-vx_polyline.html +* +**/ + +use <../__comm__/__to3d.scad>; +use <../__comm__/__to2d.scad>; +use <../__comm__/__lines_from.scad>; +use <../util/sort.scad>; +use <../util/dedup.scad>; +use ; + +function vx_polyline(points) = + let( + is_2d = len(points[0]) == 2, + pts = is_2d ? [for(pt = points) __to3d(pt)] : points, + polyline = [for(line = __lines_from(pts)) each vx_line(line[0], line[1])] + ) + dedup(is_2d ? + sort([for(pt = polyline) __to2d(pt)], by = "vt") + : + sort(polyline, by = "vt") + , sorted = true); \ No newline at end of file diff --git a/src/voxel/vx_sphere.scad b/src/voxel/vx_sphere.scad new file mode 100644 index 00000000..970c0880 --- /dev/null +++ b/src/voxel/vx_sphere.scad @@ -0,0 +1,31 @@ +/** +* vx_sphere.scad +* +* @copyright Justin Lin, 2020 +* @license https://opensource.org/licenses/lgpl-3.0.html +* +* @see https://openhome.cc/eGossip/OpenSCAD/lib2x-vx_sphere.html +* +**/ + +function vx_sphere(radius, filled = false, thickness = 1) = + let(range = [-radius: radius - 1]) + filled ? [ + for(z = range) + for(y = range) + for(x = range) + let(v = [x, y, z]) + if(norm(v) < radius) v + ] : + let(ishell = radius * radius - 2 * thickness * radius) + [ + for(z = range) + for(y = range) + for(x = range) + let( + v = [x, y, z], + leng = norm(v) + ) + if(leng < radius && (leng * leng) > ishell) v + ]; + \ No newline at end of file diff --git a/src/voxel/vx_union.scad b/src/voxel/vx_union.scad new file mode 100644 index 00000000..c3c3d01e --- /dev/null +++ b/src/voxel/vx_union.scad @@ -0,0 +1,8 @@ +use <../util/sort.scad>; +use <../util/dedup.scad>; + +function vx_union(points1, points2) = + dedup( + sort(concat(points1, points2), by = "vt"), + sorted = true + ); \ No newline at end of file diff --git a/test/test_all.scad b/test/test_all.scad index 1825467b..1acbefcb 100644 --- a/test/test_all.scad +++ b/test/test_all.scad @@ -69,13 +69,13 @@ include ; include ; include ; -// Pixel -include ; -include ; -include ; -include ; -include ; -include ; +// Voxel +include ; +include ; +include ; +include ; +include ; +include ; // Matrix include ; \ No newline at end of file diff --git a/test/pixel/test_px_circle.scad b/test/voxel/test_vx_circle.scad similarity index 95% rename from test/pixel/test_px_circle.scad rename to test/voxel/test_vx_circle.scad index 88c1577e..34f25d2b 100644 --- a/test/pixel/test_px_circle.scad +++ b/test/voxel/test_vx_circle.scad @@ -1,13 +1,13 @@ use ; -use ; +use ; -module test_px_circle() { - echo("==== test_px_circle ===="); +module test_vx_circle() { + echo("==== test_vx_circle ===="); expected = [[-3, -10], [-2, -10], [-1, -10], [0, -10], [1, -10], [2, -10], [3, -10], [-5, -9], [-4, -9], [-3, -9], [-2, -9], [-1, -9], [0, -9], [1, -9], [2, -9], [3, -9], [4, -9], [5, -9], [-6, -8], [-5, -8], [-4, -8], [-3, -8], [-2, -8], [-1, -8], [0, -8], [1, -8], [2, -8], [3, -8], [4, -8], [5, -8], [6, -8], [-7, -7], [-6, -7], [-5, -7], [-4, -7], [-3, -7], [-2, -7], [-1, -7], [0, -7], [1, -7], [2, -7], [3, -7], [4, -7], [5, -7], [6, -7], [7, -7], [-8, -6], [-7, -6], [-6, -6], [-5, -6], [-4, -6], [-3, -6], [-2, -6], [-1, -6], [0, -6], [1, -6], [2, -6], [3, -6], [4, -6], [5, -6], [6, -6], [7, -6], [8, -6], [-9, -5], [-8, -5], [-7, -5], [-6, -5], [-5, -5], [-4, -5], [-3, -5], [-2, -5], [-1, -5], [0, -5], [1, -5], [2, -5], [3, -5], [4, -5], [5, -5], [6, -5], [7, -5], [8, -5], [9, -5], [-9, -4], [-8, -4], [-7, -4], [-6, -4], [-5, -4], [-4, -4], [-3, -4], [-2, -4], [-1, -4], [0, -4], [1, -4], [2, -4], [3, -4], [4, -4], [5, -4], [6, -4], [7, -4], [8, -4], [9, -4], [-10, -3], [-9, -3], [-8, -3], [-7, -3], [-6, -3], [-5, -3], [-4, -3], [-3, -3], [-2, -3], [-1, -3], [0, -3], [1, -3], [2, -3], [3, -3], [4, -3], [5, -3], [6, -3], [7, -3], [8, -3], [9, -3], [10, -3], [-10, -2], [-9, -2], [-8, -2], [-7, -2], [-6, -2], [-5, -2], [-4, -2], [-3, -2], [-2, -2], [-1, -2], [0, -2], [1, -2], [2, -2], [3, -2], [4, -2], [5, -2], [6, -2], [7, -2], [8, -2], [9, -2], [10, -2], [-10, -1], [-9, -1], [-8, -1], [-7, -1], [-6, -1], [-5, -1], [-4, -1], [-3, -1], [-2, -1], [-1, -1], [0, -1], [1, -1], [2, -1], [3, -1], [4, -1], [5, -1], [6, -1], [7, -1], [8, -1], [9, -1], [10, -1], [-10, 0], [-9, 0], [-8, 0], [-7, 0], [-6, 0], [-5, 0], [-4, 0], [-3, 0], [-2, 0], [-1, 0], [0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [10, 0], [-10, 1], [-9, 1], [-8, 1], [-7, 1], [-6, 1], [-5, 1], [-4, 1], [-3, 1], [-2, 1], [-1, 1], [0, 1], [1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [6, 1], [7, 1], [8, 1], [9, 1], [10, 1], [-10, 2], [-9, 2], [-8, 2], [-7, 2], [-6, 2], [-5, 2], [-4, 2], [-3, 2], [-2, 2], [-1, 2], [0, 2], [1, 2], [2, 2], [3, 2], [4, 2], [5, 2], [6, 2], [7, 2], [8, 2], [9, 2], [10, 2], [-10, 3], [-9, 3], [-8, 3], [-7, 3], [-6, 3], [-5, 3], [-4, 3], [-3, 3], [-2, 3], [-1, 3], [0, 3], [1, 3], [2, 3], [3, 3], [4, 3], [5, 3], [6, 3], [7, 3], [8, 3], [9, 3], [10, 3], [-9, 4], [-8, 4], [-7, 4], [-6, 4], [-5, 4], [-4, 4], [-3, 4], [-2, 4], [-1, 4], [0, 4], [1, 4], [2, 4], [3, 4], [4, 4], [5, 4], [6, 4], [7, 4], [8, 4], [9, 4], [-9, 5], [-8, 5], [-7, 5], [-6, 5], [-5, 5], [-4, 5], [-3, 5], [-2, 5], [-1, 5], [0, 5], [1, 5], [2, 5], [3, 5], [4, 5], [5, 5], [6, 5], [7, 5], [8, 5], [9, 5], [-8, 6], [-7, 6], [-6, 6], [-5, 6], [-4, 6], [-3, 6], [-2, 6], [-1, 6], [0, 6], [1, 6], [2, 6], [3, 6], [4, 6], [5, 6], [6, 6], [7, 6], [8, 6], [-7, 7], [-6, 7], [-5, 7], [-4, 7], [-3, 7], [-2, 7], [-1, 7], [0, 7], [1, 7], [2, 7], [3, 7], [4, 7], [5, 7], [6, 7], [7, 7], [-6, 8], [-5, 8], [-4, 8], [-3, 8], [-2, 8], [-1, 8], [0, 8], [1, 8], [2, 8], [3, 8], [4, 8], [5, 8], [6, 8], [-5, 9], [-4, 9], [-3, 9], [-2, 9], [-1, 9], [0, 9], [1, 9], [2, 9], [3, 9], [4, 9], [5, 9], [-3, 10], [-2, 10], [-1, 10], [0, 10], [1, 10], [2, 10], [3, 10]]; - actual = px_circle(10, true); + actual = vx_circle(10, true); assertEqualPoints(expected, actual); } -test_px_circle(); \ No newline at end of file +test_vx_circle(); \ No newline at end of file diff --git a/test/pixel/test_px_cylinder.scad b/test/voxel/test_vx_cylinder.scad similarity index 98% rename from test/pixel/test_px_cylinder.scad rename to test/voxel/test_vx_cylinder.scad index 1fc514eb..72f1c4ad 100644 --- a/test/pixel/test_px_cylinder.scad +++ b/test/voxel/test_vx_cylinder.scad @@ -1,8 +1,8 @@ use ; -use ; +use ; -module test_px_cylinder() { - echo("==== test_px_cylinder ===="); +module test_vx_cylinder() { + echo("==== test_vx_cylinder ===="); r1 = 10; r2 = 5; @@ -10,13 +10,13 @@ module test_px_cylinder() { expected = [[-4, -9, 0], [-3, -9, 0], [-2, -9, 0], [-1, -9, 0], [0, -9, 0], [1, -9, 0], [2, -9, 0], [3, -9, 0], [4, -9, 0], [-5, -8, 0], [-4, -8, 0], [-3, -8, 0], [-2, -8, 0], [-1, -8, 0], [0, -8, 0], [1, -8, 0], [2, -8, 0], [3, -8, 0], [4, -8, 0], [5, -8, 0], [-7, -7, 0], [-6, -7, 0], [-5, -7, 0], [-4, -7, 0], [-3, -7, 0], [-2, -7, 0], [-1, -7, 0], [0, -7, 0], [1, -7, 0], [2, -7, 0], [3, -7, 0], [4, -7, 0], [5, -7, 0], [6, -7, 0], [7, -7, 0], [-7, -6, 0], [-6, -6, 0], [-5, -6, 0], [-4, -6, 0], [-3, -6, 0], [-2, -6, 0], [-1, -6, 0], [0, -6, 0], [1, -6, 0], [2, -6, 0], [3, -6, 0], [4, -6, 0], [5, -6, 0], [6, -6, 0], [7, -6, 0], [-8, -5, 0], [-7, -5, 0], [-6, -5, 0], [-5, -5, 0], [-4, -5, 0], [-3, -5, 0], [-2, -5, 0], [-1, -5, 0], [0, -5, 0], [1, -5, 0], [2, -5, 0], [3, -5, 0], [4, -5, 0], [5, -5, 0], [6, -5, 0], [7, -5, 0], [8, -5, 0], [-9, -4, 0], [-8, -4, 0], [-7, -4, 0], [-6, -4, 0], [-5, -4, 0], [-4, -4, 0], [-3, -4, 0], [-2, -4, 0], [-1, -4, 0], [0, -4, 0], [1, -4, 0], [2, -4, 0], [3, -4, 0], [4, -4, 0], [5, -4, 0], [6, -4, 0], [7, -4, 0], [8, -4, 0], [9, -4, 0], [-9, -3, 0], [-8, -3, 0], [-7, -3, 0], [-6, -3, 0], [-5, -3, 0], [-4, -3, 0], [-3, -3, 0], [-2, -3, 0], [-1, -3, 0], [0, -3, 0], [1, -3, 0], [2, -3, 0], [3, -3, 0], [4, -3, 0], [5, -3, 0], [6, -3, 0], [7, -3, 0], [8, -3, 0], [9, -3, 0], [-9, -2, 0], [-8, -2, 0], [-7, -2, 0], [-6, -2, 0], [-5, -2, 0], [-4, -2, 0], [-3, -2, 0], [-2, -2, 0], [-1, -2, 0], [0, -2, 0], [1, -2, 0], [2, -2, 0], [3, -2, 0], [4, -2, 0], [5, -2, 0], [6, -2, 0], [7, -2, 0], [8, -2, 0], [9, -2, 0], [-9, -1, 0], [-8, -1, 0], [-7, -1, 0], [-6, -1, 0], [-5, -1, 0], [-4, -1, 0], [-3, -1, 0], [-2, -1, 0], [-1, -1, 0], [0, -1, 0], [1, -1, 0], [2, -1, 0], [3, -1, 0], [4, -1, 0], [5, -1, 0], [6, -1, 0], [7, -1, 0], [8, -1, 0], [9, -1, 0], [-9, 0, 0], [-8, 0, 0], [-7, 0, 0], [-6, 0, 0], [-5, 0, 0], [-4, 0, 0], [-3, 0, 0], [-2, 0, 0], [-1, 0, 0], [0, 0, 0], [1, 0, 0], [2, 0, 0], [3, 0, 0], [4, 0, 0], [5, 0, 0], [6, 0, 0], [7, 0, 0], [8, 0, 0], [9, 0, 0], [-9, 1, 0], [-8, 1, 0], [-7, 1, 0], [-6, 1, 0], [-5, 1, 0], [-4, 1, 0], [-3, 1, 0], [-2, 1, 0], [-1, 1, 0], [0, 1, 0], [1, 1, 0], [2, 1, 0], [3, 1, 0], [4, 1, 0], [5, 1, 0], [6, 1, 0], [7, 1, 0], [8, 1, 0], [9, 1, 0], [-9, 2, 0], [-8, 2, 0], [-7, 2, 0], [-6, 2, 0], [-5, 2, 0], [-4, 2, 0], [-3, 2, 0], [-2, 2, 0], [-1, 2, 0], [0, 2, 0], [1, 2, 0], [2, 2, 0], [3, 2, 0], [4, 2, 0], [5, 2, 0], [6, 2, 0], [7, 2, 0], [8, 2, 0], [9, 2, 0], [-9, 3, 0], [-8, 3, 0], [-7, 3, 0], [-6, 3, 0], [-5, 3, 0], [-4, 3, 0], [-3, 3, 0], [-2, 3, 0], [-1, 3, 0], [0, 3, 0], [1, 3, 0], [2, 3, 0], [3, 3, 0], [4, 3, 0], [5, 3, 0], [6, 3, 0], [7, 3, 0], [8, 3, 0], [9, 3, 0], [-9, 4, 0], [-8, 4, 0], [-7, 4, 0], [-6, 4, 0], [-5, 4, 0], [-4, 4, 0], [-3, 4, 0], [-2, 4, 0], [-1, 4, 0], [0, 4, 0], [1, 4, 0], [2, 4, 0], [3, 4, 0], [4, 4, 0], [5, 4, 0], [6, 4, 0], [7, 4, 0], [8, 4, 0], [9, 4, 0], [-8, 5, 0], [-7, 5, 0], [-6, 5, 0], [-5, 5, 0], [-4, 5, 0], [-3, 5, 0], [-2, 5, 0], [-1, 5, 0], [0, 5, 0], [1, 5, 0], [2, 5, 0], [3, 5, 0], [4, 5, 0], [5, 5, 0], [6, 5, 0], [7, 5, 0], [8, 5, 0], [-7, 6, 0], [-6, 6, 0], [-5, 6, 0], [-4, 6, 0], [-3, 6, 0], [-2, 6, 0], [-1, 6, 0], [0, 6, 0], [1, 6, 0], [2, 6, 0], [3, 6, 0], [4, 6, 0], [5, 6, 0], [6, 6, 0], [7, 6, 0], [-7, 7, 0], [-6, 7, 0], [-5, 7, 0], [-4, 7, 0], [-3, 7, 0], [-2, 7, 0], [-1, 7, 0], [0, 7, 0], [1, 7, 0], [2, 7, 0], [3, 7, 0], [4, 7, 0], [5, 7, 0], [6, 7, 0], [7, 7, 0], [-5, 8, 0], [-4, 8, 0], [-3, 8, 0], [-2, 8, 0], [-1, 8, 0], [0, 8, 0], [1, 8, 0], [2, 8, 0], [3, 8, 0], [4, 8, 0], [5, 8, 0], [-4, 9, 0], [-3, 9, 0], [-2, 9, 0], [-1, 9, 0], [0, 9, 0], [1, 9, 0], [2, 9, 0], [3, 9, 0], [4, 9, 0], [-3, -7, 1], [-2, -7, 1], [-1, -7, 1], [0, -7, 1], [1, -7, 1], [2, -7, 1], [3, -7, 1], [-5, -6, 1], [-4, -6, 1], [-3, -6, 1], [-2, -6, 1], [-1, -6, 1], [0, -6, 1], [1, -6, 1], [2, -6, 1], [3, -6, 1], [4, -6, 1], [5, -6, 1], [-6, -5, 1], [-5, -5, 1], [-4, -5, 1], [-3, -5, 1], [-2, -5, 1], [-1, -5, 1], [0, -5, 1], [1, -5, 1], [2, -5, 1], [3, -5, 1], [4, -5, 1], [5, -5, 1], [6, -5, 1], [-6, -4, 1], [-5, -4, 1], [-4, -4, 1], [-3, -4, 1], [-2, -4, 1], [-1, -4, 1], [0, -4, 1], [1, -4, 1], [2, -4, 1], [3, -4, 1], [4, -4, 1], [5, -4, 1], [6, -4, 1], [-7, -3, 1], [-6, -3, 1], [-5, -3, 1], [-4, -3, 1], [-3, -3, 1], [-2, -3, 1], [-1, -3, 1], [0, -3, 1], [1, -3, 1], [2, -3, 1], [3, -3, 1], [4, -3, 1], [5, -3, 1], [6, -3, 1], [7, -3, 1], [-7, -2, 1], [-6, -2, 1], [-5, -2, 1], [-4, -2, 1], [-3, -2, 1], [-2, -2, 1], [-1, -2, 1], [0, -2, 1], [1, -2, 1], [2, -2, 1], [3, -2, 1], [4, -2, 1], [5, -2, 1], [6, -2, 1], [7, -2, 1], [-7, -1, 1], [-6, -1, 1], [-5, -1, 1], [-4, -1, 1], [-3, -1, 1], [-2, -1, 1], [-1, -1, 1], [0, -1, 1], [1, -1, 1], [2, -1, 1], [3, -1, 1], [4, -1, 1], [5, -1, 1], [6, -1, 1], [7, -1, 1], [-7, 0, 1], [-6, 0, 1], [-5, 0, 1], [-4, 0, 1], [-3, 0, 1], [-2, 0, 1], [-1, 0, 1], [0, 0, 1], [1, 0, 1], [2, 0, 1], [3, 0, 1], [4, 0, 1], [5, 0, 1], [6, 0, 1], [7, 0, 1], [-7, 1, 1], [-6, 1, 1], [-5, 1, 1], [-4, 1, 1], [-3, 1, 1], [-2, 1, 1], [-1, 1, 1], [0, 1, 1], [1, 1, 1], [2, 1, 1], [3, 1, 1], [4, 1, 1], [5, 1, 1], [6, 1, 1], [7, 1, 1], [-7, 2, 1], [-6, 2, 1], [-5, 2, 1], [-4, 2, 1], [-3, 2, 1], [-2, 2, 1], [-1, 2, 1], [0, 2, 1], [1, 2, 1], [2, 2, 1], [3, 2, 1], [4, 2, 1], [5, 2, 1], [6, 2, 1], [7, 2, 1], [-7, 3, 1], [-6, 3, 1], [-5, 3, 1], [-4, 3, 1], [-3, 3, 1], [-2, 3, 1], [-1, 3, 1], [0, 3, 1], [1, 3, 1], [2, 3, 1], [3, 3, 1], [4, 3, 1], [5, 3, 1], [6, 3, 1], [7, 3, 1], [-6, 4, 1], [-5, 4, 1], [-4, 4, 1], [-3, 4, 1], [-2, 4, 1], [-1, 4, 1], [0, 4, 1], [1, 4, 1], [2, 4, 1], [3, 4, 1], [4, 4, 1], [5, 4, 1], [6, 4, 1], [-6, 5, 1], [-5, 5, 1], [-4, 5, 1], [-3, 5, 1], [-2, 5, 1], [-1, 5, 1], [0, 5, 1], [1, 5, 1], [2, 5, 1], [3, 5, 1], [4, 5, 1], [5, 5, 1], [6, 5, 1], [-5, 6, 1], [-4, 6, 1], [-3, 6, 1], [-2, 6, 1], [-1, 6, 1], [0, 6, 1], [1, 6, 1], [2, 6, 1], [3, 6, 1], [4, 6, 1], [5, 6, 1], [-3, 7, 1], [-2, 7, 1], [-1, 7, 1], [0, 7, 1], [1, 7, 1], [2, 7, 1], [3, 7, 1], [-2, -4, 2], [-1, -4, 2], [0, -4, 2], [1, -4, 2], [2, -4, 2], [-3, -3, 2], [-2, -3, 2], [-1, -3, 2], [0, -3, 2], [1, -3, 2], [2, -3, 2], [3, -3, 2], [-4, -2, 2], [-3, -2, 2], [-2, -2, 2], [-1, -2, 2], [0, -2, 2], [1, -2, 2], [2, -2, 2], [3, -2, 2], [4, -2, 2], [-4, -1, 2], [-3, -1, 2], [-2, -1, 2], [-1, -1, 2], [0, -1, 2], [1, -1, 2], [2, -1, 2], [3, -1, 2], [4, -1, 2], [-4, 0, 2], [-3, 0, 2], [-2, 0, 2], [-1, 0, 2], [0, 0, 2], [1, 0, 2], [2, 0, 2], [3, 0, 2], [4, 0, 2], [-4, 1, 2], [-3, 1, 2], [-2, 1, 2], [-1, 1, 2], [0, 1, 2], [1, 1, 2], [2, 1, 2], [3, 1, 2], [4, 1, 2], [-4, 2, 2], [-3, 2, 2], [-2, 2, 2], [-1, 2, 2], [0, 2, 2], [1, 2, 2], [2, 2, 2], [3, 2, 2], [4, 2, 2], [-3, 3, 2], [-2, 3, 2], [-1, 3, 2], [0, 3, 2], [1, 3, 2], [2, 3, 2], [3, 3, 2], [-2, 4, 2], [-1, 4, 2], [0, 4, 2], [1, 4, 2], [2, 4, 2]]; - actual = px_cylinder([r1, r2], h, true); + actual = vx_cylinder([r1, r2], h, true); assertEqualPoints(expected, actual); expected2 = [[-4, -9, 0], [-3, -9, 0], [-2, -9, 0], [-1, -9, 0], [0, -9, 0], [1, -9, 0], [2, -9, 0], [3, -9, 0], [4, -9, 0], [-5, -8, 0], [-4, -8, 0], [-3, -8, 0], [-2, -8, 0], [-1, -8, 0], [0, -8, 0], [1, -8, 0], [2, -8, 0], [3, -8, 0], [4, -8, 0], [5, -8, 0], [-7, -7, 0], [-6, -7, 0], [-5, -7, 0], [-4, -7, 0], [-3, -7, 0], [-2, -7, 0], [-1, -7, 0], [0, -7, 0], [1, -7, 0], [2, -7, 0], [3, -7, 0], [4, -7, 0], [5, -7, 0], [6, -7, 0], [7, -7, 0], [-7, -6, 0], [-6, -6, 0], [-5, -6, 0], [-4, -6, 0], [-3, -6, 0], [-2, -6, 0], [-1, -6, 0], [0, -6, 0], [1, -6, 0], [2, -6, 0], [3, -6, 0], [4, -6, 0], [5, -6, 0], [6, -6, 0], [7, -6, 0], [-8, -5, 0], [-7, -5, 0], [-6, -5, 0], [-5, -5, 0], [-4, -5, 0], [-3, -5, 0], [-2, -5, 0], [-1, -5, 0], [0, -5, 0], [1, -5, 0], [2, -5, 0], [3, -5, 0], [4, -5, 0], [5, -5, 0], [6, -5, 0], [7, -5, 0], [8, -5, 0], [-9, -4, 0], [-8, -4, 0], [-7, -4, 0], [-6, -4, 0], [-5, -4, 0], [-4, -4, 0], [-3, -4, 0], [-2, -4, 0], [-1, -4, 0], [0, -4, 0], [1, -4, 0], [2, -4, 0], [3, -4, 0], [4, -4, 0], [5, -4, 0], [6, -4, 0], [7, -4, 0], [8, -4, 0], [9, -4, 0], [-9, -3, 0], [-8, -3, 0], [-7, -3, 0], [-6, -3, 0], [-5, -3, 0], [-4, -3, 0], [-3, -3, 0], [-2, -3, 0], [-1, -3, 0], [0, -3, 0], [1, -3, 0], [2, -3, 0], [3, -3, 0], [4, -3, 0], [5, -3, 0], [6, -3, 0], [7, -3, 0], [8, -3, 0], [9, -3, 0], [-9, -2, 0], [-8, -2, 0], [-7, -2, 0], [-6, -2, 0], [-5, -2, 0], [-4, -2, 0], [-3, -2, 0], [-2, -2, 0], [-1, -2, 0], [0, -2, 0], [1, -2, 0], [2, -2, 0], [3, -2, 0], [4, -2, 0], [5, -2, 0], [6, -2, 0], [7, -2, 0], [8, -2, 0], [9, -2, 0], [-9, -1, 0], [-8, -1, 0], [-7, -1, 0], [-6, -1, 0], [-5, -1, 0], [-4, -1, 0], [-3, -1, 0], [-2, -1, 0], [-1, -1, 0], [0, -1, 0], [1, -1, 0], [2, -1, 0], [3, -1, 0], [4, -1, 0], [5, -1, 0], [6, -1, 0], [7, -1, 0], [8, -1, 0], [9, -1, 0], [-9, 0, 0], [-8, 0, 0], [-7, 0, 0], [-6, 0, 0], [-5, 0, 0], [-4, 0, 0], [-3, 0, 0], [-2, 0, 0], [-1, 0, 0], [0, 0, 0], [1, 0, 0], [2, 0, 0], [3, 0, 0], [4, 0, 0], [5, 0, 0], [6, 0, 0], [7, 0, 0], [8, 0, 0], [9, 0, 0], [-9, 1, 0], [-8, 1, 0], [-7, 1, 0], [-6, 1, 0], [-5, 1, 0], [-4, 1, 0], [-3, 1, 0], [-2, 1, 0], [-1, 1, 0], [0, 1, 0], [1, 1, 0], [2, 1, 0], [3, 1, 0], [4, 1, 0], [5, 1, 0], [6, 1, 0], [7, 1, 0], [8, 1, 0], [9, 1, 0], [-9, 2, 0], [-8, 2, 0], [-7, 2, 0], [-6, 2, 0], [-5, 2, 0], [-4, 2, 0], [-3, 2, 0], [-2, 2, 0], [-1, 2, 0], [0, 2, 0], [1, 2, 0], [2, 2, 0], [3, 2, 0], [4, 2, 0], [5, 2, 0], [6, 2, 0], [7, 2, 0], [8, 2, 0], [9, 2, 0], [-9, 3, 0], [-8, 3, 0], [-7, 3, 0], [-6, 3, 0], [-5, 3, 0], [-4, 3, 0], [-3, 3, 0], [-2, 3, 0], [-1, 3, 0], [0, 3, 0], [1, 3, 0], [2, 3, 0], [3, 3, 0], [4, 3, 0], [5, 3, 0], [6, 3, 0], [7, 3, 0], [8, 3, 0], [9, 3, 0], [-9, 4, 0], [-8, 4, 0], [-7, 4, 0], [-6, 4, 0], [-5, 4, 0], [-4, 4, 0], [-3, 4, 0], [-2, 4, 0], [-1, 4, 0], [0, 4, 0], [1, 4, 0], [2, 4, 0], [3, 4, 0], [4, 4, 0], [5, 4, 0], [6, 4, 0], [7, 4, 0], [8, 4, 0], [9, 4, 0], [-8, 5, 0], [-7, 5, 0], [-6, 5, 0], [-5, 5, 0], [-4, 5, 0], [-3, 5, 0], [-2, 5, 0], [-1, 5, 0], [0, 5, 0], [1, 5, 0], [2, 5, 0], [3, 5, 0], [4, 5, 0], [5, 5, 0], [6, 5, 0], [7, 5, 0], [8, 5, 0], [-7, 6, 0], [-6, 6, 0], [-5, 6, 0], [-4, 6, 0], [-3, 6, 0], [-2, 6, 0], [-1, 6, 0], [0, 6, 0], [1, 6, 0], [2, 6, 0], [3, 6, 0], [4, 6, 0], [5, 6, 0], [6, 6, 0], [7, 6, 0], [-7, 7, 0], [-6, 7, 0], [-5, 7, 0], [-4, 7, 0], [-3, 7, 0], [-2, 7, 0], [-1, 7, 0], [0, 7, 0], [1, 7, 0], [2, 7, 0], [3, 7, 0], [4, 7, 0], [5, 7, 0], [6, 7, 0], [7, 7, 0], [-5, 8, 0], [-4, 8, 0], [-3, 8, 0], [-2, 8, 0], [-1, 8, 0], [0, 8, 0], [1, 8, 0], [2, 8, 0], [3, 8, 0], [4, 8, 0], [5, 8, 0], [-4, 9, 0], [-3, 9, 0], [-2, 9, 0], [-1, 9, 0], [0, 9, 0], [1, 9, 0], [2, 9, 0], [3, 9, 0], [4, 9, 0], [-4, -9, 1], [-3, -9, 1], [-2, -9, 1], [-1, -9, 1], [0, -9, 1], [1, -9, 1], [2, -9, 1], [3, -9, 1], [4, -9, 1], [-5, -8, 1], [-4, -8, 1], [-3, -8, 1], [-2, -8, 1], [-1, -8, 1], [0, -8, 1], [1, -8, 1], [2, -8, 1], [3, -8, 1], [4, -8, 1], [5, -8, 1], [-7, -7, 1], [-6, -7, 1], [-5, -7, 1], [-4, -7, 1], [-3, -7, 1], [-2, -7, 1], [-1, -7, 1], [0, -7, 1], [1, -7, 1], [2, -7, 1], [3, -7, 1], [4, -7, 1], [5, -7, 1], [6, -7, 1], [7, -7, 1], [-7, -6, 1], [-6, -6, 1], [-5, -6, 1], [-4, -6, 1], [-3, -6, 1], [-2, -6, 1], [-1, -6, 1], [0, -6, 1], [1, -6, 1], [2, -6, 1], [3, -6, 1], [4, -6, 1], [5, -6, 1], [6, -6, 1], [7, -6, 1], [-8, -5, 1], [-7, -5, 1], [-6, -5, 1], [-5, -5, 1], [-4, -5, 1], [-3, -5, 1], [-2, -5, 1], [-1, -5, 1], [0, -5, 1], [1, -5, 1], [2, -5, 1], [3, -5, 1], [4, -5, 1], [5, -5, 1], [6, -5, 1], [7, -5, 1], [8, -5, 1], [-9, -4, 1], [-8, -4, 1], [-7, -4, 1], [-6, -4, 1], [-5, -4, 1], [-4, -4, 1], [-3, -4, 1], [-2, -4, 1], [-1, -4, 1], [0, -4, 1], [1, -4, 1], [2, -4, 1], [3, -4, 1], [4, -4, 1], [5, -4, 1], [6, -4, 1], [7, -4, 1], [8, -4, 1], [9, -4, 1], [-9, -3, 1], [-8, -3, 1], [-7, -3, 1], [-6, -3, 1], [-5, -3, 1], [-4, -3, 1], [-3, -3, 1], [-2, -3, 1], [-1, -3, 1], [0, -3, 1], [1, -3, 1], [2, -3, 1], [3, -3, 1], [4, -3, 1], [5, -3, 1], [6, -3, 1], [7, -3, 1], [8, -3, 1], [9, -3, 1], [-9, -2, 1], [-8, -2, 1], [-7, -2, 1], [-6, -2, 1], [-5, -2, 1], [-4, -2, 1], [-3, -2, 1], [-2, -2, 1], [-1, -2, 1], [0, -2, 1], [1, -2, 1], [2, -2, 1], [3, -2, 1], [4, -2, 1], [5, -2, 1], [6, -2, 1], [7, -2, 1], [8, -2, 1], [9, -2, 1], [-9, -1, 1], [-8, -1, 1], [-7, -1, 1], [-6, -1, 1], [-5, -1, 1], [-4, -1, 1], [-3, -1, 1], [-2, -1, 1], [-1, -1, 1], [0, -1, 1], [1, -1, 1], [2, -1, 1], [3, -1, 1], [4, -1, 1], [5, -1, 1], [6, -1, 1], [7, -1, 1], [8, -1, 1], [9, -1, 1], [-9, 0, 1], [-8, 0, 1], [-7, 0, 1], [-6, 0, 1], [-5, 0, 1], [-4, 0, 1], [-3, 0, 1], [-2, 0, 1], [-1, 0, 1], [0, 0, 1], [1, 0, 1], [2, 0, 1], [3, 0, 1], [4, 0, 1], [5, 0, 1], [6, 0, 1], [7, 0, 1], [8, 0, 1], [9, 0, 1], [-9, 1, 1], [-8, 1, 1], [-7, 1, 1], [-6, 1, 1], [-5, 1, 1], [-4, 1, 1], [-3, 1, 1], [-2, 1, 1], [-1, 1, 1], [0, 1, 1], [1, 1, 1], [2, 1, 1], [3, 1, 1], [4, 1, 1], [5, 1, 1], [6, 1, 1], [7, 1, 1], [8, 1, 1], [9, 1, 1], [-9, 2, 1], [-8, 2, 1], [-7, 2, 1], [-6, 2, 1], [-5, 2, 1], [-4, 2, 1], [-3, 2, 1], [-2, 2, 1], [-1, 2, 1], [0, 2, 1], [1, 2, 1], [2, 2, 1], [3, 2, 1], [4, 2, 1], [5, 2, 1], [6, 2, 1], [7, 2, 1], [8, 2, 1], [9, 2, 1], [-9, 3, 1], [-8, 3, 1], [-7, 3, 1], [-6, 3, 1], [-5, 3, 1], [-4, 3, 1], [-3, 3, 1], [-2, 3, 1], [-1, 3, 1], [0, 3, 1], [1, 3, 1], [2, 3, 1], [3, 3, 1], [4, 3, 1], [5, 3, 1], [6, 3, 1], [7, 3, 1], [8, 3, 1], [9, 3, 1], [-9, 4, 1], [-8, 4, 1], [-7, 4, 1], [-6, 4, 1], [-5, 4, 1], [-4, 4, 1], [-3, 4, 1], [-2, 4, 1], [-1, 4, 1], [0, 4, 1], [1, 4, 1], [2, 4, 1], [3, 4, 1], [4, 4, 1], [5, 4, 1], [6, 4, 1], [7, 4, 1], [8, 4, 1], [9, 4, 1], [-8, 5, 1], [-7, 5, 1], [-6, 5, 1], [-5, 5, 1], [-4, 5, 1], [-3, 5, 1], [-2, 5, 1], [-1, 5, 1], [0, 5, 1], [1, 5, 1], [2, 5, 1], [3, 5, 1], [4, 5, 1], [5, 5, 1], [6, 5, 1], [7, 5, 1], [8, 5, 1], [-7, 6, 1], [-6, 6, 1], [-5, 6, 1], [-4, 6, 1], [-3, 6, 1], [-2, 6, 1], [-1, 6, 1], [0, 6, 1], [1, 6, 1], [2, 6, 1], [3, 6, 1], [4, 6, 1], [5, 6, 1], [6, 6, 1], [7, 6, 1], [-7, 7, 1], [-6, 7, 1], [-5, 7, 1], [-4, 7, 1], [-3, 7, 1], [-2, 7, 1], [-1, 7, 1], [0, 7, 1], [1, 7, 1], [2, 7, 1], [3, 7, 1], [4, 7, 1], [5, 7, 1], [6, 7, 1], [7, 7, 1], [-5, 8, 1], [-4, 8, 1], [-3, 8, 1], [-2, 8, 1], [-1, 8, 1], [0, 8, 1], [1, 8, 1], [2, 8, 1], [3, 8, 1], [4, 8, 1], [5, 8, 1], [-4, 9, 1], [-3, 9, 1], [-2, 9, 1], [-1, 9, 1], [0, 9, 1], [1, 9, 1], [2, 9, 1], [3, 9, 1], [4, 9, 1], [-4, -9, 2], [-3, -9, 2], [-2, -9, 2], [-1, -9, 2], [0, -9, 2], [1, -9, 2], [2, -9, 2], [3, -9, 2], [4, -9, 2], [-5, -8, 2], [-4, -8, 2], [-3, -8, 2], [-2, -8, 2], [-1, -8, 2], [0, -8, 2], [1, -8, 2], [2, -8, 2], [3, -8, 2], [4, -8, 2], [5, -8, 2], [-7, -7, 2], [-6, -7, 2], [-5, -7, 2], [-4, -7, 2], [-3, -7, 2], [-2, -7, 2], [-1, -7, 2], [0, -7, 2], [1, -7, 2], [2, -7, 2], [3, -7, 2], [4, -7, 2], [5, -7, 2], [6, -7, 2], [7, -7, 2], [-7, -6, 2], [-6, -6, 2], [-5, -6, 2], [-4, -6, 2], [-3, -6, 2], [-2, -6, 2], [-1, -6, 2], [0, -6, 2], [1, -6, 2], [2, -6, 2], [3, -6, 2], [4, -6, 2], [5, -6, 2], [6, -6, 2], [7, -6, 2], [-8, -5, 2], [-7, -5, 2], [-6, -5, 2], [-5, -5, 2], [-4, -5, 2], [-3, -5, 2], [-2, -5, 2], [-1, -5, 2], [0, -5, 2], [1, -5, 2], [2, -5, 2], [3, -5, 2], [4, -5, 2], [5, -5, 2], [6, -5, 2], [7, -5, 2], [8, -5, 2], [-9, -4, 2], [-8, -4, 2], [-7, -4, 2], [-6, -4, 2], [-5, -4, 2], [-4, -4, 2], [-3, -4, 2], [-2, -4, 2], [-1, -4, 2], [0, -4, 2], [1, -4, 2], [2, -4, 2], [3, -4, 2], [4, -4, 2], [5, -4, 2], [6, -4, 2], [7, -4, 2], [8, -4, 2], [9, -4, 2], [-9, -3, 2], [-8, -3, 2], [-7, -3, 2], [-6, -3, 2], [-5, -3, 2], [-4, -3, 2], [-3, -3, 2], [-2, -3, 2], [-1, -3, 2], [0, -3, 2], [1, -3, 2], [2, -3, 2], [3, -3, 2], [4, -3, 2], [5, -3, 2], [6, -3, 2], [7, -3, 2], [8, -3, 2], [9, -3, 2], [-9, -2, 2], [-8, -2, 2], [-7, -2, 2], [-6, -2, 2], [-5, -2, 2], [-4, -2, 2], [-3, -2, 2], [-2, -2, 2], [-1, -2, 2], [0, -2, 2], [1, -2, 2], [2, -2, 2], [3, -2, 2], [4, -2, 2], [5, -2, 2], [6, -2, 2], [7, -2, 2], [8, -2, 2], [9, -2, 2], [-9, -1, 2], [-8, -1, 2], [-7, -1, 2], [-6, -1, 2], [-5, -1, 2], [-4, -1, 2], [-3, -1, 2], [-2, -1, 2], [-1, -1, 2], [0, -1, 2], [1, -1, 2], [2, -1, 2], [3, -1, 2], [4, -1, 2], [5, -1, 2], [6, -1, 2], [7, -1, 2], [8, -1, 2], [9, -1, 2], [-9, 0, 2], [-8, 0, 2], [-7, 0, 2], [-6, 0, 2], [-5, 0, 2], [-4, 0, 2], [-3, 0, 2], [-2, 0, 2], [-1, 0, 2], [0, 0, 2], [1, 0, 2], [2, 0, 2], [3, 0, 2], [4, 0, 2], [5, 0, 2], [6, 0, 2], [7, 0, 2], [8, 0, 2], [9, 0, 2], [-9, 1, 2], [-8, 1, 2], [-7, 1, 2], [-6, 1, 2], [-5, 1, 2], [-4, 1, 2], [-3, 1, 2], [-2, 1, 2], [-1, 1, 2], [0, 1, 2], [1, 1, 2], [2, 1, 2], [3, 1, 2], [4, 1, 2], [5, 1, 2], [6, 1, 2], [7, 1, 2], [8, 1, 2], [9, 1, 2], [-9, 2, 2], [-8, 2, 2], [-7, 2, 2], [-6, 2, 2], [-5, 2, 2], [-4, 2, 2], [-3, 2, 2], [-2, 2, 2], [-1, 2, 2], [0, 2, 2], [1, 2, 2], [2, 2, 2], [3, 2, 2], [4, 2, 2], [5, 2, 2], [6, 2, 2], [7, 2, 2], [8, 2, 2], [9, 2, 2], [-9, 3, 2], [-8, 3, 2], [-7, 3, 2], [-6, 3, 2], [-5, 3, 2], [-4, 3, 2], [-3, 3, 2], [-2, 3, 2], [-1, 3, 2], [0, 3, 2], [1, 3, 2], [2, 3, 2], [3, 3, 2], [4, 3, 2], [5, 3, 2], [6, 3, 2], [7, 3, 2], [8, 3, 2], [9, 3, 2], [-9, 4, 2], [-8, 4, 2], [-7, 4, 2], [-6, 4, 2], [-5, 4, 2], [-4, 4, 2], [-3, 4, 2], [-2, 4, 2], [-1, 4, 2], [0, 4, 2], [1, 4, 2], [2, 4, 2], [3, 4, 2], [4, 4, 2], [5, 4, 2], [6, 4, 2], [7, 4, 2], [8, 4, 2], [9, 4, 2], [-8, 5, 2], [-7, 5, 2], [-6, 5, 2], [-5, 5, 2], [-4, 5, 2], [-3, 5, 2], [-2, 5, 2], [-1, 5, 2], [0, 5, 2], [1, 5, 2], [2, 5, 2], [3, 5, 2], [4, 5, 2], [5, 5, 2], [6, 5, 2], [7, 5, 2], [8, 5, 2], [-7, 6, 2], [-6, 6, 2], [-5, 6, 2], [-4, 6, 2], [-3, 6, 2], [-2, 6, 2], [-1, 6, 2], [0, 6, 2], [1, 6, 2], [2, 6, 2], [3, 6, 2], [4, 6, 2], [5, 6, 2], [6, 6, 2], [7, 6, 2], [-7, 7, 2], [-6, 7, 2], [-5, 7, 2], [-4, 7, 2], [-3, 7, 2], [-2, 7, 2], [-1, 7, 2], [0, 7, 2], [1, 7, 2], [2, 7, 2], [3, 7, 2], [4, 7, 2], [5, 7, 2], [6, 7, 2], [7, 7, 2], [-5, 8, 2], [-4, 8, 2], [-3, 8, 2], [-2, 8, 2], [-1, 8, 2], [0, 8, 2], [1, 8, 2], [2, 8, 2], [3, 8, 2], [4, 8, 2], [5, 8, 2], [-4, 9, 2], [-3, 9, 2], [-2, 9, 2], [-1, 9, 2], [0, 9, 2], [1, 9, 2], [2, 9, 2], [3, 9, 2], [4, 9, 2]]; - actual2 = px_cylinder(r1, h, true); + actual2 = vx_cylinder(r1, h, true); assertEqualPoints(expected2, actual2); } -test_px_cylinder(); \ No newline at end of file +test_vx_cylinder(); \ No newline at end of file diff --git a/test/pixel/test_px_line.scad b/test/voxel/test_vx_line.scad similarity index 82% rename from test/pixel/test_px_line.scad rename to test/voxel/test_vx_line.scad index 7f1f47d0..19794f4b 100644 --- a/test/pixel/test_px_line.scad +++ b/test/voxel/test_vx_line.scad @@ -1,13 +1,13 @@ use ; -use ; +use ; -module test_px_line() { - echo("==== test_px_line ===="); +module test_vx_line() { + echo("==== test_vx_line ===="); expected = [[-10, 0, -10], [-9, 1, -10], [-9, 2, -9], [-8, 3, -9], [-8, 4, -8], [-7, 5, -8], [-6, 6, -8], [-6, 7, -7], [-5, 8, -7], [-5, 9, -6], [-4, 10, -6], [-3, 11, -6], [-3, 12, -5], [-2, 13, -5], [-2, 14, -4], [-1, 15, -4], [0, 16, -4], [0, 17, -3], [1, 18, -3], [1, 19, -2], [2, 20, -2], [3, 21, -2], [3, 22, -1], [4, 23, -1], [4, 24, 0], [5, 25, 0], [6, 26, 0], [6, 27, 1], [7, 28, 1], [7, 29, 2], [8, 30, 2], [9, 31, 2], [9, 32, 3], [10, 33, 3], [10, 34, 4], [11, 35, 4], [12, 36, 4], [12, 37, 5], [13, 38, 5], [13, 39, 6], [14, 40, 6], [15, 41, 6], [15, 42, 7], [16, 43, 7], [16, 44, 8], [17, 45, 8], [18, 46, 8], [18, 47, 9], [19, 48, 9], [19, 49, 10]]; - actual = px_line([-10, 0, -10], [20, 50, 10]); + actual = vx_line([-10, 0, -10], [20, 50, 10]); assertEqualPoints(expected, actual); } -test_px_line(); \ No newline at end of file +test_vx_line(); \ No newline at end of file diff --git a/test/pixel/test_px_polygon.scad b/test/voxel/test_vx_polygon.scad similarity index 89% rename from test/pixel/test_px_polygon.scad rename to test/voxel/test_vx_polygon.scad index 32bac4e8..16f3359f 100644 --- a/test/pixel/test_px_polygon.scad +++ b/test/voxel/test_vx_polygon.scad @@ -1,17 +1,17 @@ use ; -use ; +use ; -module test_px_polygon() { - echo("==== test_px_polygon ===="); +module test_vx_polygon() { + echo("==== test_vx_polygon ===="); expected = [[-5, -10], [-5, -9], [-4, -9], [-6, -8], [-4, -8], [-6, -7], [-3, -7], [-6, -6], [-3, -6], [-7, -5], [-2, -5], [-7, -4], [-2, -4], [-7, -3], [-1, -3], [-8, -2], [-1, -2], [-8, -1], [0, -1], [-8, 0], [0, 0], [-9, 1], [1, 1], [-9, 2], [1, 2], [-9, 3], [2, 3], [-10, 4], [2, 4], [-10, 5], [-9, 5], [3, 5], [-8, 6], [-7, 6], [-6, 6], [3, 6], [-5, 7], [-4, 7], [-3, 7], [4, 7], [-2, 8], [-1, 8], [0, 8], [4, 8], [1, 9], [2, 9], [3, 9], [5, 9], [4, 10], [5, 10]]; - actual = px_polygon([[5, 10], [-10, 5], [-5, -10]], false); + actual = vx_polygon([[5, 10], [-10, 5], [-5, -10]], false); assertEqualPoints(expected, actual); expected2 = [[-5, -10], [-5, -9], [-4, -9], [-6, -8], [-5, -8], [-4, -8], [-6, -7], [-5, -7], [-4, -7], [-3, -7], [-6, -6], [-5, -6], [-4, -6], [-3, -6], [-7, -5], [-6, -5], [-5, -5], [-4, -5], [-3, -5], [-2, -5], [-7, -4], [-6, -4], [-5, -4], [-4, -4], [-3, -4], [-2, -4], [-7, -3], [-6, -3], [-5, -3], [-4, -3], [-3, -3], [-2, -3], [-1, -3], [-8, -2], [-7, -2], [-6, -2], [-5, -2], [-4, -2], [-3, -2], [-2, -2], [-1, -2], [-8, -1], [-7, -1], [-6, -1], [-5, -1], [-4, -1], [-3, -1], [-2, -1], [-1, -1], [0, -1], [-8, 0], [-7, 0], [-6, 0], [-5, 0], [-4, 0], [-3, 0], [-2, 0], [-1, 0], [0, 0], [-9, 1], [-8, 1], [-7, 1], [-6, 1], [-5, 1], [-4, 1], [-3, 1], [-2, 1], [-1, 1], [0, 1], [1, 1], [-9, 2], [-8, 2], [-7, 2], [-6, 2], [-5, 2], [-4, 2], [-3, 2], [-2, 2], [-1, 2], [0, 2], [1, 2], [-9, 3], [-8, 3], [-7, 3], [-6, 3], [-5, 3], [-4, 3], [-3, 3], [-2, 3], [-1, 3], [0, 3], [1, 3], [2, 3], [-10, 4], [-9, 4], [-8, 4], [-7, 4], [-6, 4], [-5, 4], [-4, 4], [-3, 4], [-2, 4], [-1, 4], [0, 4], [1, 4], [2, 4], [-10, 5], [-9, 5], [-8, 5], [-7, 5], [-6, 5], [-5, 5], [-4, 5], [-3, 5], [-2, 5], [-1, 5], [0, 5], [1, 5], [2, 5], [3, 5], [-8, 6], [-7, 6], [-6, 6], [-5, 6], [-4, 6], [-3, 6], [-2, 6], [-1, 6], [0, 6], [1, 6], [2, 6], [3, 6], [-5, 7], [-4, 7], [-3, 7], [-2, 7], [-1, 7], [0, 7], [1, 7], [2, 7], [3, 7], [4, 7], [-2, 8], [-1, 8], [0, 8], [1, 8], [2, 8], [3, 8], [4, 8], [1, 9], [2, 9], [3, 9], [4, 9], [5, 9], [4, 10], [5, 10]]; - actual2 = px_polygon([[5, 10], [-10, 5], [-5, -10]], true); + actual2 = vx_polygon([[5, 10], [-10, 5], [-5, -10]], true); assertEqualPoints(expected2, actual2); } -test_px_polygon(); \ No newline at end of file +test_vx_polygon(); \ No newline at end of file diff --git a/test/pixel/test_px_polyline.scad b/test/voxel/test_vx_polyline.scad similarity index 90% rename from test/pixel/test_px_polyline.scad rename to test/voxel/test_vx_polyline.scad index af1f1c4f..387b49b4 100644 --- a/test/pixel/test_px_polyline.scad +++ b/test/voxel/test_vx_polyline.scad @@ -1,13 +1,13 @@ use ; -use ; +use ; -module test_px_polyline() { - echo("==== test_px_polyline ===="); +module test_vx_polyline() { + echo("==== test_vx_polyline ===="); expected = [[3, 8, 5], [4, 9, 5], [5, 10, 5], [-3, 2, 6], [-2, 3, 6], [-1, 4, 6], [0, 5, 6], [1, 6, 6], [2, 7, 6], [-9, -4, 7], [-8, -3, 7], [-7, -2, 7], [-6, -1, 7], [-5, 0, 7], [-4, 1, 7], [-15, -10, 8], [-14, -9, 8], [-13, -8, 8], [-12, -7, 8], [-11, -6, 8], [-10, -5, 8], [-21, -16, 9], [-20, -15, 9], [-19, -14, 9], [-18, -13, 9], [-17, -12, 9], [-16, -11, 9], [-25, -20, 10], [-25, -19, 10], [-24, -19, 10], [-25, -18, 10], [-23, -18, 10], [-25, -17, 10], [-22, -17, 10], [-25, -16, 11], [-25, -15, 11], [-25, -14, 11], [-25, -13, 11], [-25, -12, 11], [-25, -11, 11], [-25, -10, 11], [-25, -9, 12], [-25, -8, 12], [-25, -7, 12], [-25, -6, 12], [-25, -5, 12], [-25, -4, 12], [-25, -3, 12], [-25, -2, 13], [-25, -1, 13], [-25, 0, 13], [-25, 1, 13], [-25, 2, 13], [-25, 3, 13], [-25, 4, 13], [-25, 5, 14], [-25, 6, 14], [-25, 7, 14], [-25, 8, 14], [-25, 9, 14], [-25, 10, 14], [-25, 11, 14], [-25, 12, 15], [-25, 13, 15], [-25, 14, 15], [-25, 15, 15], [-24, 15, 15], [-23, 15, 15], [-22, 16, 15], [-21, 16, 15], [-20, 16, 16], [-19, 16, 16], [-18, 16, 16], [-17, 17, 16], [-16, 17, 16], [-15, 17, 16], [-14, 17, 16], [-13, 17, 16], [-12, 18, 16], [-11, 18, 16], [-10, 18, 17], [-9, 18, 17], [-8, 18, 17], [-7, 19, 17], [-6, 19, 17], [-5, 19, 17], [-4, 19, 17], [-3, 19, 17], [-2, 20, 17], [-1, 20, 17], [0, 20, 18], [1, 20, 18], [2, 20, 18], [3, 21, 18], [4, 21, 18], [5, 21, 18], [6, 21, 18], [7, 21, 18], [8, 22, 18], [9, 22, 18], [10, 22, 19], [11, 22, 19], [12, 22, 19], [13, 23, 19], [14, 23, 19], [15, 23, 19], [16, 23, 19], [17, 23, 19], [18, 24, 19], [19, 24, 19], [20, 24, 20], [21, 24, 20], [22, 24, 20], [23, 25, 20], [24, 25, 20]]; - actual = px_polyline([[5, 10, 5], [-25, -20, 10], [-25, 15, 15], [25, 25, 20]]); + actual = vx_polyline([[5, 10, 5], [-25, -20, 10], [-25, 15, 15], [25, 25, 20]]); assertEqualPoints(expected, actual); } -test_px_polyline(); \ No newline at end of file +test_vx_polyline(); \ No newline at end of file diff --git a/test/pixel/test_px_sphere.scad b/test/voxel/test_vx_sphere.scad similarity index 95% rename from test/pixel/test_px_sphere.scad rename to test/voxel/test_vx_sphere.scad index 1b09472d..0771350d 100644 --- a/test/pixel/test_px_sphere.scad +++ b/test/voxel/test_vx_sphere.scad @@ -1,13 +1,13 @@ use ; -use ; +use ; -module test_px_sphere() { - echo("==== test_px_sphere ===="); +module test_vx_sphere() { + echo("==== test_vx_sphere ===="); expected = [[-2, -2, -4], [-1, -2, -4], [0, -2, -4], [1, -2, -4], [2, -2, -4], [-2, -1, -4], [-1, -1, -4], [0, -1, -4], [1, -1, -4], [2, -1, -4], [-2, 0, -4], [-1, 0, -4], [0, 0, -4], [1, 0, -4], [2, 0, -4], [-2, 1, -4], [-1, 1, -4], [0, 1, -4], [1, 1, -4], [2, 1, -4], [-2, 2, -4], [-1, 2, -4], [0, 2, -4], [1, 2, -4], [2, 2, -4], [-2, -3, -3], [-1, -3, -3], [0, -3, -3], [1, -3, -3], [2, -3, -3], [-3, -2, -3], [-2, -2, -3], [2, -2, -3], [3, -2, -3], [-3, -1, -3], [3, -1, -3], [-3, 0, -3], [3, 0, -3], [-3, 1, -3], [3, 1, -3], [-3, 2, -3], [-2, 2, -3], [2, 2, -3], [3, 2, -3], [-2, 3, -3], [-1, 3, -3], [0, 3, -3], [1, 3, -3], [2, 3, -3], [-2, -4, -2], [-1, -4, -2], [0, -4, -2], [1, -4, -2], [2, -4, -2], [-3, -3, -2], [-2, -3, -2], [2, -3, -2], [3, -3, -2], [-4, -2, -2], [-3, -2, -2], [3, -2, -2], [4, -2, -2], [-4, -1, -2], [4, -1, -2], [-4, 0, -2], [4, 0, -2], [-4, 1, -2], [4, 1, -2], [-4, 2, -2], [-3, 2, -2], [3, 2, -2], [4, 2, -2], [-3, 3, -2], [-2, 3, -2], [2, 3, -2], [3, 3, -2], [-2, 4, -2], [-1, 4, -2], [0, 4, -2], [1, 4, -2], [2, 4, -2], [-2, -4, -1], [-1, -4, -1], [0, -4, -1], [1, -4, -1], [2, -4, -1], [-3, -3, -1], [3, -3, -1], [-4, -2, -1], [4, -2, -1], [-4, -1, -1], [4, -1, -1], [-4, 0, -1], [4, 0, -1], [-4, 1, -1], [4, 1, -1], [-4, 2, -1], [4, 2, -1], [-3, 3, -1], [3, 3, -1], [-2, 4, -1], [-1, 4, -1], [0, 4, -1], [1, 4, -1], [2, 4, -1], [-2, -4, 0], [-1, -4, 0], [0, -4, 0], [1, -4, 0], [2, -4, 0], [-3, -3, 0], [3, -3, 0], [-4, -2, 0], [4, -2, 0], [-4, -1, 0], [4, -1, 0], [-4, 0, 0], [4, 0, 0], [-4, 1, 0], [4, 1, 0], [-4, 2, 0], [4, 2, 0], [-3, 3, 0], [3, 3, 0], [-2, 4, 0], [-1, 4, 0], [0, 4, 0], [1, 4, 0], [2, 4, 0], [-2, -4, 1], [-1, -4, 1], [0, -4, 1], [1, -4, 1], [2, -4, 1], [-3, -3, 1], [3, -3, 1], [-4, -2, 1], [4, -2, 1], [-4, -1, 1], [4, -1, 1], [-4, 0, 1], [4, 0, 1], [-4, 1, 1], [4, 1, 1], [-4, 2, 1], [4, 2, 1], [-3, 3, 1], [3, 3, 1], [-2, 4, 1], [-1, 4, 1], [0, 4, 1], [1, 4, 1], [2, 4, 1], [-2, -4, 2], [-1, -4, 2], [0, -4, 2], [1, -4, 2], [2, -4, 2], [-3, -3, 2], [-2, -3, 2], [2, -3, 2], [3, -3, 2], [-4, -2, 2], [-3, -2, 2], [3, -2, 2], [4, -2, 2], [-4, -1, 2], [4, -1, 2], [-4, 0, 2], [4, 0, 2], [-4, 1, 2], [4, 1, 2], [-4, 2, 2], [-3, 2, 2], [3, 2, 2], [4, 2, 2], [-3, 3, 2], [-2, 3, 2], [2, 3, 2], [3, 3, 2], [-2, 4, 2], [-1, 4, 2], [0, 4, 2], [1, 4, 2], [2, 4, 2], [-2, -3, 3], [-1, -3, 3], [0, -3, 3], [1, -3, 3], [2, -3, 3], [-3, -2, 3], [-2, -2, 3], [2, -2, 3], [3, -2, 3], [-3, -1, 3], [3, -1, 3], [-3, 0, 3], [3, 0, 3], [-3, 1, 3], [3, 1, 3], [-3, 2, 3], [-2, 2, 3], [2, 2, 3], [3, 2, 3], [-2, 3, 3], [-1, 3, 3], [0, 3, 3], [1, 3, 3], [2, 3, 3], [-2, -2, 4], [-1, -2, 4], [0, -2, 4], [1, -2, 4], [2, -2, 4], [-2, -1, 4], [-1, -1, 4], [0, -1, 4], [1, -1, 4], [2, -1, 4], [-2, 0, 4], [-1, 0, 4], [0, 0, 4], [1, 0, 4], [2, 0, 4], [-2, 1, 4], [-1, 1, 4], [0, 1, 4], [1, 1, 4], [2, 1, 4], [-2, 2, 4], [-1, 2, 4], [0, 2, 4], [1, 2, 4], [2, 2, 4]]; - actual = px_sphere(5, false); + actual = vx_sphere(5, false); assertEqualPoints(expected, actual); } -test_px_sphere(); \ No newline at end of file +test_vx_sphere(); \ No newline at end of file