Monday, 7 April 2014

Barnsley fern


The Barnsley Fern was created by Michael Barnsley using an iterated function system.
Barnsley's Fern animated

















The attractor of the iterated function system given by the set of "fern functions"
f_1(x,y)=[0.85 0.04; -0.04 0.85][x; y]+[0.00; 1.60]
(1)
f_2(x,y)=[-0.15 0.28; 0.26 0.24][x; y]+[0.00; 0.44]
(2)
f_3(x,y)=[0.20 -0.26; 0.23 0.22][x; y]+[0.00; 1.60]
(3)
f_4(x,y)=[0.00 0.00; 0.00 0.16][x; y]


 references : http://mathforum.org/mathimages/index.php/Barnsley_Fern
                     http://math.kendallhunt.com/documents/precalculus3/Activities/Barnsley%27s%20Fractal%20Fern%20Worksheet.pdf
http://mathworld.wolfram.com/BarnsleysFern.html












Other RSL Models


Oren–Nayar diffuse reflectance model

 It has been shown to accurately predict the appearance of a wide range of natural surfaces, such as concrete, plaster, sand, etc.

 

Here is a comparison with other models 

Oren-Nayar model Torrance-Sparrow model Microfacet model for refraction
Rough opaque diffuse surfaces Rough opaque specular surfaces (glossy surfaces) Rough transparent surfaces
Each facet is Lambertian (diffuse) Each facet is a mirror (specular) Each facet is made of glass (transparent)

 

Phong reflection model


Phong shading may also refer to the specific combination of Phong interpolation and the Phong reflection model, which is an empirical model of local illumination. It describes the way a surface reflects light as a combination of the diffuse reflection of rough surfaces with the specular reflection of shiny surfaces. It is based on Bui Tuong Phong's informal observation that shiny surfaces have small intense specular highlights, while dull surfaces have large highlights that fall off more gradually. The reflection model also includes an ambient term to account for the small amount of light that is scattered about the entire scene.

phong is the most common of all. it is a sum of the diffuse, ambient and specular creating a plastic look.

Thursday, 20 March 2014

RSL bombing






Another way to add randomness to regular patterns is to use a technique called bombing. Bombing generates random placement patterns -- regular patterns or features which are "dropped" at random positions or orientations in texture space.

We start out with a regular pattern composed of diamonds (rotated squares).






Then using the bombing technique, we randomly move the position of each diamond. The key here, and the thing that distinguishes it from a perturbed regular pattern, is that the shifting is based on the tile coordinates (column & row of the tile) and not the texture coordinates. By using the tile coordinates as the seed (input) to noise, we get the same pseudo-random value (ouput) for every point inside that tile. And that's why the regular shape is maintained. If different random values are obtained within each tile, the diamond shapes will become irregular in shape.

To reiterate, the randomness must be based on tile coordinates (col,row) -- because (col,row) are constant for each tile -- and not on texture coordinates (ss,tt) or some other variable (e.g. s,t) which varies within each tile.

Tuesday, 18 March 2014

Semi Dragon Curve Pattern

Using the ST coloration technique I created a simple semi-dragon curve.

 



Here i use a simple repeat function with RSL to have repetition of the pattern created.