The ScoutWiki Network server was upgraded on November 20th, 2019. The maintenance is now over. Please inform us in Slack or via email support@scoutwiki.org if you encounter any unexpected errors – it's possible the upgrade has missed something. Thanks and happy scoutwiki'ng!

SpejderWiki:1st Povray Scout Group

Fra SpejderWiki
Version fra 15. sep 2013, 16:42 af Jørgen (diskussion | bidrag) Jørgen (diskussion | bidrag) (Hermed introduceres 1st Povray Scout Group - vores helt egen velvillige og fiktive spejdergruppe.)
(forskel) ←Ældre version | Nuværende version (forskel) | Nyere version→ (forskel)
Spring til navigation Spring til søgning
1st. Povray Scout Group ved begyndelsen af et møde...

1st Povray Scout Group er en fiktiv spejdergruppe, der kan hjælpe os med at illustrere lege og andre situationer, hvor det kan give en nem og hurtig forståelse.

Hvorfor POVRAY?
Jo, et andet tegneprogram kunne sagtens bruges, men her er spejderne og andre ting defineret een gang for alle, og man kan nemt oprette en ny Povray-fil med koderne, sætte koder ind for scenariet og klikke 'render'. Man kan endda flytte kameraet og vise eksakt samme opstilling, set et andet sted fra. En anden fordel er at jeg har lavet nogle meget simple figurer. Hvis de bliver forbedret senere, er det bare at fylde de nye koder ind i kildekoderne til filen og køre billedet igen. Så er det samme billede, men med de nye figurer, bedre lys eller hvad man nu har fundet på.


Kildekode

//(Koden vil virke lidt underlig i Wiki-visning, da Wikien vil fortolke visse mellemrum og linjeskift)

// 1st povray scout group.pov // POV-Ray 3.62 scene file by Jørgen Lykkebo // 1st Povray Scout Group // // -w320 -h240 // -w800 -h600 +a0.3

//Basic settings:

  1. include "colors.inc"
  2. include "textures.inc"
  3. include "shapes.inc"
  4. include "metals.inc"
  5. include "glass.inc"
  6. include "woods.inc"

global_settings {max_trace_level 5}

camera {

  //location <-13, 10, -6>  
  //  location <-6, 6, -6>  
   // location <-5, 2, 0>
  //  location <-3, 4, -6>   
    location <0, 8, -12>
 // direction <0, 1.2,  0>
 // right x*1.33
  look_at <0,-0.5,0>

}

// Uncomment the area lights only if you've got lots of time.

  1. declare Dist=80.0;

