Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Extra libraries, Code snippets, applications etc. » Applications created with U++ » Orbit Fractal (Martin Attractor) Render
icon7.gif  Orbit Fractal (Martin Attractor) Render [message #49088] Sat, 16 December 2017 18:30 Go to next message
ren42 is currently offline  ren42
Messages: 12
Registered: July 2006
Promising Member
Hello everybody,
after 11 Years i found my way back to do some coding again. (How could i live without Upp such a long time? Shocked ) Very Happy

I like eye candy pictures and figured out to code a fractal render with Upp.

Here is a link that explains briefly what an Martin Attractor is:
http://www.fraktalwelt.de/myhome/simpiter2.htm

Preview of OrbitFractal:

index.php?t=getfile&id=5457&private=0

The next Message or Topic will contain a description and source package Smile
Re: Orbit Fractal (Martin Attractor) Render [message #49089 is a reply to message #49088] Sat, 16 December 2017 19:19 Go to previous message
ren42 is currently offline  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 Smile

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 Smile

Best regards,
ren42

Previous Topic: U++ for wave energy assessment
Next Topic: UppCAD
Goto Forum:
  


Current Time: Thu Apr 18 03:52:09 CEST 2024

Total time taken to generate the page: 0.01884 seconds