Home » Extra libraries, Code snippets, applications etc. » Applications created with U++ » Orbit Fractal (Martin Attractor) Render
|
Re: Orbit Fractal (Martin Attractor) Render [message #49089 is a reply to message #49088] |
Sat, 16 December 2017 19:19  |
ren42
Messages: 12 Registered: July 2006
|
Promising Member |
|
|
So, here it is:
The source package OrbitFractal (Attachment).
Compiled with TheIde 2017.1 Clang compiler. OS: Linux OpenSuse Leap 42.2
I see no problem for compiling it on other OS as well, that are supported by TheIde.
Here is the core function of my app that does the magic:
void OrbitFractalv2::Render()
{
/*
Algorithm found here:
http://www.fraktalwelt.de/myhome/simpiter2.htm
Thanks to Ulrich Schwebinghaus
*/
ticks++;
if (ticks==3){
ticks=0;
penColor = Color(Random(255), Random(255), Random(255));
}
for(int i = 0; i < counter; i++){
xx = y - (sign(x)) * sqrt(abs(b * x - c));
yy = a - x;
x = xx*2; y = yy*2;
x = xx; y = yy;
iw.DrawEllipse(int(x)+p.x, int(y)+p.y, 1, 1, penColor, Null, penColor);
}
image = iw;
Refresh();
}
Using the app is quite easy;
Just click the New or Start button, sit back and watch 
To stop click Stop. Then render is paused.
To continue click Continue button (Label has changed from Start to Continue).
To create a new fractal click... you guess it:New.
The parameters of a new Fractal will randomly changed, so you will
(with high probability) get unique looking fractals.
In this version there is no load/save function and resize possible... BUT it is free:)
I still have to learn much more c++11 stuff...
Please tell me, what you think 
Best regards,
ren42
|
|
|
Goto Forum:
Current Time: Tue May 13 17:11:54 CEST 2025
Total time taken to generate the page: 0.02675 seconds
|