tcrvs1 = irit.cbspline( 3, irit.list( irit.ctlpt( irit.E2, 0.3, 1.4 ), \ irit.ctlpt( irit.E2, 0.7, 1.4 ), \ irit.ctlpt( irit.E2, 0.7, 2.2 ), \ irit.ctlpt( irit.E2, 0.3, 2.2 ) ), irit.list( irit.KV_PERIODIC ) ) tcrvs2 = irit.cbspline( 3, irit.list( irit.ctlpt( irit.E2, 1.3, 1.4 ), \ irit.ctlpt( irit.E2, 1.7, 1.4 ), \ irit.ctlpt( irit.E2, 1.7, 2.2 ), \ irit.ctlpt( irit.E2, 1.3, 2.2 ) ), irit.list( irit.KV_PERIODIC ) ) tcrvs3 = irit.cbspline( 3, irit.list( irit.ctlpt( irit.E2, 0, 0 ), \ irit.ctlpt( irit.E2, 1, 0 ), \ irit.ctlpt( irit.E2, 2, 0 ), \ irit.ctlpt( irit.E2, 2, 2.9 ), \ irit.ctlpt( irit.E2, 1, 2.6 ), \ irit.ctlpt( irit.E2, 0, 2.9 ) ), irit.list( irit.KV_PERIODIC ) ) tsrf = irit.trimsrf(srf, irit.list(tcrvs3, tcrvs2, tcrvs1), 1) irit.free(srf) irit.free(tcrvs3) irit.free(tcrvs2) irit.free(tcrvs1) irit.attrib(tsrf, "rgb", irit.GenStrObject("200,255,100")) irit.view(tsrf, irit.ON) irit.save("facemask", tsrf) irit.pause() irit.free(tsrf)
pts = irit.saccess(pln, irit.GenRealObject(0), psphere, irit.GenRealObject(0), 0.1, 1e-005) spts = irit.nil() i = 1 while (i <= irit.SizeOf(pts)): pt = irit.nth(pts, i) err = irit.FetchRealObject(irit.getattr(pt, "rngerror")) if (err < 1e-005): irit.snoc( irit.point(irit.FetchRealObject(irit.coord(pt, 1)), irit.FetchRealObject(irit.coord(pt, 2)), 0), spts) i = i + 1 trimpln = irit.trimsrf( pln, irit.cnvrtpolytocrv(irit.pts2plln(spts, 0.1), 2, irit.KV_PERIODIC), 0) all = irit.list(psphere, trimpln) irit.save("saccess1t", all) irit.interact(all) # ############################################################################ # # Sphere surface - sphere check surface example. # possrf = psphere * irit.sc(2) pts = irit.saccess(possrf, irit.GenRealObject(0), psphere, irit.vector(1, 0, 0), 0.1, 1e-005)
irit.ctlpt( irit.E3, 0.7, 0, 0.06 ), \ irit.ctlpt( irit.E3, 0.1, 0, 0.1 ), \ irit.ctlpt( irit.E3, 0.1, 0, 0.6 ), \ irit.ctlpt( irit.E3, 0.6, 0, 0.6 ), \ irit.ctlpt( irit.E3, 0.8, 0, 0.8 ), \ irit.ctlpt( irit.E3, 0.8, 0, 1.4 ), \ irit.ctlpt( irit.E3, 0.6, 0, 1.6 ) ), irit.list( irit.KV_OPEN ) ), 0, 6 ) wglasssrf = irit.surfprev(cross * irit.scale((1.6, 1.6, 1.6))) circ1 = irit.pcircle((0, 0, 0), 0.4) circ2 = irit.pcircle((0, 0, 0), 0.2) wglass = irit.trimsrf( wglasssrf, irit.list(circ1 * irit.trans((0.5, 5, 0)), circ1 * irit.trans((1.5, 5, 0)), circ1 * irit.trans((2.5, 5, 0)), circ1 * irit.trans((3.5, 5, 0)), circ2 * irit.trans((0.5, 1, 0)), circ2 * irit.trans((1.5, 1, 0)), circ2 * irit.trans((2.5, 1, 0)), circ2 * irit.trans( (3.5, 1, 0))), 0) irit.color(wglass, irit.YELLOW) irit.interact(irit.list(view_mat3d, wglass)) wgl_prisa = irit.prisa(wglass, samppercrv, (-0.1), irit.COL, (0, 0.25, 0), 0) irit.color(wgl_prisa, irit.YELLOW) irit.interact(irit.list(view_mat3d, wgl_prisa)) irit.save("prisa5", irit.list(view_mat3d, wgl_prisa)) wgl_prisa = irit.prisa(wglass, samppercrv, 0.1, irit.COL, (0, 0.25, 0), 0) irit.interact(irit.list(view_mat2d, wgl_prisa))
# # Constructor using TrimSrf # tcrv1 = irit.cbspline( 2, irit.list( irit.ctlpt( irit.E2, 0.3, 0.3 ), \ irit.ctlpt( irit.E2, 0.7, 0.3 ), \ irit.ctlpt( irit.E2, 0.7, 0.7 ), \ irit.ctlpt( irit.E2, 0.3, 0.7 ), \ irit.ctlpt( irit.E2, 0.3, 0.3 ) ), irit.list( irit.KV_OPEN ) ) tcrv2 = irit.circle((0.5, 0.5, 0), 0.25) tcrv3 = irit.cbspline( 3, irit.list( irit.ctlpt( irit.E2, 0.3, 0.3 ), \ irit.ctlpt( irit.E2, 0.7, 0.3 ), \ irit.ctlpt( irit.E2, 0.7, 0.7 ), \ irit.ctlpt( irit.E2, 0.3, 0.7 ) ), irit.list( irit.KV_PERIODIC ) ) tsrf1a = irit.trimsrf(sb1, tcrv1, 0) irit.color(tsrf1a, irit.CYAN) irit.interact(tsrf1a) tsrf1b = irit.trimsrf(sb1, tcrv1, 1) * irit.tz(0.1) irit.color(tsrf1b, irit.GREEN) irit.interact(tsrf1b) tsrf1mesh = irit.list(irit.ffmesh(tsrf1a), irit.ffmesh(tsrf1b)) irit.color(tsrf1mesh, irit.YELLOW) irit.interact(irit.list(tsrf1a, tsrf1b, tsrf1mesh)) irit.save("trimsrf1", irit.list(tsrf1a, tsrf1b, tsrf1mesh)) irit.free(tsrf1mesh) tsrf2a = irit.trimsrf(sb1, tcrv2, 0)
irit.ctlpt( irit.E3, 2, 2, 0 ) ), irit.list( \ irit.ctlpt( irit.E3, 3.1, 0, 0 ), \ irit.ctlpt( irit.E3, 3.3, 1, 0 ), \ irit.ctlpt( irit.E3, 3, 2, 0 ) ) ) ) tcrv1 = irit.cbspline( 3, irit.list( irit.ctlpt( irit.E2, 0.5, 0.25 ), \ irit.ctlpt( irit.E2, 0.8, 0.25 ), \ irit.ctlpt( irit.E2, 0.8, 0.75 ), \ irit.ctlpt( irit.E2, 0.6, 0.75 ), \ irit.ctlpt( irit.E2, 0.6, 0.9 ), \ irit.ctlpt( irit.E2, 0.4, 0.9 ), \ irit.ctlpt( irit.E2, 0.4, 0.75 ), \ irit.ctlpt( irit.E2, 0.2, 0.75 ), \ irit.ctlpt( irit.E2, 0.2, 0.25 ), \ irit.ctlpt( irit.E2, 0.5, 0.25 ) ), irit.list( irit.KV_OPEN ) ) tsrf1 = irit.trimsrf(srf1, tcrv1, 0) irit.attrib(tsrf1, "resolution", irit.GenIntObject(2)) crv1 = irit.compose(srf1, tcrv1) irit.free(srf1) irit.free(tcrv1) irit.color(crv1, irit.GREEN) pc = irit.crefine(irit.pcircle(((-1.7), (-1), 1), 0.4), 0, irit.list(1, 2, 3)) srf2 = irit.ruledsrf( irit.ceditpt( irit.ceditpt( pc, irit.ctlpt( irit.E3, (-2.1 ), (-1 ), 1.2 ), 9 ), \ irit.ctlpt( irit.E3, (-1.3 ), (-1 ), 1.2 ), 3 ), pc * irit.tz( 1 ) ) * irit.rotz( (-90 ) ) * irit.trans( ( 2.7, (-0.7 ), 0 ) ) crv2 = irit.csurface(srf2, irit.ROW, 0) irit.color(crv2, irit.GREEN) irit.free(pc) tan1 = irit.symbdiff(