In matlab I’m trying to define grid of points that have two tilt angles in respect to a horizontal plane. So far, I’m successful at generating grid of points that are at an angle in the xOz plane, but I dont know how to do it in the yoZ plane.
I use following expressions in matlab to get the coordinates of the points:
Tx=[0:xEl-1]*stepX*cosd(angle1)-offsetX;
Tx=repmat(Tx,yEl,1);
Ty=diag([[0:yEl-1]*stepY])*(Tx*0+1)-offsetY;
Tz=sqrt(ldist^2/(1+tand(angle2)^2+tand(angle1)^2))+([0:xEl-1]-xEl/2)*stepX*sind(angle1);
Tz=repmat(Tz,yEl,1);
This gives me a plane with points that only have one angle which is angle1 (in xOz plane), but is not tilted in by other angle (angle2 in yOz plane), see figure below:
I know this requires modification in calculation of z coordinates, but I’m unsure how to properly do it. I also want to be sure that lDist is maintained which is the length of the normal vector or distance from centre of rectangular grid to z=0 point. Any ideas would be appreciated.