Example #1
0
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 ) ) )

irit.viewstate( "polyaprx", 0 )
irit.viewstate( "widthlines", 0 )

irit.free( locally )
irit.free( globally )
irit.free( globally2 )
Example #2
0
crv1 = irit.cbezier( irit.list( irit.ctlpt( irit.E2, (-0.5 ), 0 ), \
                                irit.ctlpt( irit.E2, (-0.5 ), 1.7 ), \
                                irit.ctlpt( irit.E2, 0.5, 1.7 ), \
                                irit.ctlpt( irit.E2, 0.5, 0 ) ) )
irit.color(crv1, irit.RED)
irit.attrib(crv1, "width", irit.GenRealObject(0.01))

arc1 = irit.cregion(circ, 0, 2)
irit.ffcompat(crv1, arc1)
irit.color(arc1, irit.GREEN)
irit.attrib(arc1, "width", irit.GenRealObject(0.01))

irit.interact(irit.list(crv1, arc1))

arc1match = irit.ffmatch( crv1, arc1, 50, 200, 2, 0,\
2 )

offsets1nomatch = irit.nil()
i = (-5)
while (i <= 5):
    irit.snoc(irit.symbsum(crv1, arc1 * irit.sc(i / 10.0)), offsets1nomatch)
    i = i + 1
irit.color(offsets1nomatch, irit.YELLOW)
all1a = irit.list(arc1, crv1, offsets1nomatch) * irit.sc(0.7) * irit.tx(
    (-0.8)) * irit.ty(0.5)

offsets1 = irit.nil()
i = (-5)
while (i <= 5):
    irit.snoc(irit.symbsum(crv1, arc1match * irit.sc(i / 10.0)), offsets1)
    i = i + 1
Example #3
0
irit.color(crv2, irit.GREEN)
irit.free(pc)

tan1 = irit.symbdiff(
    crv1 * irit.scale((0.6, 0.4, 1)) * irit.trans((0.7, 0.6, 0)), crv1)
tan2 = irit.pcircle((0, 0, 3), 0)

blend = irit.hermite(crv1, (-crv2), tan1 * irit.sc(1), (-tan2) * irit.sc(1))
irit.color(blend, irit.RED)
irit.attrib(blend, "width", irit.GenRealObject(0.02))

all = irit.list(blend, tsrf1, (-srf2))
irit.interact(all)
irit.save("blend1", all)

crv2a = irit.ffmatch( crv1, (-crv2 ), 5, 25, 2, 0,\
1 )

blend = irit.hermite(crv1, crv2a, tan1 * irit.sc(1), (-tan2) * irit.sc(1))
irit.free(crv1)
irit.free(crv2)
irit.free(crv2a)
irit.free(tan1)
irit.free(tan2)
irit.color(blend, irit.RED)
irit.attrib(blend, "width", irit.GenRealObject(0.02))

all = irit.list(blend, tsrf1, srf2)
irit.free(blend)
irit.free(tsrf1)
irit.free(srf2)
Example #4
0

cbody = irit.csurface( irit.coerce( body, irit.KV_OPEN ), irit.COL, 1 )

cbodyin = irit.cregion( cbody, 0.6, 1 )
irit.color( cbodyin, irit.RED )
irit.adwidth( cbodyin, 3 )
cbodyout = (-irit.cregion( cbody, 0, 0.6 ) )
irit.color( cbodyout, irit.GREEN )
irit.adwidth( cbodyout, 3 )

ruled1 = irit.ruledsrf( cbodyin, cbodyout )
irit.interact( irit.list( ruled1, cbodyout, cbodyin ) )
irit.save( "distmtc1", irit.list( ruled1, cbodyout, cbodyin ) )

cbodyin2 = irit.ffmatch( cbodyout, cbodyin, 30, 100, 2, 0,\
(-1 ) )
irit.color( cbodyin2, irit.RED )
irit.adwidth( cbodyin2, 3 )
ruled2 = irit.ruledsrf( cbodyin2, cbodyout )
irit.interact( irit.list( ruled2, cbodyout, cbodyin2 ) )
irit.save( "distmtc2", irit.list( ruled2, cbodyout, cbodyin2 ) )

cbodyin3 = irit.ffmatch( cbodyout, cbodyin, 30, 100, 2, 0,\
(-2 ) )
irit.color( cbodyin3, irit.RED )
irit.adwidth( cbodyin3, 3 )
ruled3 = irit.ruledsrf( cbodyin3, cbodyout )
irit.interact( irit.list( ruled3, cbodyout, cbodyin3 ) )
irit.save( "distmtc3", irit.list( ruled3, cbodyout, cbodyin3 ) )

cbodyin4 = irit.ffmatch( cbodyout, cbodyin, 30, 100, 2, 0,\
Example #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 )
irit.free( wave2 )
irit.free( wave2a )

# ###########################################################################