Surface Projection
Example from the PscFunctions package
It is possible to obtain a parametric equation of projection region of a surface onto the oblique plane
.
The
PscFunctions
package contains several routines for generation equations of surfaces of solids of standard form. Here we use
SRegularPyramid
routine for generating parametric equation of the pyramidal surface and
SProjection
routine for generating equation of projection of the pyramid.
> | restart; with(PscFunctions): px,py,pz:=SRegularPyramid(6,2,1): ps:=plot3d([px(u,v),py(u,v),pz(u,v)],u=0..6,v=0..3,scaling=CONSTRAINED,grid=[25,13],axes=BOXED): xp,yp,zp:=SProjection([px,py,pz],[1,0,0,-3/2]): pc:=plot3d([xp(u,v),yp(u,v),zp(u,v)],u=0..6,v=0..3,axes=BOXED,scaling=CONSTRAINED,labels=["X","Y","Z"],style=patchnogrid): plots[display](pc,ps,orientation=[-130,60]); `Parametric equation of the pyramid`; 'x'=px(u,v); 'y'=py(u,v); 'z'=pz(u,v); |
Here is a similar example of generating equation of projection of a cube onto the oblique plane.
> | Cube:=SCuboid(2,2,2): xc:=(u,v)->Cube[1](u,v)-1: yc:=(u,v)->Cube[2](u,v)-1: zc:=(u,v)->Cube[3](u,v)-1: cs:=plot3d([xc(u,v),yc(u,v),zc(u,v)],u=0..8,v=-2..4,scaling=CONSTRAINED,grid=[25,19],axes=BOXED): xp,yp,zp:=SProjection([xc,yc,zc],[1,1,1,-4]): pc:=plot3d([xp(u,v),yp(u,v),zp(u,v)],u=0..8,v=-2..4,axes=BOXED,scaling=CONSTRAINED,labels=["X","Y","Z"],style=patchnogrid): plots[display](pc,cs,orientation=[-20,60]); `Parametric equation of projection of the cube`; print('x'=xp(u,v)); print('y'=yp(u,v)); print('z'=zp(u,v)); |