%% ME 102B Design Review II - Group 16
%% Delta Robot Inverse Position Kinematics
clc;clear all;close all

% x y z checks
%highest z, check xy limits
x = 0; y = 0; z = -5;
theta1L = IPK(x,y,z)
x = 4; y = 2.14;
theta2L = IPK(x,y,z)
y = -3.8;
theta3L = IPK(x,y,z)
x = -4;
theta4L = IPK(x,y,z)
y = 2.14;
theta5L = IPK(x,y,z)

%lowest z, check xy limits
x = 0; y = 0; z = -15;
theta1H = IPK(x,y,z)
x = 4; y = 2.14;
theta2H = IPK(x,y,z)
y = -3.8;
theta3H = IPK(x,y,z)
x = -4;
theta4H = IPK(x,y,z)
y = 2.14;
theta5H = IPK(x,y,z)