|
|
/* Printing a Number to Screen */
#declare Rs=seed(clock*1234);
#declare YourGeneratedNumber=int(rand(Rs)*360);
#declare ExtractedNumber=
concat("N",str(YourGeneratedNumber,0,3)) // YourGeneratedNumber is angle.
// up to three digits starting from left and no decimal (i think).
#declare PrintedNumber=
concat("The Angle is: ", substr(ExtractedNumber,2,3))
// skips "N" from previous concat()
#declare cam_l = <.6,5.4,16>;
#declare cam_lat = <15,1,24>;
#local CamZ = 2; // amount of camera zoom you want
#local CamD = vnormalize(cam_lat)//,cam_l);
#local CamR = vnormalize(vcross(y,CamD));
#local CamU = vnormalize(vcross(CamD,CamR));
text{ttf "timrom.ttf",PrintedNumber,0.05,0
// use the text placement stuff here.
pigment { rgb 1 }
finish { ambient 1 diffuse 0}
scale .05
translate <-.65,-.48,CamZ>
matrix < CamR.x,CamR.y,CamR.z,
CamU.x,CamU.y,CamU.z,
CamD.x,CamD.y,CamD.z,
cam_l.x,cam_l.y,cam_l.z >
}
camera {
location cam_l
up CamU
right CamR*4/3
direction CamD*CamZ
}
Hopefully this is what you had in mind, and can change it to work okay in the
way you need.
Please ignore my other reply since it was totally wrong.
Bob
"J. Kim" <jjk### [at] mmewhaackr> wrote in message
news:388FEFA6.7C63EE3D@mm.ewha.ac.kr...
| Dear POV'ers,
|
| I am raytracing my object by rotating light_source(point) around
| X-axis, Y-axis, or Z-axis based on
| Chris Colefax's animation utility.
| I'd like to identify each output(PNG) by writing the angle values
| somewhere in the corner.
| For example, ang. 35(X), or ang. 72(Y), and so on.
| I do not know how I could get the value of the variable during the
| animation for each output, and pass
| the value to the font.
| Any help would be appreciated.
| === part of my animation === there are 8 or 13 frames for each axis.==
| // light source rotation around Z-axis 0 to -180degree
| light_source { <-86.6,0,-50.0> color rgb<1,1,1>*2.5
| rotate
| From(0.0,< 0,0,0>)
| Using("",1,1,"")
| To(1, < 0,0,-180>)
| }
|
| -------
| Jong
|
Post a reply to this message
|
|