colouring by heightmap surface curvature

  • 4 Replies
  • 493 Views

0 Members and 1 Guest are viewing this topic.

Online claude

  • *
  • 3f
  • ******
  • Posts: 1453
    • mathr.co.uk
« on: September 29, 2017, 03:15:26 PM »
http://graphics.zcu.cz/sscurvature.html has a reference implementation for Screen Space Curvature as a Unity shader (afaict), I ported it to C++ and tried it out on Mandelbrot iteration data considered as a heightmap (z = log(iteration count)).

Some results attached.  Seems mean curvature looks different to Gauss curvature, both look a bit like distance estimation colouring.

But it doesn't look as good as I'd hoped.

Code here: https://code.mathr.co.uk/kf-extras/blob/HEAD:/kfb-curvature.cc

Linkback: https://fractalforums.org/fractal-mathematics-and-new-theories/28/colouring-by-heightmap-surface-curvature/383/

Offline gerrit

  • *
  • 3f
  • ******
  • Posts: 2101
« Reply #1 on: October 09, 2017, 02:30:06 AM »
Perhaps a problem is the numerical second derivatives in the curvature formula.

I wonder if an analytic formula for curvature can be found  by tracking \( d^2z_n/dc^2 \) during the iterations similar to tracking the first derivative with the analytic distance estimation method.

Offline gerrit

  • *
  • 3f
  • ******
  • Posts: 2101
« Reply #2 on: October 12, 2017, 01:12:43 AM »
I tried something which is probably not directly "curvature" but uses the second derivative.
As the usual DE is \( DE = |G(c)/G'(c)| \) with G the Douady Hubbard potential (exp(-smoothed iteration)) I
tried \( DDE = |G/G''| \) with G'' second dervative computed analytically in the iterations.

Results are perhaps interesting, looking like DE but with little "swamp lights" which persists to any depth I've checked.
Below two examples; left is usual DE, right "DDE". Tweaking it by for example \( DDE = |G'/G''| \) looks similar.

Offline gerrit

  • *
  • 3f
  • ******
  • Posts: 2101
« Reply #3 on: October 12, 2017, 04:29:58 AM »
Actually I think G'/G'' looks better than G/G''. The former is probably a more natural generalization of the DE.
\( DE = 1/(log(G))' \) and the modified DDE (G'/G'') is just \(  DDE = 1/(log(G'))' \), whereas G/G'' is nothing in particular.

Below example of G/G'' (top) and G'/G''.

Offline gerrit

  • *
  • 3f
  • ******
  • Posts: 2101
« Reply #4 on: October 12, 2017, 05:23:19 AM »
Another interesting aspect of the DDE = G'/G'' is that it seems to show (better) the minis embedded in the filaments.
See below example (left DE, right DDE).


xx
Heightmap Hybrid

Started by Kalter Rauch on Fractal Image Gallery

2 Replies
132 Views
Last post June 16, 2018, 07:35:51 PM
by Kalter Rauch
xx
mandelbrot heightmap

Started by birational on Fractal Image Gallery

1 Replies
129 Views
Last post August 28, 2018, 03:21:53 PM
by Bill Snowzell
xx
Kali's Amazing Surface

Started by 3DickUlus on Fractal Image Gallery

0 Replies
358 Views
Last post April 06, 2018, 02:07:41 AM
by 3DickUlus
exclamation
Sub Surface Scattering and 4k Fractals

Started by scaprendering on Fractal Image Gallery

4 Replies
373 Views
Last post February 19, 2020, 03:47:46 AM
by fusha
xx
The derelict (crazy surface patterns)

Started by kohlenstoff on Fractal Image Gallery

0 Replies
132 Views
Last post November 03, 2018, 01:37:44 AM
by kohlenstoff