POV-Ray : Newsgroups : povray.advanced-users : Editing or creating an image or heightfield in POV-Ray : Re: Editing or creating an image or heightfield in POV-Ray Server Time
26 Jul 2024 19:47:52 EDT (-0400)
  Re: Editing or creating an image or heightfield in POV-Ray  
From: ingo
Date: 13 Sep 2023 13:35:00
Message: <web.6501f2555742124017bac71e8ffb8ce3@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:

> Thanks for the pointer, Ingo!
>

Here's an other version, using a patter function for the structure. First a
union{hf box} then the intersection.

An other option, if you want to shape an island, in the insert menu/special
shapes/meshmaker.inc/p_cylinder_crackle2 shows how to do displacement of mesh
vertices. This in principle works for all things one can make with the mesh
macros. You could extrude the island shape and then deform the mesh or build the
island shape with multiple splines.

---%<------%<------%<---

// PoVRay 3.7 Scene File " hf_intersection_2.pov"
// author:  ingo
// date:    2023-09-13
//--------------------------------------------------------------------------

#version 3.7;
global_settings{ assumed_gamma 1.0 }
#default{ finish{ ambient 0.1 diffuse 0.7 }}

camera {
  perspective angle 5               // front view
  location  <20.0 , 0.0 ,-40.0>
  right     x*image_width/image_height
  look_at   <0.0 , 0.0 , 0.0>
}

light_source{< 3000, 3000,-6000> rgb 1}

sky_sphere {
  pigment {
    gradient <0,1,0>
    color_map {
      [0.00 rgb <0.6,0.7,1.0>]
      [0.35 rgb <0.1,0.0,0.8>]
      [0.65 rgb <0.1,0.0,0.8>]
      [1.00 rgb <0.6,0.7,1.0>]
    }
    scale 2
  }
}


#declare Rock = union {
  intersection{
    height_field {
      function 1000,1000 {
        pattern {
          gradient -y
          scale .1
          turbulence 0.7
          octaves 12
          lambda 1.5
          omega 0.3
        }
      }
    }
    box{0,1.001}
    scale <1,0.05,1>
  }
  box{<0,0,0>,<1,-1,1>}
  translate <-0.5,0.5,-0.5>
}

intersection{
  object{
    Rock
    translate <0,-0.1,0>
    pigment{rgb 1}
  }

  object{
    Rock
    rotate <-90,0,0>
    translate <0,0,0.1>
    pigment{rgb 1}
  }

  object{
    Rock
    rotate <90,90,0>
    translate <-0.1,0,0>
    pigment{rgb 1}
  }

  rotate <-45,0,0>
}

---%<------%<------%<---

You can modify the patterns in the HF_function with the functions in
https://ingoogni.nl/download/Gradients.zip


ingo


Post a reply to this message

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