//cmd: +w400 +h400 +am2 +a0.01 #version 3.7; #include "curve.inc" #global_settings{ assumed_gamma 1.0 } #default{ finish{ ambient 0.1 diffuse 0.9 emission 0}} //#declare vT = array[2]{0, 1} #declare vT = array[7]{0, 0.1, 0.5, 0.7, 0.8, 0.85, 1} #declare vC = array[7]{<0, 0, 0>, <0, 1, 0>, <1, 1, 0>, <1, 0, 0>, <1,-1,0>, <2,-1,0>, <2,0,0>} //#declare Lin = CIlinear(vT); //#declare Bez3 = CIbezier3(vC); //#declare Test = CIt(Lin, Bez3); #declare Test = CIt(CIlinear(vT), CIbezier3(vC)); //get the points on the curve #for(T, 0, 1, 0.015) sphere{CITget(Test, T), 0.02 pigment{rgb 1}} #end //control points sphere{Test[1][1][0] 0.03 pigment{rgb <1,0,0>}} #for(i, 1, dimension_size(Test[1][1],1) - 1) sphere{Test[1][1][i] 0.03 pigment{rgb <1,0,0>}} cylinder{Test[1][1][i-1], Test[1][1][i], 0.01 pigment{rgb <1,0,0>}} #end camera { perspective angle 60 location <1, 0, -2> right x*image_width/image_height look_at <1, 0, 0.0> } light_source{<0, 0,-3000> color rgb 1}