POV-Ray : Newsgroups : povray.general : Transparency ?? : Re: Transparency ?? Server Time
4 Aug 2024 14:25:33 EDT (-0400)
  Re: Transparency ??  
From:
Date: 15 Apr 2003 22:10:42
Message: <3e9cbba2$1@news.povray.org>
/*
   Hi Robert,

   what you need is
      6.7.1.4  Pigment Map
      6.7.5.1 Texture Map
   The following little but complete scene shows how a texture map can
   be utilized to put stripes onto helicopter blades. The appearance
   near the center isn't realistic (as seen at the auxiliary rotor),
   but improved by composing the main rotor of an 'hollow' outer rotor,
   an inner rotor and an axle.

      Sputnik


*/

//----- START OF ROTOR ----------------------------------------------

// texture for the gaps between blades
#declare ClearTex = texture { pigment { color rgbt <0, 0, 0, 1> } }

// texture for blades
#declare BladeTex = texture {
  pigment { onion
    frequency 3
    color_map {
      [ .3 rgbt <1, 0, 0, .2> ]
      [ .3 rgbt <1, 1, 1, .2> ]
      }
    }
  finish { }
  }

//texture for 'inner rotor'
#declare DarkTex = texture { pigment { color rgbt <.3, .3, .3, .2> } }


// rotor macro
#macro Rotor (Diameter, Hole, Blades, Width, Blur, Tex)
  disc { 0, y, Diameter, Hole
    texture { radial
      frequency Blades
      triangle_wave
      texture_map {
        [ Width      Tex      ]
        [ Blur+Width ClearTex ]
        }
      }
    }
  #end//macro Rotor


// rotor of helicopter
Rotor (3  , 0.5, 6, .5, .2, BladeTex)
Rotor (0.5, 0  , 6, .1, .2, DarkTex)
cylinder { 0.1*y, -0.3*y, 0.1 texture { DarkTex } }

// 'helicopter'
union {
  sphere { -y, 0.8 }
  cone { <0, -0.7, 0>, 0.5, <4, -0.7, 0>, 0 }
  texture { pigment { color rgb <1, .8, 0> } }
  }

// auxiliary rotor
object { Rotor (1, 0, 4, .6, .2, BladeTex)
  rotate 90*x
  translate <4, -0.7, 0.2>
  }


// ground plane, light, camera
plane { y, -3 texture { pigment { checker } } }

light_source { <1, 1, -1>*100, 1}

#camera { location  <-6, 10, -15> look_at -y angle 25 }


//----- END OF ROTOR ------------------------------------------------


Post a reply to this message

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