// Last edited on 2019-07-17 07:29:11 by stolfilocal // Processed by remove-cam-lights #include "colors.inc" #include "shapes.inc" #include "camlight.inc" #declare component_color = texture{ pigment { color rgb <0.12, 0.7, 0.9> } finish{ diffuse 0.8 ambient 0.1 specular 0.4 roughness 0.5 } } #macro interpolate1(v0, v1, t0, t1, tt) #local rr = (tt-t0)/(t1-t0); #local ss = 1 - rr; #local vv = ss * v0 + rr * v1; vv #end #macro interpolate3(A, B, C, D, t0, t1, tt) #local AB = interpolate1(A, B, t0, t1, tt); #local BC = interpolate1(B, C, t0, t1, tt); #local CD = interpolate1(C, D, t0, t1, tt); #local ABC = interpolate1(AB, BC, t0, t1, tt); #local BCD = interpolate1(BC, CD, t0, t1, tt); #local ABCD = interpolate1(ABC, BCD, t0, t1, tt); ABCD #end #macro interpolate1_matrix(matrix1, matrix2, matrix_size, c0, c1, cc) #local mr = array[matrix_size][4]; #for (i, 0, matrix_size-1, 1) #for (j, 0, 3, 1) #declare mr[i][j] = interpolate1(matrix1[i][j], matrix2[i][j], c0, c1, cc); #end #end mr #end #macro Arc(points_per_arc, A, B, C, D) #for (tt, 0.0, 1.0, (1 / points_per_arc) ) sphere { interpolate3(A, B, C, D, 0.0, 1.0, tt), 0.1 texture { component_color } } #end #end #macro Noh(P_matrix, size_P_matrix, points_per_arc) #for (i, 0, size_P_matrix-1, 1) #declare end1 = (P_matrix[i][2] + P_matrix[mod(i+1, size_P_matrix)][1]) / 2; #if (i = 0) #declare begin1 = (P_matrix[i][1] + P_matrix[size_P_matrix-1][2]) / 2; #else #declare begin1 = (P_matrix[i][1] + P_matrix[i-1][2]) / 2; #end Arc(points_per_arc, begin1, P_matrix[i][1], P_matrix[i][2], end1) #end #end #declare KEYFRAMES_SIZE = 6; #declare keyframes = array[KEYFRAMES_SIZE]; #declare keyframes[0] = 0.0; #declare keyframes[1] = 0.2; #declare keyframes[2] = 0.4; #declare keyframes[3] = 0.6; #declare keyframes[4] = 0.8; #declare keyframes[5] = 1.0; #declare ARC_SEGMENTS_SIZE = 7; #declare arcs = array[KEYFRAMES_SIZE]; #declare arcs[0] = array[ARC_SEGMENTS_SIZE][4]; #declare arcs[1] = array[ARC_SEGMENTS_SIZE][4]; #declare arcs[2] = array[ARC_SEGMENTS_SIZE][4]; #declare arcs[3] = array[ARC_SEGMENTS_SIZE][4]; #declare arcs[4] = array[ARC_SEGMENTS_SIZE][4]; #declare arcs[5] = array[ARC_SEGMENTS_SIZE][4]; #declare arcs[0][0][0] = <1, 1, 4>; #declare arcs[0][0][1] = <5, 2, 6>; #declare arcs[0][0][2] = <7, 3, 7>; #declare arcs[0][0][3] = <5, 4, 8>; #declare arcs[0][1][0] = <7, 4, 8>; #declare arcs[0][1][1] = <2, 5, 6>; #declare arcs[0][1][2] = <5, 8, 6>; #declare arcs[0][1][3] = <9, 8, 3>; #declare arcs[0][2][0] = <4, 6, 3>; #declare arcs[0][2][1] = <1, 5, 4>; #declare arcs[0][2][2] = <6, 4, 3>; #declare arcs[0][2][3] = <9, 5, 0>; #declare arcs[0][3][0] = <7, 5, 0>; #declare arcs[0][3][1] = <2, 3, 0>; #declare arcs[0][3][2] = <4, 3, 2>; #declare arcs[0][3][3] = <9, 8, 3>; #declare arcs[0][4][0] = <6, 5, 3>; #declare arcs[0][4][1] = <5, 8, 4>; #declare arcs[0][4][2] = <1, 5, 7>; #declare arcs[0][4][3] = <5, 4, 2>; #declare arcs[0][5][0] = <7, 5, 0>; #declare arcs[0][5][1] = <9, 1, 2>; #declare arcs[0][5][2] = <3, 7, 9>; #declare arcs[0][5][3] = <5, 7, 3>; #declare arcs[0][6][0] = <4, 2, 3>; #declare arcs[0][6][1] = <5, 5, 5>; #declare arcs[0][6][2] = <7, 2, 5>; #declare arcs[0][6][3] = <1, 1, 8>; #declare arcs[1][0][0] = <4, 6, 4>; #declare arcs[1][0][1] = <6, 4, 5>; #declare arcs[1][0][2] = <2, 2, 5>; #declare arcs[1][0][3] = <4, 3, 3>; #declare arcs[1][1][0] = <5, 2, 8>; #declare arcs[1][1][1] = <5, 5, 2>; #declare arcs[1][1][2] = <7, 9, 2>; #declare arcs[1][1][3] = <0, 1, 7>; #declare arcs[1][2][0] = <1, 3, 6>; #declare arcs[1][2][1] = <5, 6, 4>; #declare arcs[1][2][2] = <3, 2, 5>; #declare arcs[1][2][3] = <4, 7, 6>; #declare arcs[1][3][0] = <1, 4, 8>; #declare arcs[1][3][1] = <2, 2, 1>; #declare arcs[1][3][2] = <4, 4, 3>; #declare arcs[1][3][3] = <5, 1, 5>; #declare arcs[1][4][0] = <2, 1, 9>; #declare arcs[1][4][1] = <6, 3, 4>; #declare arcs[1][4][2] = <2, 3, 3>; #declare arcs[1][4][3] = <1, 1, 2>; #declare arcs[1][5][0] = <1, 7, 4>; #declare arcs[1][5][1] = <1, 4, 5>; #declare arcs[1][5][2] = <9, 6, 2>; #declare arcs[1][5][3] = <5, 2, 6>; #declare arcs[1][6][0] = <1, 1, 5>; #declare arcs[1][6][1] = <8, 8, 6>; #declare arcs[1][6][2] = <4, 4, 8>; #declare arcs[1][6][3] = <7, 5, 2>; #declare arcs[2][0][0] = <2, 7, 7>; #declare arcs[2][0][1] = <4, 5, 7>; #declare arcs[2][0][2] = <7, 6, 5>; #declare arcs[2][0][3] = <3, 0, 7>; #declare arcs[2][1][0] = <4, 9, 4>; #declare arcs[2][1][1] = <9, 7, 3>; #declare arcs[2][1][2] = <5, 1, 1>; #declare arcs[2][1][3] = <7, 7, 1>; #declare arcs[2][2][0] = <1, 5, 4>; #declare arcs[2][2][1] = <7, 5, 8>; #declare arcs[2][2][2] = <6, 8, 5>; #declare arcs[2][2][3] = <6, 4, 0>; #declare arcs[2][3][0] = <3, 3, 0>; #declare arcs[2][3][1] = <5, 7, 7>; #declare arcs[2][3][2] = <4, 8, 0>; #declare arcs[2][3][3] = <5, 9, 0>; #declare arcs[2][4][0] = <8, 4, 7>; #declare arcs[2][4][1] = <7, 5, 0>; #declare arcs[2][4][2] = <2, 2, 9>; #declare arcs[2][4][3] = <3, 5, 4>; #declare arcs[2][5][0] = <1, 4, 5>; #declare arcs[2][5][1] = <4, 0, 3>; #declare arcs[2][5][2] = <7, 1, 9>; #declare arcs[2][5][3] = <0, 5, 4>; #declare arcs[2][6][0] = <6, 2, 1>; #declare arcs[2][6][1] = <5, 2, 2>; #declare arcs[2][6][2] = <7, 5, 6>; #declare arcs[2][6][3] = <2, 1, 3>; #declare arcs[3][0][0] = <0, 0, 3>; #declare arcs[3][0][1] = <1, 2, 7>; #declare arcs[3][0][2] = <7, 3, 2>; #declare arcs[3][0][3] = <5, 2, 2>; #declare arcs[3][1][0] = <6, 4, 6>; #declare arcs[3][1][1] = <1, 0, 2>; #declare arcs[3][1][2] = <8, 8, 1>; #declare arcs[3][1][3] = <8, 9, 4>; #declare arcs[3][2][0] = <2, 4, 9>; #declare arcs[3][2][1] = <8, 1, 8>; #declare arcs[3][2][2] = <8, 2, 9>; #declare arcs[3][2][3] = <1, 5, 4>; #declare arcs[3][3][0] = <6, 2, 2>; #declare arcs[3][3][1] = <5, 2, 2>; #declare arcs[3][3][2] = <7, 5, 6>; #declare arcs[3][3][3] = <1, 0, 3>; #declare arcs[3][4][0] = <9, 9, 3>; #declare arcs[3][4][1] = <1, 6, 5>; #declare arcs[3][4][2] = <6, 4, 8>; #declare arcs[3][4][3] = <0, 8, 3>; #declare arcs[3][5][0] = <5, 4, 0>; #declare arcs[3][5][1] = <2, 2, 8>; #declare arcs[3][5][2] = <1, 1, 8>; #declare arcs[3][5][3] = <1, 2, 9>; #declare arcs[3][6][0] = <3, 4, 1>; #declare arcs[3][6][1] = <6, 7, 6>; #declare arcs[3][6][2] = <1, 2, 1>; #declare arcs[3][6][3] = <7, 9, 8>; #declare arcs[4][0][0] = <5, 7, 7>; #declare arcs[4][0][1] = <4, 7, 7>; #declare arcs[4][0][2] = <5, 8, 9>; #declare arcs[4][0][3] = <7, 1, 3>; #declare arcs[4][1][0] = <6, 7, 6>; #declare arcs[4][1][1] = <1, 4, 3>; #declare arcs[4][1][2] = <9, 2, 1>; #declare arcs[4][1][3] = <8, 1, 1>; #declare arcs[4][2][0] = <8, 2, 3>; #declare arcs[4][2][1] = <0, 4, 6>; #declare arcs[4][2][2] = <4, 8, 0>; #declare arcs[4][2][3] = <9, 4, 6>; #declare arcs[4][3][0] = <5, 1, 4>; #declare arcs[4][3][1] = <3, 0, 3>; #declare arcs[4][3][2] = <3, 0, 3>; #declare arcs[4][3][3] = <4, 1, 5>; #declare arcs[4][4][0] = <6, 4, 9>; #declare arcs[4][4][1] = <1, 9, 4>; #declare arcs[4][4][2] = <6, 5, 1>; #declare arcs[4][4][3] = <3, 9, 2>; #declare arcs[4][5][0] = <2, 9, 2>; #declare arcs[4][5][1] = <3, 0, 4>; #declare arcs[4][5][2] = <5, 3, 7>; #declare arcs[4][5][3] = <9, 7, 2>; #declare arcs[4][6][0] = <4, 3, 9>; #declare arcs[4][6][1] = <1, 0, 7>; #declare arcs[4][6][2] = <9, 9, 6>; #declare arcs[4][6][3] = <9, 0, 7>; #declare arcs[5][0][0] = arcs[0][0][0]; #declare arcs[5][0][1] = arcs[0][0][1]; #declare arcs[5][0][2] = arcs[0][0][2]; #declare arcs[5][0][3] = arcs[0][0][3]; #declare arcs[5][1][0] = arcs[0][1][0]; #declare arcs[5][1][1] = arcs[0][1][1]; #declare arcs[5][1][2] = arcs[0][1][2]; #declare arcs[5][1][3] = arcs[0][1][3]; #declare arcs[5][2][0] = arcs[0][2][0]; #declare arcs[5][2][1] = arcs[0][2][1]; #declare arcs[5][2][2] = arcs[0][2][2]; #declare arcs[5][2][3] = arcs[0][2][3]; #declare arcs[5][3][0] = arcs[0][3][0]; #declare arcs[5][3][1] = arcs[0][3][1]; #declare arcs[5][3][2] = arcs[0][3][2]; #declare arcs[5][3][3] = arcs[0][3][3]; #declare arcs[5][4][0] = arcs[0][4][0]; #declare arcs[5][4][1] = arcs[0][4][1]; #declare arcs[5][4][2] = arcs[0][4][2]; #declare arcs[5][4][3] = arcs[0][4][3]; #declare arcs[5][5][0] = arcs[0][5][0]; #declare arcs[5][5][1] = arcs[0][5][1]; #declare arcs[5][5][2] = arcs[0][5][2]; #declare arcs[5][5][3] = arcs[0][5][3]; #declare arcs[5][6][0] = arcs[0][6][0]; #declare arcs[5][6][1] = arcs[0][6][1]; #declare arcs[5][6][2] = arcs[0][6][2]; #declare arcs[5][6][3] = arcs[0][6][3]; #macro search_initial_keyframe(cc, n, kfs) #local fkf = 0; #for (kf, 1, n-1, 1) #if (kfs[kf-1] < cc & cc <= kfs[kf]) #declare fkf = kf - 1; #end #end fkf #end #declare initial_key_frame = search_initial_keyframe(clock, KEYFRAMES_SIZE, keyframes); #declare final_key_frame = initial_key_frame + 1; #declare noh_matrix = interpolate1_matrix( arcs[initial_key_frame], arcs[final_key_frame], ARC_SEGMENTS_SIZE, keyframes[initial_key_frame], keyframes[final_key_frame], clock ); background { color rgb <0.9, 0.9, 0.9> } Noh(noh_matrix, ARC_SEGMENTS_SIZE, 1000) #declare center = <0.00, 5.00, 5.00>; #declare scene_radius = 10.0; #declare camera_direction = <14.00, 5.00, 0.00>; #declare camera_distance = 5 * scene_radius; #declare light_intensity = 1.20; camlight(center, scene_radius, camera_direction, camera_distance, z, light_intensity)