POV-Ray : Newsgroups : povray.general : Isosurfaces : Isosurfaces Server Time
1 Aug 2024 06:25:58 EDT (-0400)
  Isosurfaces  
From: Ger
Date: 15 Feb 2006 09:40:58
Message: <43f33d7a@news.povray.org>
After reading the sections about isosurfaces I figured I'd have a go at it.

This is my first try at isosurfaces so most likely I'm doing something
utterly stupid.

I wanted to create a tileroof and came up with this

// creates a wavy shape along the x-axis
#declare X_Wave = function { abs(sin(x*2.5)/4) }
// creates a step shape along the z-axis
#declare Z_Step = function { (z-int(z))*0.3}

isosurface {
        function {y+(X_Wave(x,y,z)+Z_Step(x,y,z))}
        contained_by { box { <-2,-1,0>,< 2,0.55,10> } }
        pigment { red 0.6 }
        scale 5
        translate < 30,5,0>
}

The X_Wave function works as I expected but the Z_Step doesn't. It does not
produce a clean step pattern that I expected.

What am I overlooking/doing wrong ?

PS. The last time I ever looked at anything math-like was 40 years ago :)
-- 
Ger


Post a reply to this message

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