Hey guys,
i am working on the simulation of a falling rectangle and have done the formulas. Now i need to test it so i need to plot it. As I need to see if the rotation is correct, I need to plot with a rectangle over my center of gravity. My project advisor told me to plot 4 points and connect them which I did. How can I put the centroid of the rectangle over the center of gravity of my simulation so that it moves with its coordinates and deegres?
my rectangle:
clear allx1 = [-1 1] y1 = [0.5 0.5] plot(x1,y1,'b-');hold on;plot([1 1],[0.5, -0.5],'b-');hold on;plot([1 -1],[-0.5 -0.5],'b-');hold on;plot([-1 -1],[-0.5 0.5],'b-');xlabel('x');ylabel('y');axis([-2 2 -2 2]);
I hope you get my question, if not feel free to ask and I try to explain it better.
Best Answer