Title: Mandelbox DE formula Post by: khyperia on March 30, 2012, 09:19:05 PM This formula, a modified one from http://blog.hvidtfeldts.net/index.php/2011/11/distance-estimated-3d-fractals-vi-the-mandelbox/ (http://blog.hvidtfeldts.net/index.php/2011/11/distance-estimated-3d-fractals-vi-the-mandelbox/), isn't working. Well, for scales above 1, it is, but for negative scales it isn't. Personally, I think negative scale mandelboxes are better, so I really want to get this working. I've basically narrowed the problem down to this core forumla. (Language is C#, 100% my own program (excluding the copy-pasta'd formulae), example render http://khyperia.tumblr.com/post/20060287683/moar-renders (http://khyperia.tumblr.com/post/20060287683/moar-renders))
Code: public static float DistanceEstimator(Vector3 z) Can anyone spot an error that would screw negative scales up? Title: Re: Mandelbox DE formula Post by: bib on March 30, 2012, 09:51:01 PM the copy-pasta'd formulae That must be Darkbeam's formula for sure :D (the spaghetti coder) Title: Re: Mandelbox DE formula Post by: Syntopia on March 31, 2012, 01:09:02 AM Hi,
For negative values, you'd need the abs(scale) for the running derivative: Code: dr = dr * Math.abs(Settings.scale) + 1.0f; Title: Re: Mandelbox DE formula Post by: DarkBeam on March 31, 2012, 10:09:23 AM That must be Darkbeam's formula for sure :D (the spaghetti coder) Oh well, somebody tries to imitate me ... Curse him! :evil:Title: Re: Mandelbox DE formula Post by: David Makin on April 01, 2012, 02:41:04 PM That must be Darkbeam's formula for sure :D (the spaghetti coder) Darkbeam's code....spaghetti ??? You have seen my UF code ? :D Title: Re: Mandelbox DE formula Post by: DarkBeam on April 04, 2012, 01:48:32 PM It is well done! Mine is the worst possible trust me! :banana: :chilli: :banana: |