POV-Ray : Newsgroups : povray.binaries.images : Problem with text object : Problem with text object Server Time
30 Jul 2024 10:22:44 EDT (-0400)
  Problem with text object  
From: Jörg 'Yadgar' Bleimann
Date: 9 Dec 2011 20:02:08
Message: <4ee2af90@news.povray.org>
Hi(gh)!

Perhaps once more a stupid beginner's mistake (after 16 years of 
POVing... it's just humiliating!): I'm just not able to place a text 
object (within an object pigment pattern) on a box tilted by 30 degrees 
around the x axis!

Here is the code:

   #declare Display_Card_Rounding=
   cylinder
   {
     0, <0.1, 0, 0>, 0.0015
   }
   #declare Display_Card_Panel=
   box
   {
     0, <0.1, 0.03, 0.003>
   }

   #declare Display_Card=
   union
   {
     union
     {
       object { Display_Card_Rounding }
       object { Display_Card_Panel translate <0, 0, -0.0015>}
       translate <0, 0.0015, 0>
       rotate <30, 0, 0>
     }
     union
     {
       object { Display_Card_Rounding }
       object { Display_Card_Panel translate <0, 0, -0.0015>}
       translate <0, 0.0015, 0>
       rotate <-30, 0, 0>
       translate <0, 0, 2*(0.0315*cos(radians(60))+0.0015*sin(radians(60)))>
     }
     difference // Display card top
     {
       cylinder { 0, <0.1, 0, 0>, 0.003 }
       plane { y, 0 rotate <30, 0, 0> }
       plane { y, 0 rotate <-30, 0, 0> }
       translate <0, 0.0315*sin(radians(60))-0.0015*cos(radians(60)), 
0.0315*cos(radians(60))+0.0015*sin(radians(60))>
     }
   }

#declare N_Brushed=
normal
{
   granite
   bump_size 0.5
   turbulence 10
   scale <1, 0.001, 0.001>
}

#declare F_Metallic_Low_Ref =
finish
{
   diffuse 1
   brilliance 0.7
   specular 1
   roughness 0.001
   reflection 0.05
   metallic
}


#declare T_Brushed_Aluminium=
texture
{
   pigment { color rgb 0.6 }
   finish { F_Metallic_Low_Ref }
   normal { N_Brushed }
}


object
   {
     Display_Card
     texture { T_Brushed_Aluminium }
     texture
     {
       pigment
       {
	object
	{
	  text
	  {
	    ttf "/media/disk1part9/fonts/lucon.ttf"
	    "T_Stone1", 0.001, 0
	    scale 0.01
	    translate <0, 0.01, 0>
	    rotate <30, 0, 0>
	
           }
	  color rgbf 1
	  color rgb 0
	}
       }
     }
   }

// end of code

All I ever get is an empty aluminium panel (see attachment)... what goes 
wrong?

See you in Khyberspace!

Yadgar


Post a reply to this message


Attachments:
Download '2011-12-10 includes showroom 1, take 75 - display card.jpg' (19 KB)

Preview of image '2011-12-10 includes showroom 1, take 75 - display card.jpg'
2011-12-10 includes showroom 1, take 75 - display card.jpg


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.