I have the following code which shows the rotation of a 2D polygon and what i want is to modify it using a compound matrix transformation so that the square rotates about an arbitrary point.

Can anyone help me how can i do such a thing ??

Thanks in advance

close all;clear all;% a 2D pologyon p=[-1 1 1 -1 -1 ; -1 -1 1 1 -1];% points p = in homogeneous coordp(3,:)=1;% axes for plotting the animationfigure; hold on;axis([-6 6 -6 6]);axis equal;for theta=0:0.005:2*pi R=[cos(theta) -sin(theta) 0 ; sin(theta) cos(theta) 0 ; 0 0 1]; pdash=R*p; pdash(1,:)=pdash(1,:)./pdash(3,:); pdash(2,:)=pdash(2,:)./pdash(3,:); cla; plot(pdash(1,:),pdash(2,:),'b'); drawnow;end

Whether youâ€™re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.

This video will show you how to get GIT to work in Eclipse.
It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.