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

📄 node77.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>3.2 Graphics instructions: 2D</TITLE><LINK REL=STYLESHEET TYPE="text/css"	HREF="./Modulef.css" TITLE="Modulef CSS"><meta name="description" value="3.2 Graphics instructions: 2D"><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=tex2html1378 HREF="node76.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/previous_motif.gif"	ALT="previous"></A><A NAME=tex2html1382 HREF="node75.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/up_motif.gif"	ALT="up"></A><A NAME=tex2html1384 HREF="node78.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/next_motif.gif"	ALT="next"></A><A NAME=tex2html1386 HREF="node2.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/contents_motif.gif"	ALT="contents"></A><A HREF="../Guide6-18/node77.html"><IMG BORDER=0 SRC="../icons/zoom18.gif" ALIGN=BOTTOM	ALT="[BIG]"></A><A HREF="../Guide6-14/node77.html"><IMG BORDER=0 SRC="../icons/zoom14.gif" ALIGN=BOTTOM	ALT="[Normal]"></A><A HREF="../Guide6-10/node77.html"><IMG BORDER=0 SRC="../icons/zoom10.gif" ALIGN=BOTTOM	ALT="[small]"></A><BR><B> Next: </B> <A NAME=tex2html1385 HREF="node78.html">4 Creating a 3D image</A><B>Up: </B> <A NAME=tex2html1383 HREF="node75.html">3 Creating a 2D image</A><B> Prev: </B> <A NAME=tex2html1379 HREF="node76.html">3.1 Masks and windows</A><B><A HREF="node2.html"	>Contents</A></B><HR SIZE=3 WIDTH="75&#37;"><H1><A NAME=SECTION05320000000000000000>3.2 Graphics instructions: 2D</A></H1><P><P><P>The objects described using the following subroutines will only be affected by the definition of  MASQU2 and FENTR2. The current position in 2D is independent of that in 3D.<P>As seen in the presentation, the objects are described in the user's own  coordinate system (we now know that it corresponds to choosing the appropriate mask).<P>The coordinates are expressed in  single precision real numbers, the origin being situated at  (0., 0.). They are  defined with respect to a direct orthogonal axis system.<P>The subroutines in which the plot type is specified  are described in Chapter <A HREF="node85.html#chap_graphics">5</A>, dealingwith graphics.<P>The following subroutines constitute the catalogue of 2D objects:<UL><LI><P><PRE>      SUBROUTINE MOV2TO(X, Y)      REAL X, Y</PRE><P>moves the cursor <A NAME=3072>&#160;</A> to the point with coordinates (X, Y).<P><LI><P><PRE>      SUBROUTINE MOV2OF(U, V)      REAL U, V</PRE><P>moves the cursor <A NAME=3073>&#160;</A>  by a  vector (U, V).<P><LI><P><PRE>      SUBROUTINE LIN2TO(X, Y)      REAL X, Y</PRE><P>creates a <A NAME=3074>&#160;</A> segment<A NAME=3075>&#160;</A> beginning at the current position and ending at the point with coordinates (X, Y). The end-point then becomes the current cursor position.<P><LI><P><PRE>      SUBROUTINE LIN2OF(U, V)      REAL U, V</PRE><P>creates a  segment defined by a vector (U, V) beginning at the current cursor position. The segment's  end-point then becomes the current cursor position.<P><LI><P><PRE>      SUBROUTINE CURVE2(TX, TY, NB)      REAL TX(NB), TY(NB)      INTEGER NB</PRE><P>plots a broken line<A NAME=3076>&#160;</A> whose <A NAME=3077>&#160;</A> coordinates at the  NB successive vertices are stored inarrays TX and TY.  At the end of the plot, the current cursor position is (TX(NB), TY(NB)).<P><LI><P><PRE>      SUBROUTINE CIRCL2(XC, YC, R, NBA)      REAL XC, YC, R      INTEGER NBA</PRE><P>plots a regular???/straight??? polygon <A NAME=3078>&#160;</A>  with NBA sides which approaches the circle <A NAME=3079>&#160;</A> withcenter (XC, YC)  and radius R. At the end of the plot, the current cursor position is  (XC+R, YC).<P><LI><P><PRE>      SUBROUTINE CRCLC2(XCENTR, YCENTR, X, Y, NBSEGM)      INTEGER NBSEGM      REAL XCENTR, YCENTR, X, Y</PRE><P> plots a line<A NAME=3080>&#160;</A> with  NBSEGM sides approaching the circle with center (XCENTR, YCENTR) and going through  (X, Y).<P><LI><P><PRE>      SUBROUTINE ARC2(ANGLE, CENTRE, POINT, NBA)      REAL ANGLE, CENTRE(2), POINT(2)      INTEGER NBA</PRE><P>plots  a<A NAME=3081>&#160;</A> polyline formed by  NBA sides approaching an arc of the circle with center (CENTRE(1), CENTRE(2)),  origin (POINT(1), POINT(2)), and forming an angle  ofANGLE radians in the positive trigonometric direction.At the end of the plot, the current cursor position is the last point plotted.<P><LI><P><PRE>      SUBROUTINE RECTA2(P1, P2)      REAL P1(2), P2(2)</PRE><P>plots a <A NAME=3082>&#160;</A> rectangle with sides parallel to the diagonal axes:<P> (P1(1), P1(2)) -- (P2(1), P2(2))<P>At the end of the plot, the current cursor position is the point (P1(1), P1(2)).<P> <LI><P><PRE>      SUBROUTINE DRECT2(X,Y,DX,DY)      REAL X,Y,DX,DY</PRE><P>plots a<A NAME=3083>&#160;</A> rectangle whose 4 vertices are (X, Y), (X+DX, Y), (X, Y+DY) and (X+DX, Y+DY) (user coordinates).<P><LI><P><PRE>      SUBROUTINE POLY2(X, Y, NB)      REAL X(NB), Y(NB)      INTEGER NB</PRE><P>plots a<A NAME=3084>&#160;</A> polygon with  NB vertices whose coordinates are stored in arraysX and Y.At the end of the plot, the current cursor position is the point (X(1), Y(1)).<P></UL><P><DL COMPACT><DT>Coloring-in of surfaces:<DD>   <P><PRE>      SUBROUTINE POLY2F(X, Y, NB, CFAC, CCONT, IFLAG)      INTEGER NB, CFAC, CCONT, IFLAG      REAL X(NB), Y(NB)</PRE><P>where:<P> X(1:NB), Y(1:NB): Coordinates of the <A NAME=3087>&#160;</A> vertices <A NAME=3088>&#160;</A> of the polygon; NB: Number of polygon vertices (NB <b>&lt;</b> 50); CFAC: Number of the facet color; CCONT: Number of the contour color; IFLAG: Plot option:<DL COMPACT><DT>.<DD> 0: Plot facet only; <DT>.<DD> 1: Plot contour only; <DT>.<DD> 2: Plot facet and contour.<P> </DL><P>If the facet is convex, the clipping corresponding to the current mask will be correct.If the facet is not convex and if  the non-convex part is cut by the current mask, there will bea slight default  in this area (one line  rejoining the two ends).<P>The subroutines utilized to specify  the colors are described in Chapter <A HREF="node85.html#chap_graphics">5</A>.<P><DT>Text:<DD><P> The subroutine described below generates text<A NAME=3092>&#160;</A> formed by &quot;HARDWARE&quot; characters. Another subroutine exits which caters for &quot;SOFTWARE&quot; characters, described in thechapter <A HREF="node78.html#chap_3D">4</A>, devoted to 3D images.<P><PRE>      SUBROUTINE TXT2D(STRING, NB, X, Y)      CHARACTER*(*) STRING      INTEGER NB      REAL X, Y</PRE><P>plots, beginning at <A NAME=3094>&#160;</A> position (X, Y), the text consisting of NB characters contained in thecharacter  string    STRING.The current cursor position  becomes  point (X, Y).<P> </DL><P>The subroutines to specify    the size, direction, ..., of the text are detailed in Chapter <A HREF="node85.html#chap_graphics">5</A>,dealing with graphics.<P><P><P><HR SIZE=3 WIDTH="75&#37;"><IMG SRC="../icons/smallmod.gif" WIDTH=211 HEIGHT=50 ALIGN=BOTTOM	ALT="Modulef"><A NAME=tex2html1378 HREF="node76.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/previous_motif.gif"	ALT="previous"></A><A NAME=tex2html1382 HREF="node75.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/up_motif.gif"	ALT="up"></A><A NAME=tex2html1384 HREF="node78.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/next_motif.gif"	ALT="next"></A><A NAME=tex2html1386 HREF="node2.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/contents_motif.gif"	ALT="contents"></A><A HREF="../Guide6-18/node77.html"><IMG BORDER=0 SRC="../icons/zoom18.gif" ALIGN=BOTTOM	ALT="[BIG]"></A><A HREF="../Guide6-14/node77.html"><IMG BORDER=0 SRC="../icons/zoom14.gif" ALIGN=BOTTOM	ALT="[Normal]"></A><A HREF="../Guide6-10/node77.html"><IMG BORDER=0 SRC="../icons/zoom10.gif" ALIGN=BOTTOM	ALT="[small]"></A><BR><B> Next: </B> <A NAME=tex2html1385 HREF="node78.html">4 Creating a 3D image</A><B>Up: </B> <A NAME=tex2html1383 HREF="node75.html">3 Creating a 2D image</A><B> Prev: </B> <A NAME=tex2html1379 HREF="node76.html">3.1 Masks and windows</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 + -