// Script which counts priority votes // Copyright 2000 Rune S. Johansen #macro MacroInitialize (Macro) #local X=0;#while(X0 & Round<=Logos ) #debug concat("\n\nROUND ",str(Round,0,0)) MacroInitialize(Points) // Count votes #declare Voter = 0; #while (Voter1) #debug "\n\nThe following logos are excluded because they got the fewest votes:\n\n" #declare X = 0; #declare NoMoreExcluded = false; #while (NoMoreExcluded=false&X<=Logos) #if (LowestLogos[X]>0) #debug concat("logo ",str(LowestLogos[X],0,0),", ") #declare Excluded[LowestLogos[X]] = 1; #declare LogosLeft = LogosLeft-1; #else #declare NoMoreExcluded = true; #end #declare X = X+1; #end #else #debug "\n\nTHE WINNER IS:\n\n" #declare X = 0; #declare NoMoreExcluded = false; #while (NoMoreExcluded=false&X<=Logos) #if (LowestLogos[X]>0) #declare Winner = LowestLogos[X]; #debug concat("LOGO ",str(Winner,0,0)," !") #declare LogosLeft = LogosLeft-1; #declare NoMoreExcluded = true; #end #declare X = X+1; #end #end #declare Round = Round+1; #end #debug "\n\n" union { #declare Font = "crystal.ttf" text {ttf Font, "THE WINNER IS", 0, 0 translate <-3.2,1,6>} text {ttf Font, concat("LOGO ",str(Winner,0,0)," !"), 0, 0 translate <-2.2,-0,6>} text {ttf Font, "see console text output", 0, 0 translate <-6,-3,10>} text {ttf Font, "for the details", 0, 0 translate <-4,-4,10>} pigment {color rgb 1} finish {ambient 1} }