12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

viewmtxPurpose2viewmtxView transformation matricesSyntaxDescriptionT = viewmtx(az,el)T = viewmtx(az,el,phi)T = viewmtx(az,el,phi,xc)viewmtx computes a 4-by-4 orthographic or perspective transformation matrixthat projects four-dimensional homogeneous vectors onto a two-dimensionalview surface (e.g., your computer screen).T = viewmtx(az,el) returns an orthographic transformation matrixcorresponding to azimuth az and elevation el. az is the azimuth (i.e.,horizontal rotation) of the viewpoint in degrees. el is the elevation of theviewpoint in degrees. This returns the same matrix as the commandsview(az,el)T = viewbut does not change the current view.T = viewmtx(az,el,phi) returns a perspective transformation matrix. phi isthe perspective viewing angle in degrees. phi is the subtended view angle of thenormalized plot cube (in degrees) and controls the amount of perspectivedistortion.PhiDescription0 degrees Orthographic projection10 degrees Similar to telephoto lens25 degrees Similar to normal lens60 degrees Similar to wide angle lensYou can use the matrix returned to set the view transformation with view(T).The 4-by-4 perspective transformation matrix transforms four-dimensionalhomogeneous vectors into unnormalized vectors of the form (x,y,z,w), where w isnot equal to 1. The x- and y-components of the normalized vector (x/w, y/w, z/w,1) are the desired two-dimensional components (see example below).2-578

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!