irit.ctlpt( irit.E3, 3.3, 1.5, 2 ), \ irit.ctlpt( irit.E3, 3, 2.1, 0 ) ), irit.list( \ irit.ctlpt( irit.E3, 4.1, 0, 1 ), \ irit.ctlpt( irit.E3, 4.3, 1, 0 ), \ irit.ctlpt( irit.E3, 4, 2, 1 ) ) ) cb = irit.cbezier(cbzr) * irit.scale((0.7, 1.4, 1)) irit.color(cb, irit.RED) sb = irit.sbezier(sbzr) irit.color(sb, irit.RED) irit.save( "bezier1", irit.list(irit.fforder(cb), irit.ffmsize(cb), irit.ffctlpts(cb), irit.fforder(sb), irit.ffmsize(sb), irit.ffctlpts(sb))) if (display == 1): irit.interact(irit.list(irit.GetAxes(), cb, sb)) irit.viewstate("dsrfmesh", 1) irit.pause() irit.viewstate("dsrfmesh", 0) irit.pause() # # Curve refinement (note the returned curve is a bspline curve). # cb_ref = irit.crefine(cb, 0, irit.list(0.25, 0.5, 0.75)) irit.color(cb_ref, irit.YELLOW) if (display == 1):
dlevel = irit.iritstate("dumplevel", dlevel) irit.free(dlevel) tv1t = tv1 * irit.rotx(50) * irit.trans((1.5, (-1.5), 2)) irit.color(tv1t, irit.RED) tv2t = tv2 * irit.sc(0.75) * irit.trans(((-1.5), 1.5, (-2))) irit.color(tv2t, irit.GREEN) irit.interact(irit.list(tv1, tv1t)) irit.interact(irit.list(tv2, tv2t)) irit.save( "trivar2a", irit.list( irit.list( tv1, tv1t ), \ irit.list( tv2, tv2t ) * irit.tx( 3 ), \ irit.list( irit.fforder( tv1 ), irit.ffctlpts( tv1 ), irit.ffmsize( tv1 ), \ irit.pdomain( tv1 ), irit.fforder( tv2 ), irit.ffmsize( tv2 ), \ irit.ffkntvec( tv2 ), irit.ffctlpts( tv2 ), irit.pdomain( tv2t ) ), \ irit.list( irit.tvolume( tv1, 1 ), irit.tvolume( tv1t, 1 ), \ irit.tvolume( tv2, 1 ), irit.tvolume( tv2t, 1 ) ) ) ) irit.free(tv1t) irit.free(tv2t) # # Point inclusion # irit.tpinclude(tv2, (0, 0, 0), 20) # Prep. aux data. pts = irit.nil()
irit.color(polylns, irit.MAGENTA) irit.interact(irit.list(b, polylns)) irit.free(polylns) be2 = irit.coerce(b, irit.E2) irit.color(b, irit.RED) p = irit.tseval(b, 1 / 3.0, 1 / 3.0, 1 / 3.0) n = irit.tsnormal(b, 1 / 3.0, 1 / 3.0, 1 / 3.0) nrml = (irit.coerce(p, irit.E3) + irit.coerce(irit.coerce(p, irit.POINT_TYPE) + n, irit.E3)) irit.save( "trisrf1", irit.list(b, be2, p, n, nrml, irit.fforder(b), irit.ffmsize(b), irit.ffctlpts(b), irit.pdomain(b), irit.tseval(b, 0, 0, 1), irit.tseval(b, 0, 1, 0), irit.tseval(b, 1, 0, 0), irit.tseval(b, 1 / 3.0, 1 / 3.0, 1 / 3.0), irit.tsnormal(b, 1 / 3.0, 1 / 3.0, 1 / 3.0))) irit.interact(irit.list(b, be2, nrml, p)) irit.free(b) irit.free(be2) c = irit.tsbezier( 4, irit.list( irit.ctlpt( irit.E3, 0, (-0.3 ), 0 ), \ irit.ctlpt( irit.E3, 0.2, (-0.5 ), (-0.2 ) ), \ irit.ctlpt( irit.E3, 0.6, (-0.3 ), 0.2 ), \ irit.ctlpt( irit.E3, 0.9, (-0.4 ), 0.1 ), \
def printctlmesh( ff ): mesh = irit.ffctlpts( ff ) dims = irit.ffmsize( ff ) irit.printf( " [\n", irit.nil( ) ) printctlmeshaux( mesh, 0, dims ) irit.printf( " ]\n", irit.nil( ) )
irit.ctlpt( irit.E3, 4.3, 1, 0 ), \ irit.ctlpt( irit.E3, 4, 2, 1 ) ) ) cb = irit.cbspline(3, cbsp, irit.list(0, 0, 0, 1, 1, 1)) * irit.scale( (0.7, 1.4, 1)) irit.free(cbsp) irit.color(cb, irit.RED) sb = irit.sbspline( 3, 3, sbsp, irit.list( irit.list( 1, 1, 1, 2, 2, 2 ),\ irit.list( 3, 3, 3, 4, 5, 6,\ 6, 6 ) ) ) irit.color(sb, irit.RED) irit.save( "bspline1", irit.list(irit.fforder(cb), irit.ffmsize(cb), irit.ffkntvec(cb), irit.ffctlpts(cb), irit.fforder(sb), irit.ffmsize(sb), irit.ffkntvec(sb), irit.ffctlpts(sb))) if (display == 1): irit.interact(irit.list(irit.GetAxes(), cb, sb)) irit.viewstate("dsrfmesh", 1) irit.pause() irit.viewstate("dsrfmesh", 0) irit.pause() # # Float end condition conversion to open end condition using subdivision. # sbsp = irit.list( irit.list( irit.ctlpt( irit.E3, 0.1, 0, 1 ), \ irit.ctlpt( irit.E3, 0.3, 1, 0 ), \ irit.ctlpt( irit.E3, 0, 2, 1 ) ), irit.list( \