### Irit2Dxf Example Usage Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index An example of how to use the Irit2Dxf command-line filter to convert an IRIT file to DXF format. This example shows how to print version information, apply translation, set polygonal approximation, force four polygons per flat region, and specify the output file name and input file. ```bash irit2dxf -z -t 1 2 3 -F 0 20 -4 -o file.dxf file.itd ``` -------------------------------- ### Create a String Object - Example Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index This example shows how to represent a 'STRING' object. It demonstrates the basic syntax for including textual data within the geometric model. ```CAD Data Format [OBJECT STR_OBJ [STRING "string"] ] ``` -------------------------------- ### Basic Irit2Ps Conversion Example Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index This example shows the most basic usage of the 'irit2ps' command, converting a geometry file named 'solid1.itd' to a PostScript file named 'solid1.ps'. This demonstrates the default conversion process. ```bash irit2ps solid1.itd > solid1.ps ``` -------------------------------- ### NCPCKTPATH Example Usage Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Example demonstrating the usage of NCPCKTPATH to generate a tool path for pocket machining. It shows how to define parameters, set attributes, and save the resulting tool path to a file. ```Pseudocode TPath = NCPcktPath( Crv, 0.05, 0.06, 0.02, 0.05, 0, true ); attrib( TPath, "NCRetractZLevel", 1.0 ); attrib( TPath, "NCMaxXYBridgeGap", 0.05 ); save( "TPath.nc", TPath ); ``` -------------------------------- ### IZebra Usage Example: Utah Teapot Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Provides an example of using IZebra to generate striped illustrations of the Utah Teapot. Similar to the pawn example, it pipes output to irit2ps for PostScript generation and highlights parameters like Z-buffer size, B-spline mesh size, stripe angle, and Z scale. ```bash izebra -m -Z 500 -B 200 -I 10 -F 0 100 -A -90 -S 0.4 teapot.itd | irit2ps -f 0 200 -u -B -0.55 -0.35 0.55 0.35 -W 0.007 -I 0:150 - > teapot.ps ``` -------------------------------- ### Irit23mf Example Usage Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index An example of how to use the Irit23mf command-line filter to convert an IRIT file to 3MF format. This example demonstrates enabling warnings, specifying input and output files, setting polygonal approximation, and adding designer information. ```bash Irit23mf -w -i mdl_sd2a.itd -F 0.01 -d "John Doe" ``` -------------------------------- ### Example: Creating and Displaying Multiple Teapot Instances Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index An example demonstrating the creation of three 'Teapot' instances, each translated 10 units apart along the X-axis using the tx() transformation. The 'viewobj' function is then used to display the original 'Teapot' along with the three created instances. ```Scripting Tea1 = INSTANCE( "Teapot", tx( 10 ) ); Tea2 = INSTANCE( "Teapot", tx( 20 ) ); Tea3 = INSTANCE( "Teapot", tx( 30 ) ); viewobj( list( Teapot, Tea1, Tea2, Tea3 ) ); ``` -------------------------------- ### MZERO Example Usage Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Example demonstrating the usage of MZERO to find the simultaneous zeros of three multivariate functions (MV1, MV2, MV3) with no specific constraints, a subdivision tolerance of 0.01, and a negative numerical tolerance for purging un-improved points. ```Pseudocode ZeroMVs = MZERO( list( MV1, MV2, MV3 ), nil(), 0.01, -1e-6 ); ``` -------------------------------- ### Irit2Wrl Usage Example Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index An example of how to use the Irit2Wrl tool to convert an IRIT data file to a Geom View OFF data file. ```bash Irit2Wrl -m -o file.off file.itd ``` -------------------------------- ### Create a Point Object - Example Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index This example shows the creation of a 'POINT' object with X, Y, and Z coordinates. It's a fundamental geometric primitive within the data structure. ```CAD Data Format [OBJECT A_POINT [POINT 1 2 3] ] ``` -------------------------------- ### xglmdrvs Command-Line Examples Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Demonstrates various ways to invoke the xglmdrvs command for displaying 3D models. These examples cover options for printing all settings, rendering models with specific attributes like backface culling and line width, applying shading, controlling isoline density and background color, and executing animations with specified frame rates and output formats. ```bash xglmdrvs -z ``` ```bash xglmdrvs -B -i -l 3 solid1.itd ``` ```bash xglmdrvs -r -A flat wiggle.itd ``` ```bash xglmdrvs -I 40 -u -b 255 255 255 wiggle.itd ``` ```bash xglmdrvs -X 0,2,0.1,sx -r anim.itd ``` -------------------------------- ### TextLayShp Example: 3D Text Synthesis Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index An example demonstrating the use of TextLayShp to create a large string of 3D text. It first defines a heart shape using cbspline and then uses TextLayShp to generate the text geometry, incorporating spacing, size, and output type parameters. This example highlights the function's ability to handle complex text arrangements and formatting. ```text Heart = cbspline( 4, list( ctlpt( E2, 0, 0.6 ), ctlpt( E2, 0.2, 1 ), ctlpt( E2, 1, 1 ), ctlpt( E1, 1.2 ), ctlpt( E2, 0.8, -0.6 ), ctlpt( E2, 0, -1 ), ctlpt( E2, 0, -1 ), ctlpt( E2, -0.8, -0.6 ), ctlpt( E1, -1.2 ), ctlpt( E2, -1, 1 ), ctlpt( E2, -0.2, 1 ), ctlpt( E2, 0, 0.6 ) ), list( kv_open ) ) * sc( 10 ); Str = "This is a test example of some 3D text. "; text = TextLayShp( Str + Str + Str + Str + Str + Str + Str + Str, "Courier New", 2, 0.67, list( 35, 10, 34 ), 0.001, 0, list( 0.01, 0.5 ), 3, 1, Heart ); ``` -------------------------------- ### NCCNTRPATH Example Usage Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Example demonstrating the usage of NCCNTRPATH to generate a tool path from a loaded teapot geometry. It shows how to set attributes and save the generated NC path to a file. ```Pseudocode Tea = load( "teapot" ); NCPath = NCCntrPath( Tea, 1/4, 0.0, 1/8, 0 ); attrib( NCPath, "NCRetractZLevel", 3.5 ); attrib( NCPath, "NCMaxXYBridgeGap", 0.25 ); save( "NCPath.nc", NCPath ); ``` -------------------------------- ### Create a Number Object - Example Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index This example demonstrates creating a simple 'NUMBER' object within a 'REAL_NUM' object. It shows how basic data types are encapsulated in the geometric data format. ```CAD Data Format [OBJECT REAL_NUM [NUMBER 4] ] ``` -------------------------------- ### Convert IRIT to XFIG Example (irit2xfg) Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Example usage of the irit2xfg command to convert IRIT data to XFIG format. It demonstrates the use of options for talkative mode and curve approximation, as well as how to redirect output to a file. It also shows how to incorporate a viewing matrix created by another device. ```shell irit2Xfg -T -f 0 16 saddle.itd > saddle.xfg ``` ```shell x11drvs b58.itd irit2Xfg -T -f 0 16 b58.itd irit.imd > saddle.xfg ``` -------------------------------- ### TextGeom Example: Horizontal and Vertical Text Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Provides examples of using TextGeom to create both horizontal and vertical text geometries. The first example creates horizontal text 'Text' with a specified spacing, and the second creates vertical text 'IRIT'. Both examples demonstrate setting the Spacing vector and the Scaling factor to control the appearance of the text. ```text a = TEXTGEOM("Text", vector( 0.12, 0, 0 ), 0.1 ); b = TEXTGEOM("IRIT", vector( 0, -0.12, 0 ), 0.1 ); ``` -------------------------------- ### Example: Creating Circle, Ellipse, and Parabola Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Demonstrates the first form of CONICSEC to construct a circle, an ellipse, and a parabola. Coefficients, Z-level, and start/end points (or 'off' for unlimited) are provided to define these conic sections. ```text Circ2 = CONICSEC( list( 1, 0, 1, 0, -0.5, -1 ), 0.0, point( 1.0, 0.0, 0.0 ) * ty( 0.25 ), point( -0.707, -0.707, 0.0 ) * ty( 0.25 ) ); Elp1 = CONICSEC( list( 1, 2, 4, 0.5, 2, -0.2 ), 0.0, off, off ); Prb1 = CONICSEC( list( 0.1, 0, 0, 0, 1, -1 ), 2, off, off ) * sc( 0.1 ); ``` -------------------------------- ### SWPSCLTV Function Example Usage Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Example demonstrating the usage of the SWPSCLTV function with different parameter combinations. It includes creating cross-section surfaces, a scaling curve, an axis curve, and a frame curve, then calling SWPSCLTV to generate swept surfaces with varying scaling and frame settings. ```csharp cross = ruledSrf( 0, arc( vector( 0.2, 0.0, 0.0 ), vector( 0.2, 0.2, 0.0 ), vector( 0.0, 0.2, 0.0 ) ) + arc( vector( 0.0, 0.3, 0.0 ), vector( 0.2, 0.3, 0.0 ), vector( 0.2, 0.5, 0.0 ) ), arc( vector( 0.8, 0.0, 0.0 ), vector( 0.8, 0.2, 0.0 ), vector( 1.0, 0.2, 0.0 ) ) + arc( vector( 1.0, 0.3, 0.0 ), vector( 0.8, 0.3, 0.0 ), vector( 0.8, 0.5, 0.0 ) ) ); scaleCrv = cbspline( 3, list( ctlpt( E2, 0.05, 1.0 ), ctlpt( E2, 0.1, 0.0 ), ctlpt( E2, 0.2, 2.0 ), ctlpt( E2, 0.3, 0.0 ), ctlpt( E2, 0.4, 2.0 ), ctlpt( E2, 0.5, 0.0 ), ctlpt( E2, 0.6, 2.0 ), ctlpt( E2, 0.7, 0.0 ), ctlpt( E2, 0.8, 2.0 ), ctlpt( E2, 0.85, 1.0 ) ), list( KV_OPEN ) ); Axis = circle( vector( 0, 0, 0 ), 1 ); Frame = circle( vector( 0, 0, 0 ), 1 ) * rotx( 90 ) * trans( vector( 1.5, 0.0, 0.0 ) ); Tv1 = SWPSCLTV( Cross, Axis, scaleCrv, off, 0, 0 ); Tv2 = SWPSCLTV( Cross, Axis, scaleCrv, off, 2, 0 ); Tv3 = SWPSCLTV( Cross, Axis, 1.0, Frame, 0, 0 ); ``` -------------------------------- ### Extract Silhouettes from Surface (PPROPFTCH Example) Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Example demonstrating the extraction of silhouette curves from a surface using the PPROPFTCH function with an inclination angle of 90 degrees. Multiple viewing directions can be specified. ```C Pl1 = PPropFtch( Srf, 1, list( normalize( vector( 1, 1, 1 ) ), 90 ) ); Pl2 = PPropFtch( Srf, 1, list( normalize( vector( 1, -1, 1 ) ), 90 ) ); Pl3 = PPropFtch( Srf, 1, list( normalize( vector( 1, 0, 1 ) ), 90 ) ); ``` -------------------------------- ### TINTERP: Example Usage for Trivariate Interpolation Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index An example demonstrating the usage of the TINTERP function to create a quadratic by quadratic by linear trivariate 'tvi' that interpolates control points of a trivariate 'tv'. This example utilizes the 'tbspline' function to define the initial trivariate structure. ```C++ tv = tbspline( 3, 3, 2, list( list( list( ctlpt( E3, 0.1, 0.1, 0.0 ), ctlpt( E3, 0.2, 0.5, 1.1 ), ctlpt( E3, 0.3, 0.1, 2.2 ) ), list( ctlpt( E3, 0.4, 1.3, 0.5 ), ctlpt( E3, 0.5, 1.7, 1.7 ), ctlpt( E3, 0.6, 1.3, 2.9 ) ), list( ctlpt( E3, 0.7, 2.4, 0.5 ), ctlpt( E3, 0.8, 2.6, 1.4 ), ctlpt( E3, 0.9, 2.8, 2.3 ) ) ), list( list( ctlpt( E3, 1.1, 0.1, 0.5 ), ctlpt( E3, 1.3, 0.2, 1.7 ), ctlpt( E3, 1.5, 0.3, 2.9 ) ), list( ctlpt( E3, 1.7, 1.2, 0.0 ), ctlpt( E3, 1.9, 1.4, 1.2 ), ctlpt( E3, 1.2, 1.6, 2.4 ) ), list( ctlpt( E3, 1.4, 2.3, 0.9 ), ctlpt( E3, 1.6, 2.5, 1.7 ), ctlpt( E3, 1.8, 2.7, 2.5 ) ) ), list( list( ctlpt( E3, 2.8, 0.1, 0.4 ), ctlpt( E3, 2.6, 0.7, 1.3 ), ctlpt( E3, 2.4, 0.2, 2.2 ) ), list( ctlpt( E3, 2.2, 1.1, 0.4 ), ctlpt( E3, 2.9, 1.2, 1.5 ), ctlpt( E3, 2.7, 1.3, 2.6 ) ), list( ctlpt( E3, 2.5, 2.9, 0.7 ), ctlpt( E3, 2.3, 2.8, 1.7 ), ctlpt( E3, 2.1, 2.7, 2.7 ) ) ) ), list( list( KV_OPEN ), list( KV_OPEN ), list( KV_OPEN ) ) ); tvi = TINTERP( tv, 0, 0, 0, 0, 0, 0 ); ``` -------------------------------- ### Create a Control Point Object - Example Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index This example illustrates the definition of a 'CTLPT' (Control Point) object, specifying its type and coordinates. Control points are vital for defining curves and surfaces. ```CAD Data Format [OBJECT CTL_POINT [CTLPT E3 1 2 3] ] ``` -------------------------------- ### Create a Polygon Object with Color - Example Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index This example demonstrates creating a 'POLYGON' object, including a 'COLOR' attribute and plane definition. It defines the vertices of the polygon. ```CAD Data Format [OBJECT [COLOR 4] POLY1OBJ [POLYGON [PLANE 1 0 0 0.5] 4 [-0.5 0.5 0.5] [-0.5 -0.5 0.5] [-0.5 -0.5 -0.5] [-0.5 0.5 -0.5] ] [POLYGON [PLANE 0 -1 0 0.5] 4 [0.5 0.5 0.5] [-0.5 0.5 0.5] [-0.5 0.5 -0.5] [0.5 0.5 -0.5] ] ] ``` -------------------------------- ### IZebra Usage Example: Pawn Chess Piece Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Demonstrates how to use IZebra to create a striped illustration of a pawn chess piece. The output is piped to irit2ps for conversion to PostScript. This example showcases Z-buffer size, B-spline mesh size, polygonal fineness, stripe rotation, and Z scale factor. ```bash izebra -m -Z 500 -B 150 -I 10 -F 0 100 -A 140 -S 0.35 pawn.itd | irit2ps -f 0 300 -u -B -0.45 -0.75 0.65 0.75 -W 0.004 -I 0:250 - > pawn.ps ``` -------------------------------- ### Irit2Scn Basic Usage Example Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Demonstrates a basic usage of the irit2scn command to convert an Irit data file (b58.itd) into SCENE and geometry files with a low-resolution approximation. ```bash irit2scn -l -F 0 8 b58.itd ``` -------------------------------- ### Create a Bezier Surface Object - Example Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index This example defines a 'SURFACE' object of type BEZIER. It includes control points arranged in a grid, which are fundamental for defining Bezier surfaces. ```CAD Data Format [OBJECT [COLOR 2] SOMESRF [SURFACE BEZIER 3 3 E3 [0 0 0] [0.05 0.2 0.1] [0.1 0.05 0.2] [0.1 -0.2 0] [0.15 0.05 0.1] [0.2 -0.1 0.2] [0.2 0 0] [0.25 0.2 0.1] [0.3 0.05 0.2] ] ] ``` -------------------------------- ### Example: Bisector of Two Planar Curves (C++) Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index This example demonstrates computing the bisector of two planar Bezier curves using the CBISECTOR2D function. It defines two curves, computes their bisector, and then visualizes all three curves. ```C++ c1 = cbezier( list( ctlpt( E2, -0.5, -0.2 ), ctlpt( E2, 0.0, -0.2 ), ctlpt( E2, 0.6, 0.6 ) ) ); c2 = cbezier( list( ctlpt( E2, 0.3, -0.7 ), ctlpt( E2, -0.2, -0.7 ), ctlpt( E2, 0.7, 0.6 ) ) ); BisectCrvs = CBISECTOR2D( list( c1, c2 ), TRUE, 1, 0.01, true, false ); All = list( c1, c2, BisectCrvs ); interact( list( All, view_mat2d ) ); ``` -------------------------------- ### PSUBDIV Example for Catmull Clark Subdivision Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Example demonstrating the application of the Catmull Clark subdivision scheme to a polygonal model using the PSUBDIV function. The parameters specify Catmull Clark (0), 1 iteration, normal smoothing (1), and triangle conversion (1). ```C CatmulRomPl = PSUBDIV( Plgns, 0, 1, 1, 1, 0 ); ``` -------------------------------- ### PRISA Function Example for Surface Layout Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Example demonstrating the PRISA function to compute a layout of a wine glass surface. It generates both a flattened layout (wgl_prisa) and a 3D ruled surface approximation (wgl_ruled). ```C cross = cbspline( 3, list( ctlpt( E3, 0.7, 0.0, 0. ), ctlpt( E3, 0.7, 0.0, 0.06 ), ctlpt( E3, 0.1, 0.0, 0.1 ), ctlpt( E3, 0.1, 0.0, 0.6 ), ctlpt( E3, 0.6, 0.0, 0.6 ), ctlpt( E3, 0.8, 0.0, 0.8 ), ctlpt( E3, 0.8, 0.0, 1.4 ), ctlpt( E3, 0.6, 0.0, 1.6 ) ), list( KV_OPEN ) ); wglass = surfrev( cross ); wgl_ruled = PRISA( wglass, 6, -0.1, COL, vector( 0, 0.25, 0.0 ), false ); wgl_prisa = PRISA( wglass, 6, 0.1, COL, vector( 0, 0.25, 0.0 ), true ); ``` -------------------------------- ### IRIT Parser: Geometric Transformation Example Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index This example showcases a sequence of operations in the IRIT Solid Modeler to manipulate a variable 'V'. It includes trigonometric functions, vector operations, rotation, and dot product, demonstrating how expressions are evaluated and assigned. ```irit-parser V = sin( 45 * pi / 180.0 ); V = V * vector( 1, 2, 3 ); V = V * rotx( 90 ); V = V * V; ``` -------------------------------- ### Example: Bi-Arc Fitting with cbspline (C++) Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index This example demonstrates the usage of the CBIARCS function to compute bi-arcs for a curve defined using cbspline. It sets parameters for curve definition, tolerance, and maximum angle. ```C++ C1 = cbspline( 4, list( ctlpt( E3, -0.287, -0.286, 0 ), ctlpt( E2, 0.0272, -0.425 ), ctlpt( E2, 0.265, -0.0839 ), ctlpt( E2, 0.607, -0.165 ), ctlpt( E2, 0.832, -0.205 ), ctlpt( E2, 0.737, 0.042 ), ctlpt( E2, 0.357, 0.103 ), ctlpt( E2, 0.508, 0.298 ), ctlpt( E2, 0.814, 0.649 ), ctlpt( E2, 0.692, 0.775 ), ctlpt( E2, 0.411, 0.391 ), ctlpt( E2, 0.301, 0.315 ), ctlpt( E2, 0.625, 0.945 ), ctlpt( E2, 0.49, 1.03 ), ctlpt( E2, 0.369, 0.829 ), ctlpt( E2, 0.185, 0.384 ), ctlpt( E2, 0.194, 0.518 ), ctlpt( E2, 0.243, 1.09 ), ctlpt( E2, 0.0653, 1.13 ), ctlpt( E2, 0.0644, 0.381 ), ctlpt( E2, 0.00925, 0.496 ), ctlpt( E2, -0.0113, 0.943 ), ctlpt( E2, -0.202, 0.954 ), ctlpt( E2, -0.147, 0.644 ), ctlpt( E2, -0.162, 0.208 ), ctlpt( E2, -0.337, -0.156) ), list( kv_periodic ) ); C1 = coerce( C1, kv_open ); Arcs = CBIARCS( Crv, 0.01, 90 ); ``` -------------------------------- ### MICROVMSTRCT Usage Example Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index An example demonstrating the usage of the MICROVMSTRCT function. It initializes a VModel with two cylinders, assigns attributes to them, and then uses MICROVMSTRCT to generate microstructures for their union, with CylA having higher priority. ```c-- Iritstate( "PrimType", 4 ); CylA = cylin( vector( -0.5, 0, 0), vector( 1, 0, 0 ), 0.25, 3 ); CylB = coerce( CylA, vmodel_type ) * ry( 90 ) * sc( 1.1 ); FacePrm = list( 0.125, 0.0, 1.0, true, 0.2, nil() ); Tile = microtile( 1, list( FacePrm, FacePrm, FacePrm, FacePrm, FacePrm, FacePrm ) ); attrib( CylA, "MVMSInfo", list( Tile, list( 4, 4, 8 ), 1.0 ) ); attrib( CylB, "MVMSInfo", list( Tile, list( 4, 4, 8 ), 2.0 ) ); MICROVMSTRCT( 1, nil() ); MacroV = CylA + CylB; MS = MICROVMSTRCT( 2, list( MacroV, 0.3, 0.5, 0.1, 0, 0 ) ); ``` -------------------------------- ### Saving Objects to Compressed Files in IRIT Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Provides an example of how to save an object to a compressed file using the `save` command within the IRIT environment. This is essential for managing storage space and transfer times. ```irit save( "solid1.itd.Z", solid1 ); ``` -------------------------------- ### OS/2 Environment Variable Setup for IRIT Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Configuration for running IRIT on OS/2 requires specific environment variables to be set. These variables define paths, display drivers, and inter-process communication methods. ```batch set IRIT_PATH=c:\irit\bin\ set IRIT_DISPLAY=os2drvs -s- set IRIT_BIN_IPC=1 set IRIT_LOCALE=English set IRIT_PARALLEL=4 ``` -------------------------------- ### Windows Environment Variable Setup for IRIT Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Setting up IRIT on Windows platforms (95/98/NT/2000/XP/7/10) involves configuring environment variables similar to the Unix setup. These variables control display drivers, server communication, and parallel processing. ```batch set IRIT_PATH=c:\irit\bin\ set IRIT_DISPLAY=wntgdrvs -s- set IRIT_BIN_IPC=1 set IRIT_LOCALE=English set IRIT_PARALLEL=4 ``` -------------------------------- ### SWEEPTV Example Usage Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Demonstrates the usage of the SWEEPTV function to construct a generalized cylinder. The example shows creating a cross-section (rounded rectangle), defining an axis curve, refining it, and then using SWEEPTV with different frame orientation settings (OFF, fixed vector, and a control point curve). ```c++ cross = ruledSrf( 0, arc( vector( 0.2, 0.0, 0.0 ), vector( 0.2, 0.2, 0.0 ), vector( 0.0, 0.2, 0.0 ) ) + arc( vector( 0.0, 0.3, 0.0 ), vector( 0.2, 0.3, 0.0 ), vector( 0.2, 0.5, 0.0 ) ), arc( vector( 0.8, 0.0, 0.0 ), vector( 0.8, 0.2, 0.0 ), vector( 1.0, 0.2, 0.0 ) ) + arc( vector( 1.0, 0.3, 0.0 ), vector( 0.8, 0.3, 0.0 ), vector( 0.8, 0.5, 0.0 ) ) ); Axis = arc( vector( -1.0, 0.0, 0.0 ), vector( 0.0, 0.0, 0.1 ), vector( 1.0, 0.0, 0.0 ) ); Axis = crefine( Axis, FALSE, list( 0.25, 0.5, 0.75 ) ); TV1 = SWEEPTV( Cross, Axis, OFF ); TV2 = SWEEPTV( Cross, Axis, vector( 0.0, 1.0, 1.0 ) ); TV3 = SWEEPTV( Cross, Axis, cbezier( list( ctlpt( E3, 1.0, 0.0, 0.0 ), ctlpt( E3, 0.0, 1.0, 0.0 ), ctlpt( E3, -1.0, 0.0, 0.0 ) ) ) ); ``` -------------------------------- ### MRCHCUBE Example - Trivariate Iso Surface Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Example demonstrating the MRCHCUBE function for iso surface contouring of a trivariate function. This specific example contours the X-axis of 'ThreeCyls' and uses the trivariate for improved normal estimation. ```plaintext IsoSrf = MRCHCUBE( list( ThreeCyls, 1, 1, TRUE ), point( 1, 1, 1 ), 1, 0.12 ); ``` -------------------------------- ### Set Environment Variable for IRIT Path Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Sets the IRIT_PATH environment variable to specify the directory where the configuration file is searched. This is an example of how to configure the search path for IRIT. ```bash setenv IRIT_PATH /u/gershon/irit/bin/ ``` -------------------------------- ### lineshad Command Line Usage Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Demonstrates the basic command-line syntax for the lineshad tool, including common options and arguments. This serves as a reference for how to invoke the tool and its primary parameters. ```bash lineshad [-o OutName] [-m] [-F PolyOpti FineNess] [-R RelStepSize] [-f PolyOpti SampTol] [-r RndrMdl] [-c CosPwr] [-s SdrPwr] [-i Intensity] [-l Lx Ly Lz] [-v Vx Vy Vz] [-w Width] [-d Density] [-t SrfZTrans] [-S WidthScale] [-T Texture] [-Z ZbufSize] [-b] [-z] DFiles ``` -------------------------------- ### Set/Get Polygon Vertex Normal Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Provides a mechanism to set or get the normal of a specific vertex within a polygon. The 'Index' specifies the vertex, and 'Normal' is the new normal vector to set (or a placeholder if only querying). If 'Normal' is not a VectorType, only the current normal is returned. Examples show setting normals for the first two vertices of a triangle 'Tri'. ```Unknown PointType PNORMAL( PolyType Poly, NumericType Index, VectorType Normal ) ``` ```Unknown PNORMAL( Tri, 0, vector( 1, 0, 0 ) ); PNORMAL( Tri, 1, vector( 0, 1, 0 ) ); ``` -------------------------------- ### Irit2Ps Command Line Syntax Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index This displays the general syntax for the 'irit2ps' command, listing all available command-line options and their expected arguments. It serves as a reference for users to understand the full capabilities of the tool. ```bash irit2ps [-l] [-4] [-s Size] [-I #UIso[:#VIso[:#WIso]]] [-F PolyOpti FineNess] [-f PolyOpti SampTol] [-M] [-G] [-P] [-W LineWidth] [-w WidenLen WidenWidth] [-b R G B] [-B X1 Y1 X2 Y2] [-c] [-C] [-T] [-t AnimTime] [-N FontName] [-i] [-o OutName] [-d [Zmin Zmax]] [-D [Zmin Zmax]] [-p PtType PtSize] [-u] [-z] DFiles ``` -------------------------------- ### MRCHCUBE Example - Implicit Microstructure Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Example of using the MRCHCUBE function to march-cube an implicit microstructure. It first defines an implicit microstructure using 'microstrct' and then applies MRCHCUBE with specified volume and parameters. ```plaintext IMS = microstrct( WingRGB, 6, list( TV1, list( 1, 1, 1 ) ) ); MS = mrchcube( list( IMS, 1 ), point( 1.0, 1.0, 1.0 ), 1, 0.0 ); ``` -------------------------------- ### Attribute Setup for VModel Primitives Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Demonstrates how to set attributes for VModel primitives before they are used in Boolean operations. This includes defining the tiles to be used, repetition lists for U, V, and W directions, and a priority for each primitive. ```c-- attrib( Prim, "MVMSInfo", list( Tile, TileRepeatsList( { XList, X }, { YList, Y }, { ZList, Z } ), PrimPriority ); ``` -------------------------------- ### Create a Vector Object - Example Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index This example demonstrates how to define a 'VECTOR' object with its components. Vectors are essential for representing direction and magnitude in geometric modeling. ```CAD Data Format [OBJECT A_VECTOR [VECTOR 1 2 3] ] ``` -------------------------------- ### Ray Trace a Scene with POVRAY Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Demonstrates how to initiate a ray tracing process using POVRAY with a generated .pov file. The -Q0 flag sets the quality, and +Ib58 specifies the input base file name. ```bash POVRAY -Q0 +Ib58 ``` -------------------------------- ### Create a Unit Matrix Object - Example Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index This example defines a 'MATRIX' object, specifically a unit matrix. Matrices are used for transformations in 3D graphics and geometric modeling. ```CAD Data Format [OBJECT UNIT_MAT [MATRIX 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 ] ] ``` -------------------------------- ### Unity Usage for .cs Files Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Instructions on how to use converted .cs files within Unity. Requires Unity installation and involves dragging .cs files and shaders into the Unity Assets folder. Accessed via a new 'GameObject -> IritLoad' menu item. -------------------------------- ### Irit2Ps Conversion with Customization Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index This example demonstrates advanced usage of 'irit2ps', converting a 'saddle.itd' file with specific output settings. It enables color output ('-c'), sets a line thickness of 0.01 inches ('-W 0.01'), and uses a polygon approximation fineness of 32 ('-f 0 32'). ```bash irit2ps -f 0 32 -c -W 0.01 saddle.itd > saddle.ps ``` -------------------------------- ### Aisoshad Command Line Usage Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Illustrates the general syntax and available options for the 'aisoshad' command-line tool. This includes input file specification and various flags for controlling output and processing behavior. ```bash aisoshad [-o OutName] [-m] [-i] [-F PolyOpti FineNess] [-f PolyOpti SampTol] [-r RndrMdl] [-c CosPwr] [-s SdrPwr] [-l Lx Ly Lz] [-R Random] [-d AdapDir] [-t SrfZTrans] [-M MinSubdiv] [-D AdapDist] [-w AdapIsoWidth] [-S WidthScale] [-W] [-u] [-Z ZbufSize] [-b] [-z] DFiles ``` -------------------------------- ### Display Current Configuration (ihidden) Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Displays the current configuration of the program as read from the configuration file 'ihidden.cfg'. This command is useful for verifying the active settings. ```bash ihidden -z ``` -------------------------------- ### IRIT HELP Command for Documentation Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index The HELP command provides access to the IRIT help system. It takes a string argument specifying the subject for which help is requested. Calling HELP with an empty string lists all available help subjects. ```irit HELP( StringType Subject ) ``` ```irit HELP(""); ``` -------------------------------- ### Create a BSpline Curve Object - Example Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index This example shows the definition of a 'CURVE' object using the BSPLINE type. It includes knot vector, degree, and control points, essential for curve generation. ```CAD Data Format [OBJECT [COLOR 63] ACURVE [CURVE BSPLINE 16 4 E2 [KV 0 0 0 0 1 1 1 2 3 4 5 6 7 8 9 10 11 11 11 11] [0.874 0] [0.899333 0.0253333] [0.924667 0.0506667] [0.95 0.076] [0.95 0.76] [0.304 1.52] [0.304 1.9] [0.494 2.09] [0.722 2.242] [0.722 2.318] [0.38 2.508] [0.418 2.698] [0.57 2.812] [0.57 3.42] [0.19 3.572] [0 3.572] ] ] ``` -------------------------------- ### MICROSLICE Function Example Usage Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index An example demonstrating the usage of the MICROSLICE function to compute slices for a two-level hierarchical microstructure. It specifies the number of levels, the Z-range, and detailed parameters for the microstructure generation at different recursion levels. ```VMSL S = MICROSLICE( 2, vector( 0.0001, 1.0002, 0.249 ), UnitTV, list( Cn, True, vector( 1, 2, 1 ), true, 0.5, false, 1.0, 3, false ), list( 0, list( Cn, True, vector( 1, 2, 1 ), true, 0.5, false, 1.0, 3, false ), 1, list( Boxes, True, vector( 2, 2, 2 ), true, 0.5, false, 1.0, 3, false ) ), list( 0.001, 0.0005, 1e-10, 0.02 ) ); ``` -------------------------------- ### Define Custom Light Sources Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index Configures custom light sources using the 'point' function and 'attrib'. Supports setting light type ('point_pos', 'point_infty'), color ('rgb'), shadow casting ('shadow'), and mirrored lights ('twolight'). Dependencies include the 'point' function and 'attrib' function. ```unspecified Light1 = point( 0, 0, 10 ); attrib( Light1, "light_source", on ); attrib( Light1, "shadow", on ); attrib( Light1, "rgb", "255,0,0" ); attrib( Light1, "type", "point_pos" ); Light2 = point( 1, 1, 1 ); attrib( Light2, "light_source", on ); attrib( Light2, "twolight", on ); attrib( Light2, "type", "point_infty" ); ``` -------------------------------- ### Setting Optional IRIT Environment Variables (Shell Example) Source: https://gershon.cs.technion.ac.il/irit/user_man.html/index This snippet illustrates the configuration of optional environment variables for IRIT, focusing on memory debugging and server/include path settings. These are particularly useful for developers or when troubleshooting memory-related issues. ```shell setenv IRIT_MALLOC 1 setenv IRIT_MALLOC_ID 1234567890 setenv IRIT_NO_SIGNALS 1 setenv IRIT_SERVER_HOST irit.cs.technion.ac.il setenv IRIT_INCLUDE "/d2/gershon/irit/irit/scripts;/tmp" ```