📄 node94.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>7.2 Position and clipping</TITLE><LINK REL=STYLESHEET TYPE="text/css" HREF="./Modulef.css" TITLE="Modulef CSS"><meta name="description" value="7.2 Position and clipping"><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=tex2html1577 HREF="node93.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/previous_motif.gif" ALT="previous"></A><A NAME=tex2html1583 HREF="node92.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/up_motif.gif" ALT="up"></A><A NAME=tex2html1585 HREF="node95.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/next_motif.gif" ALT="next"></A><A NAME=tex2html1587 HREF="node2.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/contents_motif.gif" ALT="contents"></A><A HREF="../Guide6-18/node94.html"><IMG BORDER=0 SRC="../icons/zoom18.gif" ALIGN=BOTTOM ALT="[BIG]"></A><A HREF="../Guide6-14/node94.html"><IMG BORDER=0 SRC="../icons/zoom14.gif" ALIGN=BOTTOM ALT="[Normal]"></A><A HREF="../Guide6-10/node94.html"><IMG BORDER=0 SRC="../icons/zoom10.gif" ALIGN=BOTTOM ALT="[small]"></A><BR><B> Next: </B> <A NAME=tex2html1586 HREF="node95.html">7.3 Particular displays</A><B>Up: </B> <A NAME=tex2html1584 HREF="node92.html">7 Internal programs</A><B> Prev: </B> <A NAME=tex2html1578 HREF="node93.html">7.1 Interrogation subroutines</A><B><A HREF="node2.html" >Contents</A></B><HR SIZE=3 WIDTH="75%"><H1><A NAME=SECTION05720000000000000000>7.2 Position and clipping</A></H1><P><P><P><UL><LI><P><PRE> SUBROUTINE POSIT(XIN, YIN, XOUT, YOUT, I) REAL XIN, YIN, XOUT, YOUT INTEGER I</PRE><P> This subroutine converts the <A NAME=3346> </A> object's coordinates into centimeters on the screen, orthe inverse. <BR><P>On entry: XIN, YIN <BR> On exit: XOUT, YOUT <BR><P>If I=0: XIN, YIN point in the user space<P> XOUT, YOUT homologue in centimeters <BR><P> If I=1: XIN, YIN in centimeters<P> XOUT, YOUT homologue in the user space <BR><P> If I=2: XOUT, YOUT current point in the user space.<P> </UL><P><P><P>The subroutines which follow are used to define a point and line positions in relation to the mask defined for the object:<P><UL><LI><P><PRE> SUBROUTINE QFEN(RECTI, F, RECT) REAL RECTI(4), RECT(4), F(4)</PRE><P>calculates the<A NAME=3351> </A> largest rectangle homologous to RECTI in F. <BR><P>Input: <BR><P> RECTI: initial rectangle (only the dx and dy are important) and <BR> F: rectangle in which it is contained. <BR><P>Output: RECT: rectangle homologous to RECTI contained in F. <BR><P><LI><P><PRE> SUBROUTINE QMSQ(MASQUI, F, MASQUE) REAL MASQUI(4), MASQUE(4), F(4)</PRE><P>calculates a<A NAME=3352> </A> non-deforming mask to view MASQUI in window F. <BR><P>Input: <BR><P> MASQUI: initial mask and <BR> F: window in which we want to view. <BR><P>Output: MASQUE: non-deforming mask for the window. <BR><P><LI><P><PRE> SUBROUTINE SCSPT2(P, MASQ, FREJET) REAL MASQ(4) REAL P(4) LOGICAL FREJET</PRE><P> MASQ is a<A NAME=3353> </A> rectangular mask defined by: <BR><P> MASQ(1) = XMIN<P> MASQ(2) = XMAX<P> MASQ(3) = YMIN<P> MASQ(4) = XMAX <BR> P(1:2) are the coordinates of a point in the 2D space <BR> P(3) = 0. <BR> P(4) = 1. <BR><P> On exit we have: <BR><P> FREJET =.TRUE. : P is not inside the rectangle defined by MASQ.<P> FREJET =.FALSE. : P is inside the rectangle defined by MASQ. <BR><P><LI><P><PRE> SUBROUTINE SCSPT3(P, MASQ, FREJET) REAL P(4), MASQ(6) LOGICAL FREJET</PRE><P> MASQ is a <A NAME=3354> </A> parallelopipedic mask defined by: <BR><P> MASQ(1) = XMIN<P> MASQ(2) = XMAX<P> MASQ(3) = YMIN<P> MASQ(4) = XMAX<P> MASQ(5) = ZMIN<P> MASQ(6) = ZMAX <BR> P(1:3) are the point coordinates in the 3D space. <BR> P(4) = 1. <BR> <BR><P>On exit we have: <BR><P> FREJET =.TRUE. P is not inside the parallolepiped by MASQ.<P> FREJET =.FALSE. P is inside the parallelopiped defined by MASQ. <BR><P><LI><P><PRE> SUBROUTINE SCSO2D(P1, P2, MASQ, FREJET, FCLIP2) REAL P1(4), P2(4), MASQ(4) LOGICAL FREJET, FCLIP2</PRE><P> MASQ is a <A NAME=3355> </A> rectangular mask defined by: <BR><P> MASQU(1) = XMIN<P> MASQU(2) = XMAX<P> MASQU(3) = YMIN<P> MASQU(4) = XMAX <BR> P1(1:3), P2(1:3) define a segment <BR> P1(4) = 1. <BR> P2(4) = 1. <BR><P>On exit we have: <BR><P> P1 and P2: The extremities of the part of the segment which falls inside the rectangle defined by MASQ.<P> FREJET =.TRUE. if no point of the segment falls inside the rectangle;<BR> FALSE. if not.<P> FCLIP2 =.TRUE. if point P2 is falls outside the rectangle; <BR> FALSE. if not. <BR><P><LI><P><PRE> SUBROUTINE SCSO3D(P1, P2, MASQ, FCLIPZ, FREJET, FCLIP2) REAL P1(4), P2(4), MASQ(4) LOGICAL FREJET, FCLIP2, FCLIPZ</PRE><P> MASQ is a <A NAME=3358> </A> parallelopipedic mask defined by: <BR><P> MASQU(1) = XMIN<P> MASQU(2) = XMAX<P> MASQU(3) = YMIN<P> MASQU(4) = XMAX <BR><P>Depending on the case under consideration:<P> MASQU(5) = ZMIN<P> MASQU(6) = ZMAX <BR> P1(1:3), P2(1:3) define a segment <BR> P1(4) = 1. <BR> P2(4) = 1. <BR><P>This subroutine performs a pyramidal splitting of segment P1 P2.<P>Let us assume that we return to the normal case where the observer is positioned at the origin andlooks in the negative Z direction (see the description of subroutine NRMLST).<P>The vision pyramid is limited by planes X-Z=0, X+Z=0, Y+Z=0, Y-Z=0., where:<P> P1 and P2 contains the extremities of the part of the segment inside the cone.<P> FCLIPZ =.TRUE. : the cone is, in addition, limited by the planes:<P>Z = MASQ(5)<P> Z = MASQ(6)<P> FREJET =.TRUE. if no point in the segment falls inside the cone<P>FALSE. if not <BR><P> FCLIP2 =.TRUE. if point P2 is outside the cone<P>FALSE. if not <BR><P><LI><P><PRE> SUBROUTINE SCSC3D(P1, P2, MASQ, FREJET, FCLIP2) REAL P1(4), P2(4), MASQ(4) LOGICAL FREJET, FCLIP2</PRE><P>performs a split<A NAME=3363> </A> of segment P1 P2 by a rectangular parallelopiped. MASQ is a parallelopipedic mask defined by: <BR><P> MASQU(1) = XMIN<P> MASQU(2) = XMAX<P> MASQU(3) = YMIN<P> MASQU(4) = XMAX <BR><P>Depending on the case under consideration:<P> MASQU(5) = ZMIN<P> MASQU(6) = ZMAX <BR> P1(1:3), P2(1:3) define a segment <BR> P1(4) = 1. <BR> P2(4) = 1. <BR><P>On return we have: <BR><P> P1 and P2: the extremities of the part of the segment which falls inside the parallelopiped.<P> FREJET =.TRUE. if no point of the segment falls inside the parallelopiped; <BR> FALSE. if not.<P> FCLIP2 =.TRUE. if point P2 is outside the parallelopiped. <BR> FALSE. if not. <BR><P><LI><P><PRE> LOGICAL FUNCTION APPART(A, B, X, Y, DX, DY) REAL A, B, X, Y, DX, DY</PRE><P>Does the point A, B fall inside<A NAME=3366> </A> the rectangle X, Y, DX, DY?If yes APPART becomes .TRUE.<P><LI><P><PRE> LOGICAL FUNCTION TSTRJT(I)</PRE><P>returns the value of FREJET after calling<A NAME=3367> </A> LIN2TO or LIN3TO. <BR> .TRUE. if the line is rejected completely. I is a fictitious argument.<P><LI><P><PRE> LOGICAL FUNCTION TSTRJX(I)</PRE><P>checks if the text is rejected or not<A NAME=3368> </A>. <BR> .TRUE. if totally rejected or rejection of the 2<IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img141.gif"> extremity. I is a fictitious argument.<P><LI><P><PRE> SUBROUTINE SHUNT2(LOGIC) LOGICAL LOGIC</PRE><P>If LOGIC=.TRUE., the generation of the graphics code <A NAME=3370> </A> for 2D images is not executed (LIN2TO, MOV2TO,... ,2D library,...).<P>Subroutine ACTIO2 is executed instead:<P><PRE> SUBROUTINE ACTIO2(X1, Y1, X2, Y2) REAL X1, X2, Y1, Y2</PRE><P>This is a user subroutine<A NAME=3371> </A>.The coordinates (X1, Y1) and (X2, Y2) are in centimeters.It retrieves what was plotted without SHUNT2.<P><LI><P><PRE> SUBROUTINE SHUNT3(LOGIC) LOGICAL LOGIC</PRE><P>If LOGIC=.TRUE. the generation of the graphics code<A NAME=3372> </A> for 3D images is not executed (LIN3TO, MOV3TO,..., 3D library,...)<P> Subroutine ACTIO3 is executed instead:<P><PRE> SUBROUTINE ACTIO3(X1, Y1, Z1, X2, Y2, Z2) REAL X1, Y1, Z1, X2, Y2, Z2</PRE><P>This subroutine is written by the user<A NAME=3373> </A>.The coordinates (X1, Y1, Z1) and (X2, Y2, Z2) are in centimeters.It retrieves what was plotted without SHUNT3.<P></UL><P><P><P><HR SIZE=3 WIDTH="75%"><IMG SRC="../icons/smallmod.gif" WIDTH=211 HEIGHT=50 ALIGN=BOTTOM ALT="Modulef"><A NAME=tex2html1577 HREF="node93.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/previous_motif.gif" ALT="previous"></A><A NAME=tex2html1583 HREF="node92.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/up_motif.gif" ALT="up"></A><A NAME=tex2html1585 HREF="node95.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/next_motif.gif" ALT="next"></A><A NAME=tex2html1587 HREF="node2.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/contents_motif.gif" ALT="contents"></A><A HREF="../Guide6-18/node94.html"><IMG BORDER=0 SRC="../icons/zoom18.gif" ALIGN=BOTTOM ALT="[BIG]"></A><A HREF="../Guide6-14/node94.html"><IMG BORDER=0 SRC="../icons/zoom14.gif" ALIGN=BOTTOM ALT="[Normal]"></A><A HREF="../Guide6-10/node94.html"><IMG BORDER=0 SRC="../icons/zoom10.gif" ALIGN=BOTTOM ALT="[small]"></A><BR><B> Next: </B> <A NAME=tex2html1586 HREF="node95.html">7.3 Particular displays</A><B>Up: </B> <A NAME=tex2html1584 HREF="node92.html">7 Internal programs</A><B> Prev: </B> <A NAME=tex2html1578 HREF="node93.html">7.1 Interrogation subroutines</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 + -