function [x1,y1]=applyrot(x,y,c,s) x1=c*x+s*y; y1=-s*x+c*y;