Week 2- 2R Robotic Arm Challenge
In this program 2 arms of different lengths are plotted and they are allowed to have angles between 0 to 90 degrees.Here the zero to 90 degrees are divided into 14 equal parts using linspace command, so both arms having 14 different angles each between 1 to 90 degrees make a combination of 196 figures.
First for loop is used to give theta values to first arm and second for loop for second arm. So after giving first theta value to first arm, 14 theta values are given to second arm and after finishing that cycle seconf theta value is given to first arm, similiarly the cycle continues.
Axis is also specified for the x and y acis using 'axis' command.
Using the 'getframe(gcf)' command and using term ct as a incrementing function by 1 each time we have stitched the images together to create an animation video suing movie, VideoWriter and writeVideo command we have successfull created the animation.
The code for program is
