|
|
"Melody" <nomail@nomail> wrote:
> Aspect = Width/Heigth > 1
Don't need Aspect, just adjusts for visible height angle.
Text centering failed for different FontSize - fixed.
Screen size same for a camang change. Now its done?
There's always something more?
/*
right=up.eye
eye=right.up
up=eye.right
*/
#declare campos = <0,80,-250>;
#declare cameye = vnormalize(<20,12,0>-campos);
#declare camup = <-1,1,0>;
#declare camright = vnormalize(vcross(camup,cameye));
#declare camup = vnormalize(vcross(cameye,camright));
#declare FontSize = 1;
#declare camang = 30;
camera {
location campos
right camright
up camup *(image_height/image_width)
direction cameye*(image_height/image_width)
angle camang
}
#include "transforms.inc"
#macro label(Text,objv,r,col,top)
#local fl = 1/tan(radians(camang/2));
#local vl = vlength(objv-campos)/(fl*20);
#if (top)
#local pnt = camup*(r*1.05)+objv;
#else
#local pnt = -camup*(vl*FontSize+r)+objv;
#end
#local eye = vnormalize(pnt-campos);
object {
text {
ttf "Arial.ttf" Text 1 0
texture { pigment { rgb col } finish { ambient 1 diffuse 0 } }
}
translate -x*((strlen(Text)/2) * FontSize / (2*FontSize))
scale vl*FontSize
Matrix_Trans(vnormalize(vcross(camup,eye)),camup,eye,pnt)
no_shadow
}
#end
label("HELLO 162",<60,24,80>,48,<0.0196, 0.0196, 0.2156>,1)
label("Here are 492",y* 29.9,24*.8,<0.0196, 0.0196, 0.2156>,0)
well there are now much smaller remaining constants, 20 and 1.05.
Post a reply to this message
Attachments:
Download 'golfdimples10a.png' (108 KB)
Preview of image 'golfdimples10a.png'
|
|
|
|
Here's what you can do with it; IF you can rotate around an axis. I don't know
how in POV. vrotate() is not rotation(r,axis,pnt). If you cant, you need
triangulation.inc ... added centering option, and y adjust.
CamAng change, scale stays ...
/*
right=up.eye
eye=right.up
up=eye.right
*/
#declare campos = <0,80,-250>;
#declare cameye = vnormalize(<20,12,0>-campos);
#declare camup = <-1,1,0>;
#declare camright = vnormalize(vcross(camup,cameye));
#declare camup = vnormalize(vcross(cameye,camright));
#declare FontSize = 1.0;
#declare camang = 30;
camera {
location campos
right camright
up camup *(image_height/image_width)
direction cameye*(image_height/image_width)
angle camang
}
#include "transforms.inc"
#macro label(Text,objv,r,col,top,center,ydeg)
#local fl = 1/tan(radians(camang/2));
#local vl = vlength(objv-campos)/(fl*20);
#if (top)
#local pnt = camup*(r*1.05)+objv;
#else
#local pnt = -camup*(vl*FontSize+r)+objv;
#end
#local eye = vnormalize(pnt-campos);
object {
text {
ttf "Arial.ttf" Text 1 0
texture { pigment { rgb col } finish { ambient 1 diffuse 0 } }
}
#if (center) translate -x*((strlen(Text)/2) * FontSize / (2*FontSize)) #end
scale vl*FontSize
#if (ydeg) rotate y* ydeg #end
Matrix_Trans(vnormalize(vcross(camup,eye)),camup,eye,pnt)
no_shadow
}
#end
label("HELLO 162",<60,24,80>,48,<0.0196, 0.0196, 0.2156>,1,1,0)
label("Here are 492",y* 29.9,24*.8,<0.0196, 0.0196, 0.2156>,0,1,0)
#declare pnt = rotation(radians(camang/2.04),camup,cameye)*10+campos;
#declare d = 1;
#declare rowh = camang * 0.005;
label("Display Info 0",pnt,0,0,1,0,d)
label("Row 1",pnt,rowh * 1,0,1,0,d)
label("Row 2",pnt,rowh * 2,0,1,0,d)
label("Row 3",pnt,rowh * 3,0,1,0,d)
label("Row 4",pnt,rowh * 4,0,1,0,d)
label("Row 5",pnt,rowh * 5,0,1,0,d)
label("Row 1",pnt,rowh * 0,0,0,0,d)
label("Row 2",pnt,rowh * 1,0,0,0,d)
label("Row 3",pnt,rowh * 2,0,0,0,d)
label("Row 4",pnt,rowh * 3,0,0,0,d)
label("Row 5",pnt,rowh * 4,0,0,0,d)
label(concat("CamAng ",str(camang,0,0)),pnt,rowh * 5,0,0,0,d)
Post a reply to this message
Attachments:
Download 'screeninfo.png' (229 KB)
Preview of image 'screeninfo.png'
|
|