//This is a pretty self explainatory macro. Sides is the number of sides //of the polygon. Length is the length of each side. Radius is the radius of the //spheres/cylinders. Texture is the texture you give the spheres and cylinders. #macro Connect(sides, length, radius, Texture) #local Sides = sides; #local Length = length; #local Theta = (2/Sides * pi); #local Angle = Theta; #local c = 0.0; #local X = 0.0; #local Y = 0.0; union { #while (c < Sides) #local Point = ; sphere { Point, radius texture{Texture} } #local c2 = 1.0; #local X2 = X; #local Y2 = Y; #local Angle2 = Angle; #while (c2 < Sides) #local c2 = c2 + 1; #local X2 = X2 + Length * sin(Angle2); #local Y2 = Y2 + Length * cos(Angle2); #local Angle2 = Angle2 + Theta; #local Point2 = ; cylinder { Point, Point2, radius texture{S_Red} } #end #local c = c + 1; #local X = X + Length * sin(Angle); #local Y = Y + Length * cos(Angle); #local Angle = Angle + Theta; #end } #end