function v = rotate_in_plane(v1,v2,theta)
    
    or_size = size(v1);
    
    R = rot_matrix(theta);
    v2_p = v2(:) - dot(v2(:),v1(:))/norm(v1(:)).*v2(:);
    v_together = [v1(:) , v2_p(:)];
    v_rot = v_together*R;
    v_rot_1 = v_rot(:,1);
    
    v = reshape(v_rot_1,or_size);
   
end