POV-Ray : Newsgroups : povray.newusers : Isosurface troubles Server Time
4 Sep 2024 18:18:35 EDT (-0400)
  Isosurface troubles (Message 1 to 3 of 3)  
From: nathan 2002
Subject: Isosurface troubles
Date: 22 Oct 2002 13:15:17
Message: <web.3db5874eec4f27f545704aba0@news.povray.org>
The following is a scene of a narrow canyon. How do I get the groove do bend
left or right, so I can see the canyon curve to the left and right(and set
the bounding box smaller) ?



// The_Gash.pov

#include "colors.inc"
#include "functions.inc"
#include "math.inc"
#include "transforms.inc"

global_settings {
  assumed_gamma 1.0
}

// ----------------------------------------

camera {
  location  <0.0, 7.0, 40.0>
  direction 1.5*z
  right     x*image_width/image_height
  look_at   <0.0, 5.0,  0.0>
}

sky_sphere {
  pigment { rgb <0.6,0.7,1.0>
  }
}

light_source {
  <0, 0, 0>            // light's position (translated below)
  color rgb <1, 1, 1>  // light's color
  translate <-10, 40, -30>
}

light_source {
  <0, 0, 0>            // light's position (translated below)
  color rgb <1, 1, 1>  // light's color
  translate <40, 10, 30>
}






// create a isosurface object - the equipotential surface
// of a 3D math function f(x, y, z)
//#declare fn_X = function(x,y,z) {  x*x + y*y - 1 + pow(2,abs(x)) }  //
cylinder function
isosurface {
  function {-pow(2,abs(x))+y-f_noise3d(x*5, y*5, z*5)*2+2-f_noise_generator
(x,y,z, 1)*2 } //open
  contained_by { box { <-40,-8,-80>, <40,16,80> } }
  accuracy 0.01
  max_gradient 4
  pigment {Brown}
 Shear_Trans(x, y, cos(z))}



plane{
 y,3  pigment { rgbf <0,0,1,.1> }
        normal{ dents turbulence <5.0, 0.6, 0.1> } interior { ior 1.33 }
finish{ ambient .1 diffuse .9 reflection 0.3 }}


Post a reply to this message

From: Mike Williams
Subject: Re: Isosurface troubles
Date: 22 Oct 2002 17:39:26
Message: <auRtmJA2Uct9EwlZ@econym.demon.co.uk>
Wasn't it nathan_2002 who wrote:
>The following is a scene of a narrow canyon. How do I get the groove do bend
>left or right, so I can see the canyon curve to the left and right(and set
>the bounding box smaller) ?

Do you mean something like

function {-pow(2,abs(x-(z*z/800)))+y-f_noise3d(x*5, y*5, z*5)*2
+2-f_noise_generator(x,y,z, 1)*2 } //open

The smaller the value (800 in the above) the tighter the curve, but if
you set it much smaller you have to move the camera so that it stays
outside the object.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: nathan 2002
Subject: Re: Isosurface troubles
Date: 25 Oct 2002 20:20:07
Message: <web.3db9dedda377afbbe86ba830@news.povray.org>
It set me in the right direction...

function {-pow(2,abs(x-(.5*z*cos(z/180))))+y-f_noise3d(x*5, y*5, z*5)*2
+2-f_noise_generator(x,y,z, 1)*2 }

is closer to what I had in mind. Thanks.


Post a reply to this message

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