// make_block_special.sce

clear; xdel(winsid());

exec('genpat.sci', -1);

// Side lengths
Lx = 0.15;
Ly = 0.05;
Lz = 0.30;

// Vertices
vertices = [
    0,   0,  0;  // #1
    Lx,  0,  0;  // #2
    0,  Ly,  0;  // #3
    0,   0, Lz;  // #4
    Lx, Ly,  0;  // #5
    0,  Ly, Lz;  // #6
    Lx,  0, Lz;  // #7
    Lx, Ly, Lz]; // #8

// Faces
faces = [
    1, 2, 5, 3;  // #1
    1, 3, 6, 4;  // #2
    1, 4, 7, 2;  // #3
    4, 7, 8, 6;  // #4
    2, 5, 8, 7;  // #5
    3, 6, 8, 5]; // #6

// Patches
patches = genpat(vertices, faces);

// Draw patches
h_fig = figure;
h_fig.background = 8;
h_pat = plot3d(patches.x, patches.y, patches.z);
h_pat.color_mode = 4;
h_pat.foreground = 1;
h_pat.hiddencolor = 4;

// Axes settings
xlabel("x"); ylabel("y"); zlabel("z");
h_axes = gca();
h_axes.isoview = "on";
h_axes.box = "off";
h_axes.rotation_angles = [63.5, -127];
h_axes.data_bounds = [-0.2, -0.2, -0.1; 0.4, 0.3, 0.4];
xgrid;