⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 node80.html

📁 htmdoc for html coding
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2 Final//FR"><!-- Converted with LaTeX2HTML 95.1 (Fri Jan 20 1995) --><!-- by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds --><!-- Modified Simulog 03/97 --><HTML><HEAD><TITLE>4.2 Masks and windows</TITLE><LINK REL=STYLESHEET TYPE="text/css"	HREF="./Modulef.css" TITLE="Modulef CSS"><meta name="description" value="4.2 Masks and windows"><meta name="keywords" value="Guide6"><meta name="resource-type" value="document"><meta name="distribution" value="global"></HEAD><BODY BGCOLOR="#FFFFFF"><P> <IMG SRC="../icons/smallmod.gif" WIDTH=211 HEIGHT=50 ALIGN=BOTTOM	ALT="Modulef"><A NAME=tex2html1415 HREF="node79.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/previous_motif.gif"	ALT="previous"></A><A NAME=tex2html1421 HREF="node78.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/up_motif.gif"	ALT="up"></A><A NAME=tex2html1423 HREF="node81.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/next_motif.gif"	ALT="next"></A><A NAME=tex2html1425 HREF="node2.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/contents_motif.gif"	ALT="contents"></A><A HREF="../Guide6-18/node80.html"><IMG BORDER=0 SRC="../icons/zoom18.gif" ALIGN=BOTTOM	ALT="[BIG]"></A><A HREF="../Guide6-14/node80.html"><IMG BORDER=0 SRC="../icons/zoom14.gif" ALIGN=BOTTOM	ALT="[Normal]"></A><A HREF="../Guide6-10/node80.html"><IMG BORDER=0 SRC="../icons/zoom10.gif" ALIGN=BOTTOM	ALT="[small]"></A><BR><B> Next: </B> <A NAME=tex2html1424 HREF="node81.html">4.3 3D transformations</A><B>Up: </B> <A NAME=tex2html1422 HREF="node78.html">4 Creating a 3D image</A><B> Prev: </B> <A NAME=tex2html1416 HREF="node79.html">4.1 General program structure</A><B><A HREF="node2.html"	>Contents</A></B><HR SIZE=3 WIDTH="75&#37;"><H1><A NAME=SECTION05420000000000000000>4.2 Masks and windows</A></H1><P><P><P>The visualization surface on which the  3D image will be displayed is defined, as in the 2D case, by FENTR2 or RFENTR.The management of the clipping indicators is, as in 2D, defined by CLIP and CLIPHD.<P>As in the 2D case, it corresponds to defining a zone where the object is described. Clearly, a  plane mask must be used to define a 3D object.<P>The most usual case corresponding to a perspective view is described here<A NAME=3109>&#160;</A> <A NAME=3110>&#160;</A>,while the other cases  will be described later on.<P><P><P><P><A NAME=3538>&#160;</A><IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img128.gif"><BR><STRONG>Figure 4.1:</STRONG> <i> Pyramid of vision and depth limitation</i><A NAME=3534iPyramidofvisionanddepthlimitationi3534>&#160;</A><BR><P><P>For a perspective view<A NAME=3114>&#160;</A>, the MASK is in fact  a  pyramid  of vision (figure <A HREF="#figpyr">4.1</A>) with a rectangular base and where the observer's eye is positioned at the vertex.<P>In principle, this  pyramid is infinitely long, but it can be limited in depth by two planeswhich are  perpendicular   to the vision axis.As in the 2D case, only the part found inside this space will be  visible.<P><PRE>      SUBROUTINE PRSPCT(ALPHA, BETA)      REAL ALPHA, BETA</PRE><P>This procedure defines a   perspective with  half-angle vision of ALPHA in X and BETA in Y, for an observer positioned at <A NAME=3116>&#160;</A> (0., 0., 0.) in his own coordinate system and looking in the negative Z direction.<P>In addition, it deduces a 2D mask which could be defined elsewhere by:<PRE>     CALL MASQU2(-TAN(ALPHA), TAN(ALPHA), -TAN(BETA), TAN(BETA))</PRE><P>The mask corresponds to a rectangle obtained by the intersection of the  vision pyramid withthe plane  (Z = -1). In this mask we can, if so wished, plot objects in 2D(projections of the object onto this plane for example). In reality,  FORTRAN 3Dcalculates the object's position in the 3D space and plots its projection onto this mask.<P><P><A NAME=3548>&#160;</A><IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img129.gif"><BR><STRONG>Figure 4.2:</STRONG> <i> 2D mask deduced by calling PRSPCT</i><A NAME=3544i2DmaskdeducedbycallingPRSPCTi3544>&#160;</A><BR><P><P>Let us note immediately that we always associate a coordinate system with the observer such that his/her eye is positioned at  (0., 0., 0.) and he/she looks in the negative Z direction.This coordinate system is independent of the object's. In the following  paragraph, we will see howto obtain this normalized position.<P><PRE>      SUBROUTINE MASQU3(ZMIN, ZMAX)      REAL ZMIN, ZMAX</PRE><P>When <A NAME=3120>&#160;</A> using PRSPCT, ZMIN and ZMAX are the distances with respect to the observer of the two  planes which are parallel  to the &quot;X0Y&quot; plane in the observer's coordinate system.     The observer will always be in the normalized position described above. Only thepart of the image which lies between the two planes will be displayed.The clipping in depth, mentioned earlier, is therefore performed.<P>As in the 2D case, it is possible to suppress the clipping defined by the above two subroutines during executionof a program. This suppression can be either momentary or definitive.<P><PRE>     SUBROUTINE CLIP3(FCONE, FMASQU)     LOGICAL FCONE, FMASQU</PRE><P>This subroutine is used to assign<A NAME=3121>&#160;</A>, or not, the preceding clipping<A NAME=3122>&#160;</A> according the the values of FCONE and FMASQU.<UL><LI> If FCONE  =.FALSE. the conical clipping defined by PRSPCT is  suppressed. <LI> If FMASQU =.FALSE. the clipping  in depth defined by MASQU3 is not performed.</UL><P>Subroutine PRSPCT<A NAME=3125>&#160;</A>, as mentioned earlier,  defines a  perspective (amongst other things!). It could be desirable in certain applications to  remove this  perspective effect, at least momentarily:<P><PRE>      SUBROUTINE NOPERS(FLAG)      LOGICAL FLAG</PRE><P>This subroutine is used to <A NAME=3126>&#160;</A> avoid taking the perspective, defined by  PRSPCT, into account. IfFLAG = .TRUE., this  perspective and the implied clipping  are not effected.FLAG is set to .FALSE. on exit from PRSPCT.<P><P><P>A  window in 3D is defined in the same manner as in 2D. The same subroutines are valid here. The window containsthe image falling inside the 2D mask  computed by subroutine PRSPCT<A NAME=3127>&#160;</A>.<P><P><A NAME=3558>&#160;</A><IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img130.gif"><BR><STRONG>Figure 4.3:</STRONG> <i> Mask and window correspondence for a 3D object</i><A NAME=3554iMaskandwindowcorrespondencefora3Dobjecti3554>&#160;</A><BR><P><P><P><P><HR SIZE=3 WIDTH="75&#37;"><IMG SRC="../icons/smallmod.gif" WIDTH=211 HEIGHT=50 ALIGN=BOTTOM	ALT="Modulef"><A NAME=tex2html1415 HREF="node79.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/previous_motif.gif"	ALT="previous"></A><A NAME=tex2html1421 HREF="node78.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/up_motif.gif"	ALT="up"></A><A NAME=tex2html1423 HREF="node81.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/next_motif.gif"	ALT="next"></A><A NAME=tex2html1425 HREF="node2.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/contents_motif.gif"	ALT="contents"></A><A HREF="../Guide6-18/node80.html"><IMG BORDER=0 SRC="../icons/zoom18.gif" ALIGN=BOTTOM	ALT="[BIG]"></A><A HREF="../Guide6-14/node80.html"><IMG BORDER=0 SRC="../icons/zoom14.gif" ALIGN=BOTTOM	ALT="[Normal]"></A><A HREF="../Guide6-10/node80.html"><IMG BORDER=0 SRC="../icons/zoom10.gif" ALIGN=BOTTOM	ALT="[small]"></A><BR><B> Next: </B> <A NAME=tex2html1424 HREF="node81.html">4.3 3D transformations</A><B>Up: </B> <A NAME=tex2html1422 HREF="node78.html">4 Creating a 3D image</A><B> Prev: </B> <A NAME=tex2html1416 HREF="node79.html">4.1 General program structure</A><B><A HREF="node2.html"	>Contents</A></B><BR> <HR><P><ADDRESS></ADDRESS></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -