// PoVRay 3.6 Include File "Clock_Splitting.inc" // author: Florian Simon // date: 2011/11/14 #ifndef( Clock_Splitting_Inc_Temp) #declare Clock_Splitting_Inc_Temp = version; #version 3.62; // smooth movement macro functions ------------------------- #macro Cos_010( X ) //----- (0.5-0.5*cos(2*pi*X)) #end //-------------------- #macro Cos_01( X ) //----- (0.5-0.5*cos(pi*X)) #end //-------------------- // end of smooth movement macro functions ------------------ // (splitted) clock value from 0 to 1 in part "Part" of total "Total" parts #macro Sclock_01 ( Part , Total ) (clock-((Part-1)/Total))*Total #end // (splitted) clock value from 0 to 1 to 0 in part "Part" of total "Total" parts #macro Sclock_010 ( Part , Total ) #if ( Sclock_01 ( Part , Total ) < 0.5 ) ( 2*Sclock_01 ( Part , Total ) ) #else ( 1- ( 2*(Sclock_01 ( Part , Total )-0.5) ) ) #end #end // (splitted) SMOOTH clock value from 0 to 1 in part "Part" of total "Total" parts #macro Sclock_01s ( Part , Total ) Cos_01( Sclock_01 ( Part , Total ) ) #end // (splitted) SMOOTH clock value from 0 to 1 to 0 in part "Part" of total "Total" parts #macro Sclock_010s ( Part , Total ) Cos_010( Sclock_01 ( Part , Total ) ) #end #version Clock_Splitting_Inc_Temp; #end