POV-Ray : Newsgroups : povray.text.scene-files : Cinder Block (full and half size) Server Time
28 Jul 2024 18:13:51 EDT (-0400)
  Cinder Block (full and half size) (Message 1 to 2 of 2)  
From: Bob Hughes
Subject: Cinder Block (full and half size)
Date: 20 Aug 1999 05:41:15
Message: <37bd22bb@news.povray.org>
/* Cinder Block (measured from real one, though not guaranteed
accurate */
#declare CinderBlock=
difference {
 box {-1,1 scale <15.5,7.36,7.36>/2}
 superellipsoid {<.4,.4> scale <3,4.5,2.67> translate -3.45*x}
 superellipsoid {<.4,.4> scale <3,4.5,2.67> translate 3.45*x}
/* uncomment the following two lines for end indentations, otherwise
makes corner block */
 superellipsoid {<.4,.4> scale <1,5,2.5> translate -8.25*x}
 superellipsoid {<.4,.4> scale <1,5,2.5> translate 8.25*x}

  pigment {granite frequency 8 color_map {
                [.2 color rgb .75]
                [.7 color rgb .9]
  } triangle_wave }
   normal {granite -.1 frequency 8 triangle_wave}
    finish {ambient .15 diffuse .7 specular .05 roughness .5}
}

object {CinderBlock} /* actual object */

#declare CinderBlockHalf=  /* the Half Block variety */
difference {
 box {-1,1 scale <15.5,7.36,7.36>/2}
 superellipsoid {<.4,.4> scale <3,4.25,2.25> translate -3.45*x}
 superellipsoid {<.4,.4> scale <3,4.25,2.25> translate 3.45*x}

  pigment {granite frequency 8 color_map {
                [.2 color rgb .75]
                [.7 color rgb .9]
  } triangle_wave }
   normal {granite -.1 frequency 8 triangle_wave}
    finish {ambient .15 diffuse .7 specular .05 roughness .5}
 scale <1,1,.5>
}

object {CinderBlockHalf} /* actual object */


/*Bob*/


--
omniVERSE


Post a reply to this message

From: Bob Hughes
Subject: Re: Cinder Block Update
Date: 25 Aug 1999 12:30:28
Message: <37c41a24@news.povray.org>
// Persistence of Vision Ray Tracer Scene Description File
// File: cinderblock.pov
// Vers: 3.1
// Desc: the masonry called cinder block
// Date: 99.65
// Auth: Bob Hughes  mailto:inv### [at] aolcom?Subject=PoV-Scene
/* Note: if no AA is used the texture will not look right, advice is
to use AA of at least default amount. Mortar has been put in a little
unrealisticly, just so you know. This isn't the best of scripts, there
is no real end-use defined. Giving it up so I can move on again,
however anyone should be able to throw the individual blocks together
somehow; it is after all a scene file instead of a include. I hope
I've made this clear enough to read okay. Good luck. */


global_settings {
        assumed_gamma 2.4
        max_trace_level 8
        ambient_light <1.4,1.5,1.6>*.9
     radiosity {
       brightness 3
       count 123
       distance_maximum 25
       error_bound 0.4
       gray_threshold 0.5
       low_error_factor 0.7
       minimum_reuse 0.012
       nearest_count 6
       recursion_limit 1
     }
}

/* User selectables */

// light factor for texture finish; use smaller number in brighter, or
more lights [.75 to 1.5 typical]
#declare LF = .9;  // this is experimental
// painted surface? (textures the -z surfaces)
#declare Painted = yes;  // can be yes only if Special is "no"
// corner block?
#declare Corner = no;
// mortar at end?
#declare MortarEnd = yes;
// special test? (diagonal half painted blocks)
#declare Special = yes; // can be yes or no only if Painted is "yes"
or "no"


/* lights, camera */

// camera location
#declare CX = 50;
#declare CY = 50;
#declare CZ = -50;

// main light
light_source { 0,<1.3,1.275,1.25>*(1.125/(LF*.825))*.9
       // area_light <5,0,0>,<0,5,0>,3,3 jitter adaptive 1
     translate -100*z rotate <45,45,0>
}
// fill light
light_source { <33,50,75>,<.2,.225,.25>*1.5 }

camera
{
  location  <CX,CY,CZ>
  angle 33
  look_at   <1.67,3.3,0>
}

/* Environment */

sky_sphere  // morning
{
  pigment
  {
    gradient y
 color_map {
 [0.0 color rgb<1.0,0.825,0.675>] [1.0 color rgb<0.45,0.55,0.75>] }
  }
}

// ground
plane {y,0 pigment {rgb<.7,.65,.625>} normal {wrinkles .2} finish
{ambient .15 diffuse .8}}

/* Textures */

