These are chat archives for buddhi1980/mandelbulber2

2nd
Dec 2015
mclarekin
@mclarekin
Dec 02 2015 01:25
Currently in the render window, the coordinate box is located bottom right of pointer. When you move too far right or too far towards the bottom, it go out of window. Can QT make it jump to the top left when this happens?
mclarekin
@mclarekin
Dec 02 2015 03:12
In statistics "Distance of camera to fractal surface" can be quite different to any "dist:" displayed in render window coordinates box. Is this OK?
Krzysztof Marczak
@buddhi1980
Dec 02 2015 06:04
Yes, it's OK. This is estimated distance to fractal surface, which can be totally different if camera has fractal object at rear. In coronates box it's distance from camera to last pointed object (target)
Sebastian Jennen
@zebastian
Dec 02 2015 20:42

this works quite well, but is kind of ugly
got rid of the oscillation by limiting the step to full distance with fmin(delta, fabs(diff)

double diff = z - smoothLastZMouse;
if(fabs(diff) >= 1.0)
{
smoothLastZMouse += diff 0.01;
}
else
{
double delta = sqrt(fabs(diff))
0.01;
smoothLastZMouse += (diff > 0 ? 1.0 : -1.0) * fmin(delta, fabs(diff));
}

double diff = z - smoothLastZMouse;
    if(fabs(diff) >= 1.0)
    {
        smoothLastZMouse += diff * 0.01;
    }
    else
    {
        double delta = sqrt(fabs(diff)) * 0.01;
        smoothLastZMouse += (diff > 0 ? 1.0 : -1.0) * fmin(delta, fabs(diff));
    }
thats better