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

📄 xgrafix.tex

📁 xgrafix 是PTSG模拟程序中的图形截面库 改版本是最新版本
💻 TEX
📖 第 1 页 / 共 3 页
字号:
\begin{flushleft}$XGSet2DC$($PlotType$, $X\_Label$, $Y\_Label$, $Z\_Label$, $State: Exp $, $ulx$, $uly$, \\\hspace{.8in} $X\_Scale$, $Y\_Scale$, $Z\_Scale$, $X\_Auto\_Rescale$, $Y\_Auto\_Rescale$, \\\hspace{.8in} $Z\_Auto\_Rescale$, $X\_Min$, $X\_Max$, $Y\_Min$, $Y\_Max$, $Z\_Min$, $Z\_Max$) \\char  *$PlotType$;          /* ``linlinlin'', ``linlinlog'', ``linloglog'', etc. */ \\char  *$X\_Label$;           /* x label for the frame                            */ \\char  *$Y\_Label$;           /* y label for the frame                            */ \\char  *$Z\_Label$;           /* z label for the frame                            */ \\char  *$State: Exp $;             /* ``open'' or ``closed''                            */ \\int    $ulx$, $uly$;        /* requested position of frame's upper left corner    */ \\SCALAR  $X\_Scale$;           /* scaling factor for the x array                   */ \\SCALAR  $Y\_Scale$;           /* scaling factor for the y array                   */ \\SCALAR  $Z\_Scale$;           /* scaling factor for the z array                   */ \\int    $X\_Auto\_Rescale$;    /* if True $X\_Min$ and $X\_Max$ are ignored      */ \\int    $Y\_Auto\_Rescale$;    /* if True $Y\_Min$ and $Y\_Max$ are ignored       */ \\int    $Z\_Auto\_Rescale$;    /* if True $Z\_Min$ and $Z\_Max$ are ignored       */ \\SCALAR  $X\_Min$, $X\_Max$;    /* x bounds for the plot if $X\_Auto\_Rescale$ is False  */ \\SCALAR  $Y\_Min$, $Y\_Max$;    /* y bounds for the plot if $Y\_Auto\_Rescale$ is False  */ \\SCALAR  $Z\_Min$, $Z\_Max$;    /* z bounds for the plot if $Z\_Auto\_Rescale$ is False  */\end{flushleft}This function creates a two-axis contour plot.  The parameters for this function are similar to those of $XGSet3D$(), with the exception that $XGSet2DC$() does not need viewing angles.A call to $XGSet2DC$() must be followed by one and only one call to $XGCont$()to add the contour plot to the frame.\newpage\begin{flushleft}$XGCont$($x\_array$, $y\_array$, $z\_array$, $mpoints$, $npoints$, $color$) \\SCALAR   *$x\_array$;    /* x array to be plotted                         */ \\SCALAR   *$y\_array$;    /* y array to be plotted                         */ \\SCALAR  **$z\_array$;    /* z array to be plotted                         */ \\int     *$mpoints$;    /* number of points in the x direction            */ \\int     *$npoints$;    /* number of points in the y direction            */ \\int      $color$;      /* plot's color chosen from 0-9                   */\end{flushleft}This function adds a two-axis contour plot to the contour plot frame specified in the preceding call to $XGSet2DC$().  Note that only onecontour plot can be associated with each contour plot frame.$XGCont$() uses shared memory to acquire its data.  Once the pointers to thedata arrays have been passed to this function, the memory must not be movedor freed until program termination.\def\xlen{4in}\begin{minipage}{\xlen}\begin{flushright}\rule{\xlen}{.5pt}\end{flushright}\end{minipage}\begin{flushleft}$XGStructure$($numPoints$, $fillFlag$, $lineColor$, $fillColor$, $...$) \\int 		$numPoints$;	/* number of pairs of (x,y) coordinates */ \\STRUCT\_FILL 	$fillFlag$;	/* FILLED or HOLLOW */ \\int		$lineColor$;	/* color of the outline */ \\int		$fillColor$;	/* color of the inside */ \\SCALAR		$X1, Y1$;	/* first (x,y) pair */ \\... \\SCALAR		$Xn, Yn$;	/* $numPoints$'th (x,y) pair */\end{flushleft}This function, to be called after a call to either $XGSet2D$() or$XGSetVec$(), will set up a structured object with $numPoints$  points.  If thefirst point and the last point are equal, then the object will beclosed.  Note that this procedure can be called multiple times todefine disjoint structures.\newpage\begin{flushleft}$XGStructureArray$($numPoints$, $fillFlag$, $lineColor$, $fillColor$, $points$) \\int 		$numPoints$;	/* number of pairs of (x,y) coordinates */ \\STRUCT\_FILL 	$fillFlag$;	/* FILLED or HOLLOW */ \\int		$lineColor$;	/* color of the outline */ \\int		$fillColor$;	/* color of the inside */ \\SCALAR*		$points$;	/* array containing pairs of points, i.e., $[x_1,y_1,x_2,y_2,...,x_n,y_n]$. */\\This function is exactly like XGStructure except that you pass in an arrayof points instead of using a variable argument list.\end{flushleft}\def\xlen{4in}\begin{minipage}{\xlen}\begin{flushright}\rule{\xlen}{.5pt}\end{flushright}\end{minipage}\newpageAdditional functions provided by XGrafix are described below.\begin{flushleft}$XGSet2DFlag$ (), $XGSetVecFlag$ (), $XGSet3DFlag$ () and$XGSet2DCFlag$ ()\end{flushleft}These functions are identical to $XGSet2D$ (), $XGSetVec$ (),$XGSet3D$ () and $XGSet2DC$ () respectively with the exception thatthe ``Flag'' functions each have one additional parameter at the endof their parameter lists which is ``int *$openFlag$''.  This integerparameter is set to TRUE by XGrafix whenever the correspondingdiagnostic window is opened and set to FALSE when it is closed.\begin{flushleft}$SetUpNewVar$($spvar$, $spname$, $type$) \\SCALAR  *$spvar$;	/* pointer to variable to be modified  */ \\char   *$spname$;	/* name to associate with variable     */ \\char   *$type$;		/* ``double'', ``float'', ``integer'', or ``char'' */\end{flushleft}This function, to be called before $XGStart$(), sets up a variable to be modifiable during runtime.  The parameter $spvar$ should be a pointer to the variable.  $spname$ is used to describe the variable, i.e. ``phase shift'' and $type$ specifies the type of variable.\begin{flushleft}$XGRead$($ptr$, $size$, $nitems$, $stream$, $type$) \\char *$ptr$, *$type$; \\FILE *$stream$;       \\int $size$, $nitems$;\end{flushleft}The $XGRead$() function provides a platform-independent version of the standard C library fread function.  The parameters are identical to the thoseof $fread$(); refer to your C library reference for details.  This functionmakes any binary data file transportable to machines regardless of the nativebyte ordering on the machine.  The parameter $type$ is only used onUNICOS machines and takes the values ``char'', ``int'', or ``float''\newpage\begin{flushleft}$XGWrite$($ptr$, $size$, $nitems$, $stream$, $type$) \\char *$ptr$, *$type$;  \\FILE *$stream$;        \\int $size$, $nitems$;\end{flushleft}The $XGWrite$() function provides a platform-independent version of the standard C library fwrite function.  The parameters are identical to the thoseof $fwrite$(); refer to your C library reference for details.  This functionmakes any binary data file transportable to machines regardless of the nativebyte ordering on the machine.The parameter $type$ is only used onUNICOS machines and takes the values ``char'', ``int'', or ``float''\begin{flushleft}void $Dump$($filename$) \\char *$filename$;\end{flushleft}$Dump$() provides a callback for the application to specify how to savethe state of the simulation.  This function is supplied by the application, and is called when the OK button is pushed within the dump dialog box.  Theparameter $filename$ contains the name of the file input in the dump dialog box.The application can provide code to write the desired data to the file.  Note that any operation can be performed in $Dump$() that returns controlto XGrafix.  For binary file operations, use of $XGRead$() and $XGWrite$() are recommended for platform independent data files.\begin{flushleft}void $Quit$()\end{flushleft}The $Quit$() function is called when the user selects the Quit button at runtime.  The function must be supplied by the application, and can performan operation required just before exit, such as saving data, etc.\begin{flushleft}int $C\_KillGraphicsProc$()\end{flushleft}The $C\_KillGraphicsProc$() terminates the X display components of asimulation leaving the program to iterate the XGMainLoop withoutdisplaying the control panel or any diagnostic windows.  The functionis executed by choosing the ``Kill X'' option from the ``Quit'' menuor sending the program a ``USR1'' signal with the ``kill'' command.The X display may be reactivated by sending the program another``USR1'' signal.  In order to restore the X frontend, a file named``.xgdisplay'' in the users \$HOME directory containing a display name(i.e. my\_machine.universtiy.edu:0) to which the windows will be sentmust exist.  Of course this machine must give permision for thehost machine to display X there.{\bf Warning:} This routine isextremely volatile.  It should not be used without first saving thestate of the simulation.  Also it is not currently supported in XOOPIC.\def\xlen{4in}\begin{minipage}{\xlen}\begin{flushright}\rule{\xlen}{.5pt}\end{flushright}\end{minipage}Key bindings are built into XGrafix to facilitate usage.  In all dialog boxes,the {\bf UP ARROW} and {\bf DOWN ARROW} can be used to maneuver between options.  {\bf TAB} will invoke the $Apply$ button (if one exists),{\bf RETURN} will invoke the $Ok$ button, {\bf SPACE} will select an On/Off button, and {\bf ESCAPE} will invoke the$Cancel$ button.  In the $Diagnostics$ dialog box, {\bf TAB} will starta search based on the contents of the entry, {\bf ENTER} will invoke the$Ok$ button, and the {\bf UP ARROW}, {\bf DOWN ARROW}, {\bf PAGE UP}, and{\bf PAGE DOWN} keys can be used to scroll the listbox.\end{document}

⌨️ 快捷键说明

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