//boid04 was ideal in smooth collision avoidance swarming. //bodi05 attempts to make them go somewhere //boid08b attempts to make them be "near center, not at center, with x*(1/x) //trail03 made a growing mess of string. trail 04 will attempt to make something that looks like worms. //tbrail09read was an elegant collection of seasnakes. //tbrail09read & 10 both read a file created by tbrail06write.pov // 11 attempts to read new format from file.... #include "colors.inc" #include "textures.inc" #include "stones.inc" #include "metals.inc" #include "trailchase04.inc" #macro Reorient(Axis1,Axis2) #local vX1=vnormalize(Axis1); //john vansickle #local vX2=vnormalize(Axis2); #local vY=vnormalize(vcross(vX1,vX2)); #local vZ1=vnormalize(vcross(vX1,vY)); #local vZ2=vnormalize(vcross(vX2,vY)); matrix < vX1.x, vY.x,vZ1.x, vX1.y,vY.y,vZ1.y, vX1.z,vY.z, vZ1.z, 0,0,0 > matrix < vX2.x,vX2.y,vX2.z, vY.x,vY.y, vY.z, vZ2.x,vZ2.y,vZ2.z, 0,0,0 > #end background {White} //plane {y,-100 pigment{MediumSeaGreen*2}} #declare num=100 ; #declare framenum=375; //#declare taillen=12; #declare RRR=seed(20822) ; #declare colorp= array[num+1] #declare actorp= array[framenum+1][num+1] #declare actorv= array[framenum+1][num+1] //#declare actoravoid= array[num+1] #declare n=0 ; #while (n; //#debug str(colorp[n].x,3,3) #declare n=n+1 ; #end /* //display #fopen MyFile2 "c:\pov31\include\traillist.txt" read */ //#declare tt=0 ; //#while (tt; #declare actorv[tt][n]=; //#declare tee=tee+1; //#end #declare n=n+1 ; #end */ #declare tee=tt-1; #while (tee>tt-taillen) /* #debug "\n" #debug "tt is " #debug str(tt,2,2) #debug " " #debug "n is " #debug str(n,2,2) #debug " " #debug "tee is " #debug str(tee,2,2) #debug "\n" */ //cone {<0,0,0>,.6,<2,0,0>,0 //sphere {<0,0,0>,.25 //px, py, pz, vx, vy, vz cylinder {<0,0,0>,<0.25,0,0>,0.5//5 Reorient(x,) translate //pigment{Coral} pigment {color colorp[n]} finish{ambient 0.3} //pigment {rgb 1/pow(tt,0.15)} } #declare tee=tee-1; #end #declare n=n+1 ; #end //#declare tt=tt+1; //#end camera { //location <0, 100, 0> location <0, -5,-90>*(1+tt/350/6) look_at <0, 0, 0> angle 30//5 rotate <0,60*tt/350,0> // Reorient(-z,actorv[0]) // translate actorp[0] } light_source{<10,200,150>rgb 1.2} light_source{<10,-200,50>rgb .2} fog { fog_type 1 distance 2000 rgb <.2,.3,.7>} //sphere {0,20 // no_shadow // hollow // texture{T_Chrome_4D } //pigment {Silver} finish {reflection 0.4} //} #fclose Myfile2 #debug "\a"