|
|
On 19/01/2020 07:16, Melody wrote:
> #macro label(Text,objv,r,col,top)
> #local vl = vlength(objv-campos)/88;
> #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 2 0
> texture { pigment { rgb col } finish { ambient 1 diffuse 0 } }
> }
> translate x*(strlen(Text)*-0.15*FontSize)
> scale vl*FontSize
> Matrix_Trans(vnormalize(vcross(camup,eye)),camup,eye,pnt)
> no_shadow
> }
> #end
Thank for this macro. It seems to be working perfectly.
My firt try with **label()**
Thanks :)
--
Kurtz le pirate
Compagnie de la Banquise
Post a reply to this message
Attachments:
Download 'norma_triangle2.jpg' (43 KB)
Preview of image 'norma_triangle2.jpg'
|
|