function pts_sp = WP_standard_plane(pts,params)
%

[num_pts,dummy] = size(pts);

v = -params(4)*[params(1);params(2);params(3)];
alpha = atan2(v(2),v(1));
f = sqrt(v(1)^2+v(2)^2);
beta = atan2(f,v(3));
for p = 1:num_pts
    pts0(p,1) = pts(p,1) - v(1);
    pts0(p,2) = pts(p,2) - v(2);
    pts0(p,3) = pts(p,3) - v(3);
end
pts0 = pts0';
Rz = CS5320_gen_R([0;0;1],-alpha);
Ry = CS5320_gen_R([0;1;0],beta);
pts_p = Ry*Rz*pts0;
pts_sp = pts_p(1:2,:)';
