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

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines.
The key components of Window…

Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210 (2 * 3 * 5 * 7) or 2310 (2 * 3 * 5 * 7 * 11).
The larger templa…