
December 2024
steps = 200; // steps per revolution
stepsDegrees = steps * (angle / 360);
}
k = (px^2 + py^2 + pz^2 - L2^2 - L3^2) / (2 * L2 * L3);
q1 = atan2(py, px);
q3 = atan2(sqrt(1 - k^2), k);
q2 = atan2(pz, sqrt(px^2 + py^2)) - atan2(L3 * sin(q3), L2 + L3 * cos(q3));
}
pulse = round((Maxpulse * angle) / 360.0);
(Px^2 / a^2) + (Pz^2 / b^2) + (Py^2 / c^2) > 1
error = sqrt(sum((desired_trajectory - actual_trajectory).^2, 2));
scatter3(..., error, 'filled');