// Last edited on 2019-07-15 23:22:02 by stolfilocal // Processed by remove-cam-lights #include "colors.inc" #include "shapes.inc" #declare component_color = texture { pigment { color rgb <1.0, 0.8, 0.2> } } #macro Circle(BeadCount, Radius, CenterX, CenterY, CenterZ) #local Theta = 0; #for (Bead, 1, BeadCount, 1) #local X = CenterX + Radius * cos(Theta); #local Y = CenterY + Radius * sin(Theta); #declare Theta = Theta + (2 * pi)/BeadCount; sphere { , 0.4 texture { component_color } } #end #end #macro Square(BeadCount, Side, CenterX, CenterY, CenterZ) #local X0 = CenterX - Side/2; #local Y0 = CenterY - Side/2; #local X1 = CenterX + Side/2; #local Y1 = CenterY + Side/2; #local BeadsPerSide = BeadCount / 4; #local X = X0; #local Y = Y0; #for (Bead, 1, BeadsPerSide, 1) sphere { , 0.4 texture { component_color } } #declare X = X + (X1 - X0)/BeadsPerSide; #end #declare X = X1; #declare Y = Y0; #for (Bead, 1, BeadsPerSide, 1) sphere { , 0.4 texture { component_color } } #declare Y = Y + (Y1 - Y0)/BeadsPerSide; #end #declare X = X1; #declare Y = Y1; #for (Bead, 1, BeadsPerSide, 1) sphere { , 0.4 texture { component_color } } #declare X = X - (X1 - X0)/BeadsPerSide; #end #declare X = X0; #declare Y = Y1; #for (Bead, 1, BeadsPerSide, 1) sphere { , 0.4 texture { component_color } } #declare Y = Y - (Y1 - Y0)/BeadsPerSide; #end #end background { color rgb <0.7, 0.7, 0.7> } Circle(100, 2.5, -4, -5.5, 0) Square(500, 3, 0, 0, 0) // Original camera parameters: // #local cam_ctr = <0,1,2> // #local cam_loc = <2,4,5> // #local cam_vec = (<2,4,5>-<0,1,2>) // #local cam_sky = y #include "camlight.inc" camlight(<10,1,12>, 6, <10,3,10>, 30, y, 1.2)