Two linked Robotic arm Inverse Kinematics with Swift 5.
I made a public google spreadsheet to show up the formula for two linked robotic arm.
let baseArm = Arm(len: 200)
let arm = Arm(len: 250)
baseArm.linkedArm = arm
robot = Robot(baseArm: baseArm, view:robotView) // give a robotview to the robot. to make it visible. to make it practical.
robot[0].angle = 45.0
robot[1].angle = 45.0
robot.draw()
The code is unit tested. (more coverage appreciated.)
For any idea or contribution, please DT me. @erkekin