irit2ps [-l] [-4] [-s Size] [-I #UIso[:#VIso[:#WIso]]] [-F PolyOpti FineNess]
[-f PolyOpti SampPerCrv] [-M] [-G] [-P] [-W LineWidth]
[-w WidenLen WidenWidth] [-b R G B] [-B X1 Y1 X2 Y2] [-c] [-C]
[-T] [-i] [-o OutName] [-d [Zmin Zmax]] [-D [Zmin Zmax]]
[-p PtType PtSize] [-u] [-z] DFiles
-l: Linear - forces linear (degree two) surfaces to be approximated by a single polygon along their linear direction. Although most of the time, linear direction can be exactly represented using a single polygon, even a bilinear surface can have a free-form shape (saddle-like) that is not representable using a single polygon. Note that although this option will better emulate the surface shape, it will create unnecessary polygons in cases where one is enough. -4: Four - Generates four polygons per flat patch. Default is 2. -s Size: Controls the size of the postscript output in inches. Default is to fill the entire screen. -I #UIso[:#VIso[:#WIso]]: Specifies the number of isolines per surface/trivariate, per direction. If #VIso or #WIso is not specified, #UIso is used for #VIso etc. -F PolygonOpti FineNess: Optimality of polygonal approximation of surfaces. See the variable POLY_APPROX_OPT for the meaning of FineNess. See also -4. -f PolyOpti SampPerCrv: Controls the method used to approximate curves into polylines. If PolyOpti == 0, equally spaced intervals are used. Otherwise, an adaptive subdivision that optimizes the samples is employed. -M: Dumps the control mesh/polygon as well. -G: Dumps the curve/surface (as freeform geometry). Default. See -I, -C, -f for control on polyline approximation. -P: Dumps the curve/surface (as polygons). See -F, -l, -4 for control on polygonal approximation. -W #LineWidth: Sets the line drawing width in inches. Default is as thin as possible. This option will overwrite only those objects that do not have a "width" attribute. See also -d. If LineWidth is negative its absolute value is used to scale the current width of the object if has one, or the default width otherwise. -w WidenLen WidenWidth: If end points of polylines should be made wider, and if so to what width. -b R G B: Sets a colored background. RGB are three integers prescribing the Red, Green, and Blue coefficients. if no -c (i.e. a gray level drawing) this color is converted to a gray level using RGB to T.V. Y(IQ) channel conversion. -B X1 Y1 X2 Y2: Clips the drawing area outsize the bounding box from (X1, Y1) to (X2, Y2). -c: Creates a color postscript file. -C: Curve mode. Dumps freeform curves and surfaces as cubic Bezier curves. Higher order curves and surfaces and/or rationals are approximated by cubic Bezier curves. This option generates data files that are roughly a third of piecewise linear postscript files (by disabling this feature, -C-), but takes a longer time to compute. -T: Talkative mode. Prints processing information. -i: Internal edges (created by IRIT) - the default is not to display them, and this option will force displaying them as well. -o OutName: Name of output file. Default is stdout. -d [Zmin Zmax]: Sets the ratios between the depth cue and the width of the dumped data. See also -W, -p. Closer lines/points will be drawn wider/larger. Zmin and Zmax are optional. The object's bounding box is otherwise computed and used. -D [Zmin Zmax]: Same as -d, but depth cue the color or gray scale instead of width. You might need to consider the sorting option of the illustrt tool (-s of illustrt) for proper drawings. Only one of -d and -D can be used. -p PtType PtSize: Specifies the way points are drawn. PtType can be one of H, F, C for Hollow circle, Full Circle, or Cross. PtSize specifies the size of the point to be drawn, in inches. Vectors will also be drawn as points, but with an additional thin line to the origin. See also -d. -u: Forces a unit matrix transformation, i.e. no transformation. -z: Prints version number and current defaults.
Irit2Ps converts freeform surfaces and polygons into a postscript file.
Example:
irit2ps solid1.dat > solid1.ps
Surfaces are converted to polygons with fineness control:
irit2ps -f 0 32 -c -W 0.01 saddle.dat > saddle.ps
creates a postscript file for the saddle model, in color, and with lines 0.01 inch thick.
One can specify several attributes that affect the way the postscript file is generated. The attributes can be generated within IRIT. See also the ATTRIB IRIT command.
If a certain object should be thinner or thicker than the rest of the scene, one can set a "width" attribute which specifies the line width in inches of this specific object.
Example:
attrib( srf1, "width", 0.02 );
will force srf1 to have this width, instead of the default as set via the
If a (closed) object, a polygon for example, needs to be filled, a "fill" attribute should be set, with a value equal to the gray level desired.
Example:
attrib( poly, "fill", 0.5 );
will fill poly with %50 gray.
If an object, a polygon for example, needs to be painted in a gray level instead of black, a "gray" attribute should be set, with a value equal to the gray level desired.
Example:
attrib( poly, "gray", 0.5 );
will draw poly with %50 gray.
Dotted or dashed line effects can be created using a "dash" attribute which is a direct PostScript dash string. A simple form of this string is "[a b]" in which a is the drawing portion (black) in inches, followed by b inches of white space. See the postScript manual for more about the format of this string. Here is an example for a dotted-dash line.
attrib( poly, "dash", "[0.006 0.0015 0.001 0.0015] 0" );
Surface color is controlled (for color postscript only - see -c) in two levels. If the object has an RGB attribute, it is used. Otherwise, a color as set via the IRIT COLOR command is used.
Example:
attrib( Ball, "rgb", "255,0,0" );
An object can be drawn as ``tubes'' instead of full lines. The ratio between the inner and the outer radii of the tube is provided as the TUBULAR attribute:
attrib( final, "tubular", 0.7 );