|
|
#include "colors.inc"
// Makes the curve: y = k/sin(pi*x/n)
#macro MakeBand(minX,maxX,n,k)
union {
#declare xpoint = minX;
#while(xpoint<=maxX)
// Angle of the current point in the curve
#declare a = atan2(-k/n *
pi*cos(pi*xpoint)/(sin(pi*xpoint)*sin(pi*xpoint)),1);
// Make the letter itself
#if(rand(rseed)*10 < 1/sqrt(sin(xpoint*pi)))
#if(rand(rseed)>0.5)
#local char = chr(rand(rseed)*26+asc("A"))
#else
#local char = chr(rand(rseed)*26+asc("a"))
#end
text {
ttf "hirosht.ttf" char 0.001,0
scale 0.25
rotate y*90
rotate z*a*180/pi
translate <xpoint*n,k/sin(xpoint*pi),0>
}
#end
// Move along the curve, constant distance, not constant x
increment
#declare xpoint = xpoint + (0.2/n)*cos(a);
#end
// Center
translate x*-n/2
}
#end
#declare rseed = seed(43745);
#declare c = 600;
#while (c > 0)
object {
MakeBand(0.2,0.995,10+rand(rseed)*28,0.3 + rand(rseed)*0.4)
rotate x*rand(rseed)*360
#declare col = rand(rseed)*1;
pigment {color rgb <col,1,col>}
finish {ambient 0.5 diffuse 0.5}
}
#debug concat(str(c,0,0),"\n")
#declare c = c - 1;
#end
camera {
location <-2,1,1>
look_at <10,0,0>
focal_point <2,0,0>
aperture 0.18
blur_samples 20
confidence 0.999
}
light_source {<-2,1,1> color White}
--
Sam
mailto:smi### [at] paradisenetnz
http://www.geocities.com/SiliconValley/Horizon/4152/
"We live and we learn. But, sadly, at different rates."
-- Alan Magid
Post a reply to this message
|
|