POV-Ray : Newsgroups : povray.advanced-users : Inaccurate sqrt-function? : Inaccurate sqrt-function? Server Time
29 Jul 2024 14:23:34 EDT (-0400)
  Inaccurate sqrt-function?  
From: Tim Nikias
Date: 10 Dec 2001 18:43:54
Message: <3C154855.4DC3D893@gmx.de>
Hi there!

I've experienced this problem with POV3.1 and 3.5, so I think it's just
some
detailed-calculation-problem kinda thing.

What I am doing:
I have blob-particles which vary in size, something around .5 and 4 in
radius.
The threshold is .2, the strength of each particle is 1.

When calculating an actual radius of the particle based on the distinct
settings,
I'd have to resolve the density-algorithm from

density=strength*pow( 1- pow( distance/radius) ,2) ,2)

to

distance = radius*sqrt( 1-sqrt( density/strength) )

Now, I'm thinking:
Is this solution the right one or not? I've interpreted density from the
docs
as threshold value, which is the only way the whole algorithm makes
sense.

The problem:
The components hover around. If they have larger radius than average
value
of 2 (which is the base value that is being turbulenced by random value
with algorithm: (rand(Seed)*2-1)*Percentage_Of_Turbulence/100) ),
they intersect the ground plane, if they are smaller, they hover above.
Strange is, that with unmodified radius, they are on the exact position
they're
supposed to. So changing the radius in the above mentioned algorithm
should
solve the problem, but somehow, doesn't.

The scene this takes place in is rather huge, and since I'm using a
whole
include-system for particles around it, it's rather useless to post
something.
I'll come up with an easy version and post it sometime later.

Hope somebody knows a solution to this one...

Tim


Post a reply to this message

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