My Account


RSS
oZone3D.Net RSS Feeds»RSS 2.0 Feeds

Blogs
»The Geeks Of 3D
»Demoniak3D Blog
»JeGX's Infamous Lab

Sponsors

Modul8: real time video mixing and compositing


Link to Us

oZone3D.Net 100% Realtime 3D

»All Links

Search
Google
Web
oZone3D.Net

Web Partners

www.benchmarkhq.ru
www.tdt3d.com
www.steph3d.net
www.g-truc.net
www.worldpcspecs.com


Banners Exchange

cgindia.blogspot.com
grapejuice.c.la
www.game-lab.com
www.cooki3d.org


Links Exchange

»CYGAD's 3DXtra
 
oZone3D.Net Hyperion Demos & Projects
Demoniak3D Julia Fractal Rendering On GPU


Stumble it! | | | |


Demoniak3D Julia Fractal
Demoniak3D Julia Fractal
Demoniak3D Julia Fractal
Demoniak3D Julia Fractal




Download


Demoniak3D Julia Fractal Demo
Win32 Executable + Source code
Zip Archive - (2894k)
Release Date: January 18, 2008
For any bug report or feedback, please send an email to jegx[AT]ozone3d[DOT]net and add "[DEMO FEEDBACK]" to the subject. Vous can also post your feedbacks in the demo's topic: Demoniak3D Demo - Julia Fractal.

Recommended configuration:
  • Operating System: Windows XP SP2
  • Processor: Pentium III or AMD Athlon and up processor - 800 MHz and up.
  • Memory: 1Gb RAM and up
  • Graphics Controller: ATI Radeon 9700 and up (with the latest Catalyst drivers) or GeForce 6600 and up (with the latest Forceware drivers)
  • Resolution: 1024x768 - 32 bits/pixel

Description

This demo of the Julia fractal rendering is based on the next pages:

The color palette is stored in an one dimensional texture (1D) and the c constant in the fractal equation varies with the time to produice the animation. This c constant is the same for all points of the Julia's set and this is the difference with the Mandelbrot rendering.

zn+1 = zn2 + c

Instructions for use:
This demo requires an OpenGL 1.5 compliant graphics card.. Unzip the archive and start START_DEMO_Julia_Fractal_GPU.bat. That's all folk!

The demo's source code is located in the DEMO_Julia_Fractal_GPU.xml file.

And as usual, if you want to experience realtime 3d coding, just go there: Demoniak3D Home Page

Here is Julia'set vertex shader in OpenGL Shading Language:

OpenGL.org

varying vec3 position;
	uniform float max_size;
	
	void main(void)
	{
		gl_Position = ftransform();
		position  = vec3(gl_MultiTexCoord0 - 0.5) * max_size;
	}

and here is the GLSL pixel shader (this is the core of the algorithm):

varying vec3 position;
uniform float center_x;
uniform float center_y;
uniform int max_iterations;
uniform sampler1D color_palette;
uniform vec2 c;

int DoJulia( float a, float b )
{
	vec2 z = vec2(a, b);
	float 	tmp, sq = dot(z, z);
	int 	counter = 0;

	while( counter<max_iterations && sq<4.0 )
	{
		tmp = z.x;
		z.x = ((tmp*tmp) - (z.y*z.y)) + c.x;
		z.y = ((2.0 * tmp) * z.y) + c.y;
		sq = dot(z, z);
		counter++;
	}
	
	return( counter );
}

void main (void)
{
	float c_real = position.x + center_x;
	float c_imag = position.y + center_y;
	int num_iterations = DoJulia( c_real, c_imag );
	if( num_iterations == max_iterations )
	{
		gl_FragColor = texture1D(color_palette, 0.0);			
	}
	else
	{
		gl_FragColor = texture1D(color_palette, 
		                         num_iterations/100.0);			
	}
}


Author Profile


=:[CODE]:=
Author:Jerome 'JeGX' Guinot
Contact:jegx [at] ozone3d [dot] net
Homepage:www.ozone3d.net




Language:


Demoniak3D
Current Version: 1.23.0
»Demoniak3D
»Download
»Libraries and Plugins
»Demos
»Online Help - Reference Guide
»Codes Samples


GPU Caps Viewer
Current Version: 1.4.2
»GPU Caps Viewer
»GPU DB Submissions


FurMark
Current Version: 1.3.0
»FurMark
»Benchmark Submissions
Page generated in 0.067525148391724 seconds.