//gmesh18.pov //povray 3.6 scene file originated by Greg M. Johnson #include"transforms.inc" #declare RRR=seed(123); //in your presets #declare numsects=3;//number of defined sections as splines by you #declare startpts=9;//number of points defined for convenience at start //in your constructed object #declare numrings=58; // number of rings to be shaped along length. #declare npts=26;//number of points evaluated around ring #declare section=array[numsects+1] #declare ringo=array[numrings+1] #declare toppt=<-0,0,0>; #declare botpt=<0,0,0> ; #declare path=spline{ //linear_spline natural_spline 0,<1,0,1>,0.05,<1,0,0>,0.2,<1,4,0>,0.4,<2,8,0>,0.5,<0,9,0>,0.6,<-2,8,0>,0.8,<-1,4,0>,0.95,<-1,0,0>,1.00,<-1,0,1>} //0,<4,0,0>,0.25,<0,4,0>,0.5,<-4,0,0>,0.75,<0,-4,0>,1.0,<4,0,0>} //0,<0,0,4>,0.25,<0,4,0>,0.5,<0,0,-4>,0.75,<0,-4,0>,1.0,<0,0,4>} /*#declare n=0; #while(n<11) n/10, 3*(vnormalize(<0.5-rand(RRR),0,0.5-rand(RRR)>)+vnormalize(<0.5-rand(RRR),0.5-rand(RRR),0>)+vnormalize(<0,0.5-rand(RRR),0.5-rand(RRR)>)) #declare n=n+1; #end } */ #declare sectionplaces=array[numsects+2]{0,0.25,0.5,0.75,1.0} //#declare sectionplaces=array[numsects+2]{0,0.25,0.5,0.75,1.0} #declare section[1]=spline{ cubic_spline #declare n=-1; #while (n #declare n=n+1; #end } #declare section[2]=spline{ cubic_spline #declare n=-1; #while (n #declare n=n+1; #end } #declare section[3]=spline{ cubic_spline #declare n=-1; #while (n #declare n=n+1; #end } /*#declare section[1]=spline{linear_spline 0,<0,0,2>,0.125,<0.5,0,0.5>, 0.25,<0.5,0,0>,0.5,<0,0,-0.5>,0.75,<-0.85,0,0>,0.875,<-0.25,0,0.25>,1.0,<0,0,2>} #declare section[2]=spline{linear_spline 0,<0,0,2>,0.125,<0.5,0,0.5>, 0.25,<0.5,0,0>,0.5,<0,0,-0.5>,0.75,<-0.85,0,0>,0.875,<-0.25,0,0.25>,1.0,<0,0,2>} #declare section[3]=spline{linear_spline 0,<0,0,2>,0.125,<0.5,0,0.5>, 0.25,<0.5,0,0>,0.5,<0,0,-0.5>,0.75,<-0.85,0,0>,0.875,<-0.25,0,0.25>,1.0,<0,0,2>} */ #declare newradius=array[npts+1] #declare n=0; #while(n,chin_transform); #declare themesh= mesh2{ vertex_vectors{ npts*numrings+2 toppt, #declare nspacer=0.5; #declare nring=0; #while(nring, #declare n=n+1; #end #declare a=1; #declare anen=0; #while(anen0.25) #declare np=0; #while(np, , #declare np=np+1; #end , //, //the problem?? , //the problem?? #else //#//if(nspacer=0) #declare np=0; #while(np, , #declare np=np+1; #end //, //<1,2,0>//, // , //9: , //9: //, // , //, #end #declare nspacer=mod(nspacer+0.5,1); #declare a=a+npts; #declare anen=anen+1; #end #declare n=0; #while(n, #declare n=n+1; #end } pigment {rgb 1} } object{themesh rotate 160*y translate -8*x} object{themesh rotate -90*x translate 13*y+8*z} object{themesh rotate -104*y translate 11*x+.5*z} light_source{<0,200,-50> color rgb 1} light_source{<0,200,0> color rgb x rotate -80*x rotate 45*y} light_source{<0,200,0> color rgb z rotate -80*x rotate -45*y} light_source{<0,0,0> color rgb 1 translate 10*x } background{rgb 1} camera{location <2,8,-22> look_at <0,4,0>}