POV-Ray : Newsgroups : povray.general : Simple math question : Re: Simple math question Server Time
30 Jul 2024 12:29:16 EDT (-0400)
  Re: Simple math question  
From: triple r
Date: 15 Feb 2009 01:00:00
Message: <web.4997aeb1240b718bef2b9ba40@news.povray.org>
some_yahoo <209### [at] gmailcom> wrote:
> Sorry I cant really use this unless you tell me where the variables nx, ny, nz,
epsilon came from.

Sorry.  nx is the number of steps you take in the 'x' variable.  That is, (0,
0.25, 0.5, 0.75, 1.0) would correspond to nx=5.  The same goes for ny and nz.
As I said, I tested this in Matlab, so you would have to change 'x,' 'y,' and
'z,' to another name since those are reserved in POV-Ray.  Other than that, the
syntax, I believe, should be okay.  epsilon is  just any sufficiently small
number.  1.0e-5, for example.  This is because, as you ran into, 1.0 > 1.0 may
be true or false in floating point arithmetic, but 1.0 > 1.0+1e-5  will always
be false in floating point, given sufficient precision.  Sorry for the
confusion.

 - Ricky


Post a reply to this message

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