POV-Ray : Newsgroups : povray.binaries.images : A Question : A Question Server Time
30 Jul 2024 20:21:18 EDT (-0400)
  A Question  
From: Anthony D  Baye
Date: 13 Jan 2011 19:15:00
Message: <web.4d2f94d43aa0723ad7f39bd00@news.povray.org>
I'm working on a concept for a shoreline backed by Basalt columns. I'm using a
randomly tiled hexagonal pattern function with a height field and multiplying it
by f_ridged_mf

The problem I'm having is that the tops of the columns should be flat, not
slanted, so that the base offset follows the contour of f_ridged_mf, but their
height does not.

Not sure if that makes sense.

the code is as follows, Image attached at bottom.

#include "kolors.inc"
#include "functions.inc"

light_source { 1e4 1 }

camera { location 60 look_at 0 }

#declare pigA=pigment { cells
   warp { repeat z offset <-.5,10,0>}
   translate z/2
   scale <3,1,sqrt(6.75)>
}
#declare pigB=pigment { cells
   warp { repeat z offset <-.5,10,0>}
   translate <1.5,7,0>
   scale <3,1,sqrt(6.75)>
}
#declare pigC=pigment { cells
   warp { repeat z offset <-.5,10,0>}
   translate <0,-7,0>
   scale <3,1,sqrt(6.75)>
}

#declare basaltColumns =
function {
     pigment {
          hexagon
          pigment { pigA },
          pigment { pigB },
          pigment { pigC }
          rotate 90.0*x
          }
     }

sky_sphere {
     pigment {
          function { abs(y) }
          color_map {
               [0.0 rgb 1 ]
               [0.1 SkyBlue ]
               [1.0 SkyBlue ]
               }
          }
     }
/*
isosurface {
     function { y - 3.0 * basaltColumns(x,y,z).y }
     max_gradient 5206
     threshold 0
     contained_by { box { -5, 5 } }
          pigment { rgb 1 }
          finish { ambient 0.2 diffuse 0.6 }
     }*/
// f_ridged_mf(x,y,z, 0.1, 3, 7, 0.7, 0.7, 2)

object {
     height_field {
          function 512, 512 { f_ridged_mf(x*3,y*3,z*3, 0.6, 3, 7, 0.7, 0.7, 2)
                              * basaltColumns(x*60,y*60,z*60).y }
//          water_level 0.15
          }
     translate <-0.5, 0.0, -0.5>
     scale <100, 20, 100>
     pigment { White }
     }

Any advice would be appreciated.

Regards,
A.D.B.


Post a reply to this message


Attachments:
Download 'hextile.png' (341 KB)

Preview of image 'hextile.png'
hextile.png


 

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