//Output_File_Type=n Quality=12 +KI0.0 +KF1.0 +KFI1 +KFF100 //800x450 AA 0.3 // ABX Place and orient objects along spline // http://news.povray.org/povray.general/message/%3Cttoenucoq6fcgkun57la24s9ia4ij5o573%404ax.com%3E/#%3Cttoenucoq6fcgkun57la24s9ia4ij5o573%404ax.com%3E #version 3.7; #declare RAD = 4; global_settings { assumed_gamma 1 max_trace_level 5 subsurface {radiosity on samples 200,200} noise_generator 2 #if(RAD > 0) radiosity { pretrace_start 0.08 pretrace_end 0.04/RAD count 60*RAD nearest_count min (20, RAD) error_bound 2/RAD low_error_factor 0.5 recursion_limit 1 gray_threshold 0 minimum_reuse 0.015 brightness 1 adc_bailout 0.005 normal on media off always_sample off } #end } camera { angle 31*image_width/image_height*0.75 location < 0, 0, -2-16 > right x*image_width/image_height look_at < 0, 0.05, 0 > } sphere { 0, 10000 pigment { image_map { hdr "OpenfootageNET_Croatia_low_hdr" //download from https://www.openfootage.net/hdri-360-cres-croatia/ gamma 1 map_type 1 interpolate 2 } rotate y*120 } finish {emission 6*< 0.1882353, 0.2705882, 0.3294118 >} no_image } background { color rgb < 0.1882353, 0.2705882, 0.3294118 > } #include "colors.inc" #include "textures.inc" #include "finish.inc" #include "glass.inc" #include "metals.inc" #include "golds.inc" #include "transforms.inc" #include "shapes.inc" #include "strings.inc" #macro Time_To_Length_Converter (Spline, Min, Max, Accuracy) #local Conversion = function { spline { #local Last = Spline (Min); #local Length = 0; #local C = Min; #while (C <= Max) #local C = min (C, Max); #local Point = Spline (C); #local Length = Length+vlength (Point-(Last*1.0003)); #local Last = Point; C , < 1, 0, 0 >*Length #local C = C+Accuracy; #end } } function (T) { Conversion (T).x } #end #macro Spline_With_Linear_Movement (Spline, Min, Max, Accuracy) spline { #local Last = Spline(Min); #local Length = 0; #local C = Min; #while (C <= Max) #local C = min (C, Max); #local Point = Spline (C); #local Length = Length+vlength (Point-Last); #local Last = Point; Length, Point+<0,0,0> #local C = C+Accuracy; #end } #end ////////////////////////////////////////////////////////////////////////////////////// #declare rs = 0; #macro MySpline (rs) spline { cubic_spline #declare Max = 240; #declare c = 0; #while (c <= Max) #declare Vec1 = vrotate (<-0.125+31.25*c/Max, 1.5, rs>, y*360)+z*2; // rs randomizes the spline shape #declare Vec2 = vturbulence (1.2, 0.4, 3, Vec1-y*2)+Vec1; // play with this vturbulence factors to get different shape types -0.125+0.125*c, Vec2*3, #declare c = c+1; #end } #end //#declare MySplineLinear = Spline_With_Linear_Movement (MySpline (rs), 0, 15, 0.001); #declare f_MySplineLength = Time_To_Length_Converter (MySpline (rs), 0, 15, 0.001); #declare MySplineLength = f_MySplineLength (15); // Element --------------------------------------------------------------- #declare MyTextureCenter = texture { pigment { color rgb < 1.0000000,1.0000000, 1.0000000 > } finish { Glossy } } #declare MyTextureBrown = texture { pigment { bozo color_map { [ 0.00 color rgb < 0.3882353, 0.1882353, 0.05490196 > ] [ 0.10 color rgb < 0.3882353, 0.1882353, 0.05490196 > ] // [ 0.20 color rgb < 0.3882353, 0.1882353, 0.05490196 > ] // [ 0.25 color rgb < 0.0000000, 0.0000000, 0.0000000 > ] // [ 0.30 color rgb < 0.6196078, 0.4039216, 0.1882353 > ] [ 1.00 color rgb < 0.6196078, 0.4039216, 0.1882353 > ] } scale 0.025 } // normal { spotted 0.75 } normal { granite 0.15 } finish { Glossy } } #declare MyTextureBlack = texture { pigment { color rgb < 0.0000000,0.0000000, 0.0000000 > } normal { granite 0.55 } finish { Glossy } } #declare MyTextureRing = texture { pigment { color rgb < 1.0000000,1.0000000, 1.0000000 > } normal { granite 0.55 } finish { Glossy } } #declare MyRandomer = seed(now*24*60*60); #declare MyWay = rand(MyRandomer)*2; // positive or negative #declare MyY = rand(MyRandomer)*1; // Vertical Movement #declare MyAngle = 0; #declare Runde = 0; #declare MyAmount = 60; #declare Strength = 2.25; //(+ or -) strength of component's radiating density #declare Radius1 = 1.0; //(0 < Radius) outer sphere of influence on other components #declare MyObject = union { blob { threshold 0.8 // threshold (0.0 < threshold <= Strength) surface falloff threshold # #while (Runde < 5.0, MyY, 0.0 > 0.25, Strength scale <1.0, 0.5, 4.0 > rotate < 0.0, MyAngle, 0.0 > } #declare MyAngle = MyAngle+6; #declare Runde = Runde+1; #end // sturm } difference { blob { threshold 0.6 // threshold (0.0 < threshold <= Strength) surfacefalloff threshold # cylinder { < 0.0, -3.0, 0.0 > < 0.0, -2.5, 0.0 > 10.0, 1.0 scale <1.0, 0.5, 1.0 > } sphere { < 0.0, 0.0, 0.0 > 3.0, 0.5 scale < 1.0, 5.5, 1.0 > translate< 0.0, 2.0, 0.0 > } // } cylinder { < 0.0, -5.0, 0.0 > < 0.0, -0.5, 0.0 > 5.0 } } texture { onion texture_map { [ 0.00 MyTextureCenter ] // Center [ 0.30 MyTextureCenter ] [ 0.35 MyTextureCenter ] [ 0.50 MyTextureBrown ] [ 0.88 MyTextureBlack ] [ 0.90 MyTextureBlack ] [ 1.00 MyTextureRing ] // Outside } scale < 5.2, 6.5 5.2 > } scale 0.95*0.015 rotate x*180 } ////////////////////////////////////////////////////////////////////////////////////// #declare Step = MySplineLength*0.05/30; #declare All = union { #for (j, 0, 9, 1) #declare MySplineLinear = Spline_With_Linear_Movement (MySpline (j), 0, 15, 0.001); #declare Count = 0; #while (Count <= MySplineLength-Step) object { MyObject Spline_Trans (MySplineLinear, Count, y, 0.1, 0.1) translate z*j*0.3 } #declare Count = Count+Step; #end #end rotate x*90 rotate < 0.0, (clock*360)+52, 0.0 > } object { Center_Object (All, 1) translate z*5 }