# # Few simple test of disjoint booleans. # # # The inner sphere is disjoint to begin with; # S1 = sphere( vector( 0, 0, 0 ), 1 ) ^ -sphere( vector( 0, 0, 0 ), 0.7 ); C1 = cylin( vector( 0, 0, 0.8 ), vector( 0, 0, 1 ), 0.2, 3 ); C2 = cylin( vector( 0, -2, 0 ), vector( 0, 4, 0 ), 0.5, 3 ); B1 = S1 + C1 + C1 * rx( 180 ); B2 = B1 - C2; interact( B2 ); save( "disjnt1", B2 ); # # The inner sphere is disjoint to begin with; # S1 = box( vector( -0.05, -0.1, -0.25 ), 0.1, 0.2, 0.5 ); S2 = ( S1 * tx( -1 ) ) ^ ( S1 * tx( -0.5 ) ) ^ ( S1 * tx( 0 ) ) ^ ( S1 * tx( 0.5 ) ) ^ ( S1 * tx( 1 ) ); C1 = cylin( vector( 0, 0, 0 ), vector( 0.5, 0, 0 ), 0.06, 3 ); B1 = S2 + C1 * tz( -0.15 ) * tx( 0.5 ) + C1 * tz( 0.15 ) + C1 * tz( -0.15 ) * tx( -0.5 ) + C1 * tz( 0.15 ) * tx( -1.0 ); B2 = B1 + C1 * tx( -1.5 ) + C1 * tx( 1.0 ); interact( B2 ); save( "disjnt2", B2 ); # # The inner sphere is disjoint to begin with; # S1 = sphere( vector( 0, 0, 0 ), 0.4 ); S2 = ( S1 * tx( -2 ) ) ^ ( S1 * tx( -1 ) ) ^ ( S1 * tx( 0 ) ) ^ ( S1 * tx( 1 ) ) ^ ( S1 * tx( 2 ) ); C1 = cylin( vector( 0, 0, -2 ), vector( 0, 0, 4 ), 0.2, 3 ); B1 = S2 - C1 * tx( -2 ) - C1 * tx( -1 ) - C1 * tx( 0 ) - C1 * tx( 1 ) - C1 * tx( 2 ); interact( B1 ); save( "disjnt3", B1 ); ############################################################################# free( S1 ); free( S2 ); free( C1 ); free( C2 ); free( B1 ); free( B2 );