povray
povray copied to clipboard
Port of FS202 - Numerical oddities in Julia_Fractal
http://bugs.povray.org/task/202
Details
I understand that some things have changed in the way certain computations in POV-Ray decide when something is "good enough" and I think this is biting me in Julia_Fractal (where, of course, the highest-resolution computations are needed).
The bug has been posted here:
http://news.povray.org/povray.bugreports/thread/%3Cweb.4dbf2e26b56a53c15b4449250%40news.povray.org%3E/
Including a short .pov file and instructions that reproduce it.
(It pops up in other configurations and view angles as well, but this one captures in in a way that makes it clear it's a bug: the distance of the camera from the origin appears to change the shape of the rendered object).
This appeared first on a Windows Server 2003 machine, it is apparently confirmable on at least one other system as per that thread.
See attached zip:
Comments
Comment by Grimbert Jérôme (Le_Forgeron) - Saturday, 07 May 2011, 13:08 GMT+5
Just to have all resources here, the relevant code: (see FS202.zip) There is something about cam_distance changing from 0.7 for 0.
Comment by Grimbert Jérôme (Le_Forgeron) - Saturday, 07 May 2011, 14:07 GMT+5
Please notice: with 0.5 as cam_distance, the camera is inside the bounding box of the fractal
Min : -9.680,-9.680,-7.690 Max : 9.680,9.680,7.690
Which means the camera is probably in the object too.
Using a camera 10 time further (and an angle 10 time narrow, which is a different view) does not produce the same issue.
With original camera, and cam_distance = 0.5+clock/5, there is a visible clipping on frame 14 of 31 (+KI0 +KF1 +KFI0 +KFF30 +H400 +W640) That's cam_distance 0.59333 , with a camera at 5.911,0.297,0.517
Comment by Christoph Lipka (clipka) - Monday, 09 May 2011, 13:46 GMT+5
So we probably do have a (pretty old) bug that causes unexpected clipping of fractals when the camera is inside the bounding box.
(No, the camera is not inside the "object" (i.e. part of the actual julia set); that would look much different. If you'd approximate the julia set with tori you'd most certainly not get any clipping.)
Comment by Sven Geier (SGeier) - Tuesday, 10 May 2011, 00:34 GMT+5
Yeah, if you copy the Axis_ and AxisXYZ macros from one of the the Basic_Scene_M... files and modify the POV file like this:
union {
julia_fractal{ <-1.483,0,-0.0,-0.025>
...
}
object{ AxisXYZ( 3.5, 3.5, 3.5, Texture_A_Dark, Texture_A_Light)}
rotate <0,110,-45>
}
you can see that the object itself only extends to ~1.5 units in the y- and z- directions. Also the axes themselves (i.e. the cylinders that are drawn to represent them) are not clipped, only the object. (image attached)
HOWEVER this cannot really be clipping of the object by the camera plane, (at least not the way I understand clipping) since the rings close when you move the camera closer. I.e. there is 'clipping' when the camera is moved away from the object (larger cam_distance) but it goes away when I move the camera closer in. Moving the camera ten times farther and making the angle ten times closer does NOT resolve this.
If anything, apparently I need to move the camera even closer in to prevent this.
At cam_distance=0.4 (and angle=60) the object looks like I would expect a Julia set to look like, at cam_distance=0.5 the outer ring starts breaking up and at cam_distance=0.7 (and angle=45) it is wide open. (other image attached for comparison) JuliaTest04.png (226.3 KiB) JuliaTest07.png (186.5 KiB)
Comment by Sven Geier (SGeier) - Friday, 13 May 2011, 06:51 GMT+5
Here's a small animation, that shows the problem not just in the large ring, but also in the smaller ones.
The only thing that changes with clock is the camera location; I am letting it intentionally go through the large ring on the way "out":
#declare cam_distance = 0.6 + 0.55*cos(clock/180*pi);
#declare z_a = 5*sin(clock/180*pi);
camera { angle 60
location <10, .5, z_a> * cam_distance
the rest is as posted before(clock obviously goes 1..360);
If this was an isosurface{}, I would say the max_gradient needs to be higher. JuliaTest000.avi (7.9 MiB)
For the records: As a long-standing bug, this is probably not something we want to tackle in a hurry while we prepare for v3.8.0 release.