light_source {< -50, 100, -50> color White

    fade_distance Dist fade_power 3 
 area_light <-40, 0, -40>, <40, 0, 40>, 3, 3

// adaptive 1 // jitter } light_source {< 40, 180, -24> color Gray60 shadowless

    fade_distance Dist fade_power 1 
//  area_light <-20, 0, -20>, <20, 0, 20>, 3, 3

// adaptive 1 // jitter } light_source {< -10, 10, -40> color Gray40 shadowless

    fade_distance 50 fade_power 2  
//area_light <-30, 0, -30>, <30, 0, 30>, 3, 3

// adaptive 1 // jitter }

light_source {< 0,2, 0> color Gray20 shadowless

    fade_distance Dist fade_power 12  
  area_light <-30, 0, -30>, <30, 0, 30>, 3, 3
  adaptive 1
  jitter}

sky_sphere {

   pigment {
       gradient y
       color_map {
           [0, 1  color Gray90 color Gray90]
       }
   }

}


  1. declare Floor =

plane { y,0

pigment {color rgb <2,2,2>}
   }

//Definition of elements:

 //necker
  # declare necker   = 
  union {     
  //knude   
       sphere {  < 0, 0.30,0.38>,0.035 
            pigment {color rgb <0.55, 0.27, 0.12>} }
       //2 snipper 
       cone  {  < 0, 0.30,0.39>,0.015
                 <0.1,0.15,0.50> ,0  pigment {color rgb <0,0.7,0>} }
       cone  {  < 0, 0.30,0.39>,0.015
                 <-0.1,0.15,0.50> ,0 pigment {color rgb <0,0.7,0>}  }          
   intersection {
   union{
intersection {

  box{ <0.2,-0.2,-0.6>
      <-0.2,0.2,0>   
      pigment {color rgb <0,0.7,0>} rotate<0,0,45>} 
           
  box{<1,0,-2>  
      <-1,-2,2>pigment {color rgb <0,0.7,0>}} translate <0,0.34,0>   } 
      
 difference{

  box{ <0.4,0,-0.5>
      <-0.4,0.05,0.5>   
      pigment {color rgb <0,0.7,0>} rotate<0,0,0>} 
           
  box{ <0.41,0,-0.51>
      <-0.41,0.08,0.51> pigment {color rgb <0,0.7,0>}  rotate<1.5,0,0> translate <0,0.03,0>   }  
      translate <0,0.305,0>  }   
              }
       sphere {  < 0, 0,0>, 0.49
            pigment {color rgb <0,0.7,0>}  }      
            }    
       
       }

#declare bodyscout =
  union {
 cylinder { < 0, 0,  0>,
           < 0, 1.5,0>, 0.49
            pigment {color rgb <0.40, 0.40, 0.95> }    }      
   cylinder { <  0, 1.5,0>,
           < 0, 2.5,0>, 0.49
            pigment {color rgb <0.94, 0.90, 0.55>}  }  
   sphere {  < 0, 2.5,0>, 0.49
            pigment {color rgb <0.94, 0.90, 0.55>}  }    
object {necker rotate <0,180,0> translate <0,2.540,0>    }      
          
            }          
#declare bodyscoutg =
  union {
 cylinder { < 0, 0,  0>,
           < 0, 1.5,0>, 0.49
            pigment {color rgb <0.40, 0.95, 0.40> }    }      
   cylinder { <  0, 1.5,0>,
           < 0, 2.5,0>, 0.49
            pigment {color rgb <0.94, 0.90, 0.55>}  }  
   sphere {  < 0, 2.5,0>, 0.49
            pigment {color rgb <0.94, 0.90, 0.55>}  }    
   object {necker rotate <0,180,0> translate <0,2.540,0> }  
  //  sphere {  < -0, 1.8,-0.15>, 0.49
  //          pigment {color rgb <0.94, 0.90, 0.55>}  }           
            }      
                                      


 #declare bodymasterpb =
  union {
 cylinder { < 0, 0,  0>,
           < 0, 1.5,0>, 0.49
            pigment {color rgb <0.40, 0.40, 0.95> }    }      
   cylinder { <  0, 1.5,0>,
           < 0, 2.5,0>, 0.49
            pigment {color rgb <0.94, 0.90, 0.55>}  }  
   sphere {  < 0, 2.5,0>, 0.49
            pigment {color rgb <0.94, 0.90, 0.55>}  }    
    
   sphere {  < -0, 1.8,-0.15>, 0.49
           pigment {color rgb <0.94, 0.90, 0.55>}  }
           object {necker rotate <0,180,0> translate <0,2.540,0>}           
            }  
      
 

 //Hat and head:                                 
                                  
 #declare hat =
 difference{
 union{      
//klovnenæse    sphere { <0, 0, -0.44>, 0.04 pigment {color rgb <0.9, 0, 0>}}
  sphere {  < 0, 0,0>, 0.40                                         //     
            pigment {color rgb <0.82, 0.71, 0.55>}  }
 cylinder { <  0, 0.25,0>,
           < 0, 0.27,0>, 0.75
            pigment {color rgb <0.74, 0.72, 0.42>}  } 
 cylinder { <  0, 0.27,0>,
           < 0, 0.31,0>, 0.45
            pigment {color rgb <0.80, 0.52, 0.23>}  }               
  cone {<0,0.29,0>,0.45
         <0,0.65,0>,0.09
         pigment {color rgb <0.74, 0.72, 0.42>}
         }     
          sphere {  < 0, 0.57,0>, 0.121
            pigment {color rgb <0.74, 0.72, 0.42>}  }  
            }
      union {
       sphere {  < 0.25, 0.65,0.25>, 0.27
            pigment {color rgb <0.74, 0.72, 0.42>} }
             sphere {  < -0.25, 0.65,0.25>, 0.27
            pigment {color rgb <0.74, 0.72, 0.42>}  }
             sphere {  < 0.25, 0.65,-0.25>, 0.27
            pigment {color rgb <0.74, 0.72, 0.42>}   }
             sphere {  <- 0.25, 0.65,-0.25>, 0.27
            pigment {color rgb <0.74, 0.72, 0.42>}   }
         }   
            }   
            
                
#declare scout =   
union{         
            object {hat rotate <15,0,0>  translate<0,3.35,0>}
            object {bodyscout} 
      }  
       #declare scoutg =   
union{         
            object {hat rotate <15,0,0>  translate<0,3.35,0>}
            object {bodyscoutg} 
      }   
      
       
      
#declare cub =   
union{         
            object {hat rotate <15,0,0>  translate<0,2.73,0>}
            object{bodyscout scale<0.8,0.8,0.8> translate<0,0,0>} 
      }  
      
          
#declare master =   
union{         
            object {hat rotate <15,0,0>  translate<0,4.25,0>}
            object {bodyscout scale<1.05,1.3,1.05> translate<0,0,0>} 
      } 
      
                       
      #declare masterpb =   
union{         
            object {hat rotate <15,0,0>  translate<0,4.25,0>}
            object {bodymasterpb scale<1.05,1.3,1.05> translate<0,0,0>} 
      }      

       
//Staging the group pic:       
   
 
    cylinder {<0,-0.1,0> <0,0.05,0>,7   pigment {color rgb <0.1,0.7,0.1>}  }  
      object {scout rotate <0,60,0> translate <4.7,0,1.70>}      
      object {master rotate <0,40,0> translate <3.8,0,3.20>} 
      object {masterpb rotate <0,20,0> translate <2.5,0,4.30> no_shadow}
      object {cub rotate <0,00,0> translate <0.85,0,4.90>} 
      object {scout rotate <0,340,0> translate <-0.9,0,4.90>}
      object {scoutg rotate <0,320,0> translate <-2.4,0,4.30>}    
      object {scout rotate <0,300,0> translate <-3.8,0,3.20>}  
      object {scoutg rotate <0,280,0> translate <-4.7,0,1.70>}  
      object {scout rotate <0,260,0> translate <-5,0,0>}  
      object {scoutg rotate <0,240,0> translate <-4.7,0,-1.70>}  
      object {scout rotate <0,220,0> translate <-3.82,0,-3.20>}  
      object {scoutg rotate <0,200,0> translate <-2.5,0,-4.30>}  
      object {scout rotate <0,180,0> translate <-0.90,0,-4.90>}  
      object {scoutg rotate <0,160,0> translate <0.9,0,-4.90>}  
      object {scout rotate <0,140,0> translate <2.5,0,-4.30>}  
      object {scoutg rotate <0,120,0> translate <3.82,0,-3.20>}  
      object {scout rotate <0,100,0> translate <4.70,0,-1.70>}  
      object {scoutg rotate <0,80,0> translate <5,0,0>}  
   
       
  object { Floor }     
 
          
   
   // create a TrueType text shape

text {

 ttf             // font type (only TrueType format for now)
 "crystal.ttf",  // Microsoft Windows-format TrueType font file name
 "1st POVRAY Scout Group",      // the string to create
 0.8,              // the extrusion depth
 0               // inter-character spacing   
rotate <90,0,0> translate <-5.5,0.2,-7>

}