% make_block.m

clear; close all;

% Reference position
r = [1; 1; 1];

% Reference orientation
R = eulerXYZ(-pi/3, 0, pi/6);

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

% Vertices and faces
[vertices, faces] = calcBlock(r, R, Lx, Ly, Lz);

% Draw patch
figure(1);
h = patch('Faces', faces, 'Vertices', vertices, 'FaceColor', 'y');

% Axes settings
xlabel('x'); ylabel('y'); zlabel('z');
axis vis3d equal;
view([-37.5,30]);
camlight;
grid on;
xlim([0.8,1.3]);
ylim([0.9,1.4]);
zlim([0.8,1.3]);