POV-Ray : Newsgroups : povray.newusers : Hi! Needin' some help with some stuff. : Re: Hi! Needin' some help with some stuff. Server Time
5 Jul 2024 04:42:29 EDT (-0400)
  Re: Hi! Needin' some help with some stuff.  
From: MCC900
Date: 4 Jul 2010 19:45:00
Message: <web.4c311c63edcc201f27e72c8f0@news.povray.org>
I have another question...
See, I was playing around with isosurfaces and created one for making a
cylinder:

isosurface {
  function {sqrt(x*x+z*z)-1}
        threshold 0
        accuracy 0.001
        max_gradient 4
        contained_by{sphere{0,2}}
        pigment {rgb 1}
}


Pretty simple stuff.
The thing is, that if I enclose the function sqrt(x*x+z*z)-1 with the abs()
command...

isosurface {
  function {abs(sqrt(x*x+z*z)-1)}
        threshold 0
        accuracy 0.001
        max_gradient 4
        contained_by{sphere{0,2}}
        pigment {rgb 1}
}


The cylinder is not shown anymore!
I just don't get it...
If the result of sqrt(x*x+z*z)-1 is 0, when I find the absolute value of it, it
should still be 0... and if it's any other value, it shouldn't matter, as when I
find the absolute value of it it would not be 0 anyway...
So the isosurface should exist in the same area that the one without the abs()
command. Or not?
I need some help here, as I'm trying to create some more complex isosurfaces
using the abs() command, and I can't get on it if I still can't understand how
isosurfaces work...
I thought that if you take any point inside the isosurface's container, replace
the x, y and z values in the function for the values of the point, and the
result of the operation is equal to the threshold, the isosurface exists in that
point...
Is that correct?


Post a reply to this message

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