#declare MortarTexture=
 texture {
  pigment {granite frequency 5 color_map {
                [.1 color rgb .825]
                [.2 color rgb .925]
                [.4 color rgb .85]
                [.5 color rgb .8]
                [.8 color rgb .85]
  } ramp_wave }
   normal {granite -.2 frequency 5 sine_wave}
    finish {ambient <.1333,.15,.1667>*(LF/1.125) diffuse
.79*(1.125/LF)
            specular .09 roughness .2 brilliance .8 crand .025}
  scale <1/8,1,1> /* only adjusted for set of example blocks (comment
out if single block
                      without Special used) */
    }

#declare CinderTexture=
 texture {
  pigment {granite frequency 3 color_map {
                [.1 color rgb .6]
                [.2 color rgb .9]
                [.4 color rgb .75]
                [.5 color rgb .85]
                [.8 color rgb .7]
  } scallop_wave }
   normal {granite -.6 frequency 3 ramp_wave}
    finish {ambient <.1333,.15,.1667>*(LF/1.125) diffuse
.72*(1.125/LF)
            specular .03 roughness .4 brilliance .6 crand .05}
  scale <1/8,1,1> /* only adjusted for set of example blocks (comment
out if single block
                      without Special used) */
 }

#declare YellowPaintM=
 texture {MortarTexture}
 texture {pigment {gradient z color_map {
                        [.025 color rgb<.9,.75,.5>*1.25]
                        [.05 color rgbf 1]
                        } ramp_wave }
                normal {granite .125 scale .33}
                finish {ambient .125 diffuse .7 specular .1 roughness
.09 phong .05 phong_size 10
                        reflection .025 reflection_exponent .6}
  scale 3.75
   scale <1/8,1,2> /* only adjusted for set of example blocks (comment
out if single block
                      without Special used) */
    translate -3.8*z}

#declare YellowPaintC=
 texture {CinderTexture}
 texture {pigment {gradient z color_map {
                        [.025 color rgb<.9,.75,.5>*1.25]
                        [.05 color rgbf 1]
                        } ramp_wave }
                normal {granite .125 scale .36}
                finish {ambient .125 diffuse .7 specular .1 roughness
.09 phong .05 phong_size 10
                        reflection .05 reflection_exponent .4}
  scale 3.75
   scale <1/8,1,2> /* only adjusted for set of example blocks (comment
out if single block
                      without Special used) */
    translate -3.8*z}

#declare ClearPaint= // no paint
 texture {pigment {rgbf 1}}

/* Mortar */

#if (MortarEnd=yes)
#declare Mortar=
union {
         // union {
// end
difference {
 superellipsoid {<.1,.1> scale <.36,3.85,3.75> translate <8,-.05,0>}
 cylinder {-z,z,1 scale <.575,4.8,.25> translate <8,0,-3.875>}
 cylinder {-z,z,1 scale <.575,4.8,.25> translate <8,0,3.875>}
// end cut
#if (Corner=no)
 superellipsoid {<.4,.4> scale <1,5,2.5> translate 8*x}
#end
// }
/*
// opposite end mortar
difference {
 superellipsoid {<.1,.1> scale <.36,3.85,3.75> translate <8,-.05,0>}
 cylinder {-z,z,1 scale <.575,4.8,.25> translate <8,0,-3.875>}
 cylinder {-z,z,1 scale <.575,4.8,.25> translate <8,0,3.875>}
#if (Corner=off)
 superellipsoid {<.4,.4> scale <1,5,2.5> translate 8*x}
#end
 }
*/
  translate 4.15*y
}
// bottom
difference {
 superellipsoid {<.1,.1> scale <8.5,.36,3.75> translate .125*x}
 cylinder {-x,x,1 scale <9,.525,.2> translate <0,0,-3.8>}
 cylinder {-x,x,1 scale <9,.525,.2> translate <0,0,3.8>}
// hole cutouts
 superellipsoid {<.4,.4> scale <3,7,2.67> translate <-3.45,-2.125,0>}
 superellipsoid {<.4,.4> scale <3,7,2.67> translate <3.45,-2.125,0>}
// end cuts
#if (Corner=no)
 superellipsoid {<.4,.4> scale <1,5,2.5> translate -8.25*x}
 superellipsoid {<.4,.4> scale <1,5,2.5> translate 8.25*x}
#end
 }
// texturing
 #if (Special=no)  // special use
#if (Painted=yes)
texture {gradient x frequency 1 texture_map {
        [1 YellowPaintM]
        } ramp_wave scale <8,1,1> // rotate <0,0,45>
 }
#else
  texture {MortarTexture}  // normal use
#end
 #end  // Special

  translate -3.65*y
}

#else

