Welcome to Fractal Forums

Fractal Math, Chaos Theory & Research => (new) Theories & Research => Topic started by: Tglad on March 04, 2010, 01:30:28 AM




Title: real colour fractals
Post by: Tglad on March 04, 2010, 01:30:28 AM
Surprisingly it may be possible to give 3d fractals their real colour, rather than inventing a spectrum.
Pigment colours have their colour because their molecules absorb or scatter light at different frequencies that match the excitation levels of the molecule, something we can't know for a fractal.
But there is also structural colouring http://en.wikipedia.org/wiki/Color#Structural_color (http://en.wikipedia.org/wiki/Color#Structural_color) which often gives the colour for bird's feathers or butterfly wings. This is simply based on the shape of the surface at the scale of light's wavelength (around 0.5e-6 metres). Light scatters/absorbs depending on whether the shape undulates with the same wavelength as the incoming light.

This may not require a super computer at all (but would require knowing a good physicist!), If we make 1 unit a metre long then the Mandelbox is 12m high, and renders regularly use 1e-6 solid thresholds. My naive way to compute the colour would be along these lines.
-Render with 3x3 anti-aliasing, and consider the 9 pixel square when colouring the middle pixel.
-Do a Fourier transform on the depth of those 9*9 points to get the spectrum of the surface in different directions. (much like what jpegs do on 8*8 patches)
-Absorb (or scatter?) each incoming wavelength that matches the surface wavelength in the direction of the incoming light
-This gives a reflected spectrum that gives the reflected colour.
(9*9 points is small, more would be needed for better colour definition)

A real working algorithm would need to be much more sophisticated, and rendering may be slow, but it would be 'real', and an accurate enough computation would match the colour of an otherwise colourless version of the fractal that was built with nanometre accuracy. It would probably also provide gloss information (how mirror-like vs mat it is), which gives the specularity. Custom pigment colours could be added underneath, but by default the fractal could be coloured using only 1 free parameter, how big the fractal is in metres.

Does anyone know any more about this sort of thing?


Title: Re: real colour fractals
Post by: Timeroot on March 04, 2010, 05:06:53 AM
That sounds very interesting... so would it otherwise look "clear"? Or black? Or white? For example, the whipped cream areas of a Quat Julia probably wouldn't cause any coloring, right? So how would they appear?  :hmh: I suppose that, in any case, this would accentuate the difference between conformal and non-conformal fractals.

Perhaps this could also be applied to 2D fractals, neh? Would that work?


Title: Re: real colour fractals
Post by: Tglad on March 04, 2010, 07:29:29 AM
There's diffraction colouring and refraction colouring. You could probably simulate either with enough processing power. Assuming the object is opaque then you only get diffraction colouring...

So I think a surface with no texture would appear like a mirror, just as a completely flat (and hard) wall reflects an echo clearly. This would be the default surface for something without fractal detail, like a box. The whipped cream areas still have detail in one axis, so might have a glean like glossy hair, but really not sure.

The ribbon areas in this pic http://www.fractalforums.com/index.php?action=gallery;sa=view;id=1631 (http://www.fractalforums.com/index.php?action=gallery;sa=view;id=1631) may appear mat and perhaps white, because they are smooth but at really close up they have surface detail (I think) which scatters the light.

You could kind of do it on 2d fractals, if you turned them into a height map. I would expect 2d fractal spirals to change hue as they spiral in, since the texture remains similar but reduces in scale, so scatters different frequencies as the scale reduces. We'd be talking about the colour of the boundary, as the inside and outside would have no fractal detail, so be mirror-like.

I just found this beautiful example of diffraction colouring http://www.opalsdownunder.com.au/articles/colour.php (http://www.opalsdownunder.com.au/articles/colour.php)


Title: Re: real colour fractals
Post by: kram1032 on March 04, 2010, 09:04:49 PM
I think, it wouldn't be required to do heightmaps of 2D-fractals.
It should also work to just plot light-rays a bit different.
Lycium did a 2D-raytracer a few years ago.
I think, the main difference next to being just 2D is, that you basically can see the full lightray, rather than just where it finally hits the surface of something and gets reflected into your camera. (it wouldn't work that way, as you either see just 1D if you use a camera directly on the 2D-plane or, if you're in the bird's perspective above, light wouldn't ever get reflected upward. it would stay in the plane. Thus, it's nessecary to plot the ray-path rather than the ray-hit-point :))
Those images looked pretty beautiful and I guess, with a propper alogrithm, it should be possible to create a 2D variant of that.

The 2D variant should be simpler than the 3D one :)


Title: Re: real colour fractals
Post by: Jesse on March 04, 2010, 10:39:17 PM
...
This may not require a super computer at all (but would require knowing a good physicist!), If we make 1 unit a metre long then the Mandelbox is 12m high, and renders regularly use 1e-6 solid thresholds. My naive way to compute the colour would be along these lines.
-Render with 3x3 anti-aliasing, and consider the 9 pixel square when colouring the middle pixel.
-Do a Fourier transform on the depth of those 9*9 points to get the spectrum of the surface in different directions. (much like what jpegs do on 8*8 patches)
-Absorb (or scatter?) each incoming wavelength that matches the surface wavelength in the direction of the incoming light
-This gives a reflected spectrum that gives the reflected colour.
(9*9 points is small, more would be needed for better colour definition)

Interesting idea, my aproach would maybe to calculate the DE's for these 9x9 points in the othogonal direction to the vector from the viewpoint to the lightsource and sum 1 unit vectors with the rotation of the DE's value to give the resulting amount of light.

Scaling of the DE's values according to the wavelength would be enough to generate the R, G and B values and maybe less than 9x9 values could give a first aproach. Not so much time consuming, like calculating an extra ray for a shadow. (if this works)