// Felipe Marinho Tavares // R.A.: 265680 // Unicamp - MC937A/MO603A – Computação Gráfica - 2020-S2 - Jorge Stolfi // ====================================================================== // CORES E TEXTURAS background{ color rgb < 0.75, 0.80, 0.85 > } #declare brown_soft_149_111_82 = color rgb < 149/255, 111/255, 82/255 >; #declare tx_woodish = texture{ pigment{ brown_soft_149_111_82 } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_redish = texture{ pigment{ color rgb < 255/255, 0/255, 0/255 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } // ====================================================================== // DESCRI��O DA CENA #declare node_r = 0.3; #declare edge_size = 0.03; #declare ball = sphere{ < 0,0,0 >, node_r texture { tx_woodish } } #declare start_ball = sphere{ < 0,0,0 >, node_r texture { tx_redish } } #declare roll = seed(47); // random seed #declare starting_dist_x = 10; // half X distance box for initial infected #declare starting_dist_y = 10; // half Y distance box for initial infected #declare dist_x = 1; // half X distance from parent node #declare dist_y = 1; // half Y distance from parent node #macro arvore(P, S, A, B, T) // P: point coord // S: infection ratio // A: min time to infect // B: max time to infect // T: time limit, units in the Z axis union{ #if (P.z < T) #if (P.z = 0) object{start_ball translate