// Greeble-macros and utilities // for some weird reason, these don't function properly in POV-Ray 3.6.1, but they work fine in MegaPOV #ifndef (TRANSFORMS_INC_TEMP) #include "transforms.inc" #end #ifndef (Seed) #declare Seed=seed(123); #end //Normal2D gives a vector that is at a 90 angle with the given vector V, in the XZ-plane #macro Normal2D(V) #local R=vnormalize(); R #end //draws the beveled end of a beveled prism using the given points in array Points, bevel-width R and bevel-height H #macro RoundPrism(Points,R,H) #local Aantal=dimension_size(Points,1); #local Tel=0; #local Aantal2=Aantal; #local Points2=array[Aantal]; union { #while (TelPVolgend 's verlengde ligt, is PVolgend van enig belang //anders: PVolgend gelijkstellen aan P en deze randen gewoon niet tekenen #if (((vlength(VN1-VN2)=0)|(vlength(VN1+VN2)=0))|(vlength(P-PVolgend)<0.01)) //ORIGINAL WAS #if (((vlength(VN1-VN2)=0)|(vlength(VN1+VN2)=0))|(vlength(P-PVolgend)=0)) #local Points[mod(Tel+1,Aantal)]=P; #local Aantal2=Aantal2-1; #else //PVorig kan nu gelijk zijn aan P... fixen: #if (vlength(P-PVorig)=0) #local PVorig=Points[mod(Aantal+Tel-2,Aantal)]; #end