display(c1, pt, bisectsrf) a = a + 0.005 * speed # ############################################################################ # # A cubic # circ = irit.pcircle((0, 0, 0), 1) * irit.rz(90) * irit.ry((-90)) irit.ffcompat(c1, circ) pt = (0, 0, 0) a = 0 while (a <= 1): c1x = irit.cmorph(c1, circ, 0, a) bisectsrf = irit.cbisector3d(irit.list(c1x, pt), 0) display(c1x, pt, bisectsrf) a = a + 0.01 * speed a = 0 while (a <= 0.9): pt = (0, a, 0) bisectsrf = irit.cbisector3d(irit.list(circ, pt), 0) display(circ, pt, bisectsrf) a = a + 0.01 * speed a = 0.9 while (a <= 0): pt = (0.9 - a, a, 0) bisectsrf = irit.cbisector3d(irit.list(circ, pt), 0)
irit.viewobj( irit.GetViewMatrix() ) irit.SetViewMatrix( save_mat) # ############################################################################ crv1 = irit.cbezier( irit.list( irit.ctlpt( irit.E2, 0.3, 0 ), \ irit.ctlpt( irit.E2, 0, 0.5 ), \ irit.ctlpt( irit.E2, (-0.2 ), 0 ) ) ) crv1a = crv1 * irit.trans( ( (-0.4 ), 0, 0 ) ) crv1b = crv1a * irit.scale( ( (-1 ), 1, 1 ) ) irit.color( crv1a, irit.GREEN ) irit.color( crv1b, irit.GREEN ) irit.view( irit.list( crv1a, crv1b ), irit.ON ) i = 0 while ( i <= 300 ): c = irit.cmorph( crv1a, crv1b, 0, i/300.0 ) irit.color( c, irit.YELLOW ) irit.view( irit.list( crv1a, crv1b, c ), irit.ON ) i = i + 1 crvs = irit.cmorph( crv1a, crv1b, 2, 0.005 ) irit.snoc( crv1b, crvs ) i = 1 while ( i <= irit.SizeOf( crvs ) ): c = irit.nth( crvs, i ) irit.color( c, irit.YELLOW ) irit.view( irit.list( crv1a, crv1b, c ), irit.ON ) i = i + 1 crvs = irit.cmorph( crv1a, crv1b, 4, 0.005 ) irit.snoc( crv1b, crvs )
0.927536, 0.942029, 0.956522, 0.971014, 0.985507, 1,\ 1, 1 ) ) echosrc = irit.iritstate( "echosource", echosrc ) irit.free( echosrc ) irit.ffcompat( locally, globally ) irit.color( locally, irit.RED ) irit.color( globally, irit.GREEN ) irit.view( irit.list( locally, globally ), irit.ON ) bg_obj = irit.list( locally, globally ) i = 0 while ( i <= 300 * speed ): c = irit.cmorph( locally, globally, 0, i/(300.0 * speed) ) irit.color( c, irit.YELLOW ) irit.view( irit.list(c, bg_obj), irit.ON) i = i + 1 irit.save( "glocal1", irit.list( locally, globally, irit.cmorph( locally, globally, 0, 0.5 ) ) ) globally2 = irit.ffmatch( locally, globally, 20, 100, 2, 0, (-2 ) ) irit.ffcompat( locally, globally2 ) i = 0 while ( i <= 100 * speed ): c = irit.cmorph( locally, globally2, 0, i/(100.0 * speed) ) irit.color( c, irit.YELLOW ) irit.view( irit.list(c, bg_obj), irit.ON) i = i + 1 irit.save( "glocal2", irit.list( locally, globally, irit.cmorph( locally, globally2, 0, 0.5 ) ) )
a = a + 0.02 * speed # ############################################################################ # # A line and a circle # circ = irit.creparam(irit.pcircle((0, 0, 0), 1), 0, 1) * irit.rz( (-90)) * irit.ry(180) irit.ffcompat(c2, circ) a = 0 while (a <= 1): c1 = irit.cbezier( irit.list( irit.ctlpt( irit.E3, 0, 0, (-1 ) ), \ irit.ctlpt( irit.E3, 0, 0, 1 ) ) ) c2x = irit.cmorph(c2, circ, 0, a) bisectsrf = irit.cbisector3d(irit.list(c1, c2x), 1) display(c1, c2x, bisectsrf) a = a + 0.01 * speed # ############################################################################ # # A line and a circle (again) # circ = irit.creparam(irit.pcircle((0, 0, 0), 1), 0, 1) * irit.rz( (-90)) * irit.ry(180) a = 0 while (a <= 0.8): c1 = irit.cbezier( irit.list( irit.ctlpt( irit.E3, 0 + a, 0, (-1 ) ), \
irit.ctlpt( irit.E3, 1.1, 0.5, 0 ), \ irit.ctlpt( irit.E3, 1.15, 0.5, 0 ), \ irit.ctlpt( irit.E3, 1.15, 0, 0 ), \ irit.ctlpt( irit.E3, 1.15, (-0.5 ), 0 ), \ irit.ctlpt( irit.E3, 1.2, (-0.5 ), 0 ), \ irit.ctlpt( irit.E3, 1.2, 0, 0 ), \ irit.ctlpt( irit.E3, 1.3, 0, 0 ), \ irit.ctlpt( irit.E3, 1.4, 0, 0 ), \ irit.ctlpt( irit.E3, 1.5, 0, 0 ) ), irit.list( irit.KV_OPEN ) ) * irit.tx( (-0.75 ) ) irit.color( wave1, irit.RED ) irit.color( wave2, irit.GREEN ) irit.view( irit.list( wave1, wave2 ), irit.ON ) i = 0 while ( i <= 300 * speed ): c = irit.cmorph( wave1, wave2, 0, i/300.0 * speed ) irit.color( c, irit.YELLOW ) irit.view( irit.list( wave1, wave2, c ), irit.ON ) i = i + 1 wave2a = irit.ffmatch( wave1, wave2, 20, 100, 2, 0, 2 ) irit.ffcompat( wave1, wave2a ) irit.save( "cmorph21", irit.list( wave1, wave2, wave2a ) ) i = 0 while ( i <= 100 * speed ): c = irit.cmorph( wave1, wave2a, 0, i/100.0 * speed ) irit.color( c, irit.YELLOW ) irit.view( irit.list( wave1, wave2, c ), irit.ON ) i = i + 1 irit.free( wave1 )