SDF primitive library
2D Primitives
sCircle.m
sCircle(); % circle with radius R = 1 at (0,0)
sCircle(R); % circle with radius R at (0,0)
sCircle(R,[x,y]); % circle with radius R at (x,y)
sRectangle.m
sRectangle(); % square with width W = 1 at (0,0)
sRectangle(R); % circle with radius R at (0,0)
sRectangle([x1,y1],[x2,y2]); % circle with radius R at (x,y)
sStrut.m
sStrut(); % strut of width 1 from (0,0) to (1,1);
sStrut([x1,y1], T); % strut of width T from (0,0) to (x1,y1);
sStrut([x1,y1], [x2,y2], T); % strut of width T from (x1,y1) to (x2,y2);
sLine.m
sLine(); % line from (0,0) to (0,-1);
sLine([x1,y1]); % line from (0,0) to (x1,y1);
sLine([x1,y1], [x2,y2], T); % line from (x1,y1) to (x2,y2);
sCup.m
sCup(); % square with width W = 1 at (0,0)
sCup(R); % cup with radius R at (0,0)
sCup(R,L); % cup with radius R and length L
sSchwartz2D.m
sSchwartzD2(); % Schwartz-D surface from (0,0)
sSchwartzD2(N,T); % Schwartz-D with period N*2*pi and thickness T
sSchwartzD2(N,T,'rotated',true); % rotated variation
sGyroid2.m
sGyroid2(); % Gyroid surface from (0,0)
sGyroid2(N,T); % Gyroid with period N*2*pi and thickness T
sGyroid2(N,T,'rotated',true); % rotated variation
3D Primitives
sSphere.m
sSphere(R); % sphere with radius R at (0,0,0)
sSphere([x,y,z],R); % sphere with radius R at (x,y,z)
sSphere([x,y,z],R,T); % shell sphere with radius R at (x,y,z) with thickness T
sCylinder.m
sCube(W);
sCube(W, L, H);
sCube([x1, y1, z1], W, L, H);
sCube([x1, y1, z1], [x2, y2, z2]);