POV-Ray : Newsgroups : povray.newusers : How to locate/light this airplane skeleton? : How to locate/light this airplane skeleton? Server Time
23 Apr 2024 10:23:17 EDT (-0400)
  How to locate/light this airplane skeleton?  
From: coltson
Date: 9 May 2021 23:05:00
Message: <web.6098a1dce5861cd1af42a94211da06af@news.povray.org>
Hello. I got the code to render the skeleton of an airplane. However, its only
the airplane's skeleton code, no "scene" code is there, so I cannot send povray
ro render it and see the results. So I used the menu and inserted two default
point light (changed one of them a bit) and "A typical camera".

However, the end result is nearly black, and nothing from the skeleton can be
seen:

https://i.postimg.cc/PqH85X1K/test.jpg

So I would like suggestions to locate the skeleton and light it

Here the code:

             // create a regular point light source
light_source {
  0*x                  // light's position (translated below)
  color rgb <1,1,1>    // light's color
  translate <-20, 40, -20>
}

light_source {
  0*x                  // light's position (translated below)
  color rgb <1,1,1>    // light's color
  translate <20, 40, 20>
}

// perspective (default) camera
camera {
  location  <0.0, 2.0, -10.0>
  look_at   <-3.0, 2.0,  0.0>
  right     x*image_width/image_height
}


#local R1  = 2.00;  // radius of the body outside Radius
#local R2  = 1.25;  // radius nose top y          Radius_Nose_TopY
#local R3  = 4.00;  // length nose                Length_Nose
#local R4  = 2.50;  // length forehead part       Length_Forehead
#local R5  = 9.50;  // length of tail part        Length_Tail

#macro Body(Radius, Radius_Nose_TopY, Length_Nose, Length_Forehead,
            Length_Tail)
union{
intersection{                                 //  nose lower part (1)
 sphere { <0,0,0>,1  scale <Length_Nose, Radius, Radius>}
 box    { <0,-1,-1>,<1,0,1> scale <Length_Nose, Radius, Radius>}
 }// -------------- end of intersection

intersection{                             // nose - forehead part (2)
 sphere { <0,0,0>,1  scale < Length_Forehead, Radius, Radius>}
 box    { <0,0,-1>,<1,1,1>  scale < Length_Forehead, Radius, Radius>}

 }// -------------- end of intersection
intersection{                            // nose front upper part (3)
 sphere { <0,0,0>,1  scale <Length_Nose, Radius_Nose_TopY, Radius>}
 box    { <0,0,-1>,<1,1,1> scale <Length_Nose, Radius, Radius>}
 }// -------------- end of intersection

intersection {                        // the tail of the airplane (4)
 sphere { <0,0,0>,1    scale < Length_Tail, Radius, Radius> }
 box    { <-1,-1,-1>,<0,1,1> scale < Length_Tail, Radius, Radius>}
 }// -------------- end of intersection
}// end of union
#end // ---------------------------------- end of macro "Body( ... )"

object { Body(R1, R2, R3, R4, R5)
        texture {
                pigment {
                        color_map {      // color map
                                [0.1 color red 1]
                                [0.5 color rgbf 1]
                        }
                }
                finish {diffuse 0.9 phong 1}
        }
}


Post a reply to this message

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