// base mortar only
#declare Mortar=
difference {
 superellipsoid {<.1,.1> scale <8.5,.36,3.75> translate .125*x}
 cylinder {-x,x,1 scale <9,.525,.2> translate <0,0,-3.8>}
 cylinder {-x,x,1 scale <9,.525,.2> translate <0,0,3.8>}
// hole cutouts
 superellipsoid {<.4,.4> scale <3,7,2.67> translate <-3.45,-2.125,0>}
 superellipsoid {<.4,.4> scale <3,7,2.67> translate <3.45,-2.125,0>}
// end cuts
#if (Corner=off)
 superellipsoid {<.4,.4> scale <1,5,2.5> translate -8.25*x}
 superellipsoid {<.4,.4> scale <1,5,2.5> translate 8.25*x}
#end
// texturing
 #if (Special=no)  // special use
#if (Painted=yes)
texture {gradient x frequency 1 texture_map {
        [1 YellowPaintM]
        } ramp_wave scale <8,1,1> // rotate <0,0,45>
 }
#else
  texture {MortarTexture}
#end
 #end // Special

  translate -3.65*y
}
#end

// object {Mortar translate 4*y}

/* Block */

// half block
#declare CinderBlockHalf=
difference {
 box {-1,1 scale <15.5,7.36,7.36>/2}
 superellipsoid {<.4,.4> scale <3,4.25,2.25> translate -3.45*x}
 superellipsoid {<.4,.4> scale <3,4.25,2.25> translate 3.45*x}
// texturing
 #if (Special=no)
#if (Painted=yes)
texture {gradient x frequency 1 texture_map {
        [1 YellowPaintC]
        } ramp_wave scale <8,1,1> // rotate <0,0,45>
 }
#else
  texture {CinderTexture}
#end
 #end  // Special

 scale <1,1,.5>
}

// object {CinderBlockHalf}

// full block
#declare CinderBlock=
// union {
//        object {Mortar}
difference {
 // box {-1,1
superellipsoid {<.05,.05> scale <15.5,7.36,7.36>/2}
 superellipsoid {<.3,.3> scale <3,7,2.67> translate <-3.45,-2.125,0>}
 superellipsoid {<.3,.3> scale <3,7,2.67> translate <3.45,-2.125,0>}
#if (Corner=off)
 superellipsoid {<.3,.3> scale <1,5,2.5> translate -8.25*x}
 superellipsoid {<.3,.3> scale <1,5,2.5> translate 8.25*x}
// end slots
 superellipsoid {<.3,.3> scale <.45,5,.25> translate <-7.875,0,-3>}
 superellipsoid {<.3,.3> scale <.45,5,.25> translate <-7.875,0,3>}
 superellipsoid {<.3,.3> scale <.45,5,.25> translate <7.875,0,-3>}
 superellipsoid {<.3,.3> scale <.45,5,.25> translate <7.875,0,3>}
#end
// }
// texturing
 #if (Special=no)
#if (Painted=yes)
texture {gradient x frequency 1 texture_map {
        [1 YellowPaintC]
        } ramp_wave scale <8,1,1> // rotate <0,0,45>
 }
#else
  texture {CinderTexture}
#end
#end  // Special

}

// object {CinderBlock translate 4*y}

/* Placement (example only) */

#declare Blocks=
union {
object {CinderBlock}
object {CinderBlock translate 16*x}
object {CinderBlock translate -16*x}
object {CinderBlock translate <8,7.75,0>}
object {CinderBlock translate <-8,7.75,0>}
// texture choice
 texture {gradient x texture_map {
 #if (Special=no)  // otherwise previous texture applies
        [1 YellowPaintC scale <1/6,1,1>]
 #else
        [.45 YellowPaintC scale <1/6,1,1>]
        [.55 CinderTexture scale <1/8,1,1>]
 #end
 } scale <26.5,1,1>  // stretch size to these blocks
  rotate 45*z  // angles the paint line
   translate -8.5*x // positions to one end
   }

 translate 4*y  // raise above ground at y=0
}

#declare Mortars=
union {
object {Mortar}
object {Mortar translate 16*x}
object {Mortar translate -16*x}
object {Mortar translate <8,7.5,0>}
object {Mortar translate <-8,7.5,0>}
// texture choice
 texture {gradient x texture_map {
 #if (Special=no)  // otherwise previous texture applies
        [1 YellowPaintM scale <1/6,1,1>]
 #else
        [.45 YellowPaintM scale <1/6,1,1>]
        [.55 MortarTexture scale <1/8,1,1>]
 #end
 } scale <26.5,1,1>  // stretch size to these blocks
  rotate 45*z  // angles the paint line
   translate -8.5*x // positions to one end
   }

 translate 4*y  // raise above ground at y=0
}

/* Wall section test */

union {
object {Blocks}
object {Mortars}
}


Post a reply to this message

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