1include <BOSL2/std.scad>
2include <BOSL2/beziers.scad>
3
4// Makes a pseudo-sphere from a rectangular patch and its mirror.
5s = 50/sqrt(2);
6d = [[1,1,0],[-1,1,0],[-1,-1,0],[1,-1,0]];
7p = s * d;
8q = s * 0.55 * d;
9u = s * 2.5 * UP;
10patch1 = [
11 [p[2], p[2]+q[3], p[3]+q[2], p[3] ],
12 [p[2]+q[1], p[2]+q[2]+u, p[3]+q[3]+u, p[3]+q[0]],
13 [p[1]+q[2], p[1]+q[1]+u, p[0]+q[0]+u, p[0]+q[3]],
14 [p[1], p[1]+q[0], p[0]+q[1], p[0] ],
15];
16patch2 = bezier_patch_reverse(zflip(p=patch1));
17//vnf_polyhedron([bezier_vnf(patch1),bezier_vnf(patch2)]);
18debug_bezier_patches([patch1, patch2], splinesteps=16, style="quincunx");
19
20
21// vim: expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap