News: Check out the originating "3d Mandelbulb" thread here
 
*
Welcome, Guest. Please login or register. July 01, 2015, 02:00:58 AM


Login with username, password and session length



Pages: 1 [2]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: endlos - A multithreaded fractal generator in Java  (Read 7480 times)
0 Members and 1 Guest are viewing this topic.
Jestre
Guest
« Reply #15 on: January 21, 2007, 04:56:24 PM »

@Jestre: oh, that's interesting! You also run Ubuntu Edgy like me (I run the 64 Bit version and you?). But you have an Intel dual core 2GHz and I an AMD dual core 2 GHz (also 2 GB RAM). I expect the new Intel CPU being faster. Can you tell me the runtime of the demo fractal "Sun (deep)", please? It's in 0.14.0:

Well, this is a Centrino chip, so I'm sure it would run faster on the full-out version.  Regardless, it took 08:34:50.254 on the laptop.  I just let it run overnight last night.  For the record, I am currently starting endlos with:

 /opt/java6/bin/java -Dsun.java2d.opengl=true -cp ./endlos.jar de.dentaku.endlos.Endlos &

That's a very cool fractal.  I'd love to have that as my wallpaper, but I can't imagine how long it would take if the screen size were set to 1400x900 or whatever.  One thing I found interesting is that it started from the vertical borders and worked towards the center.  Somehow I assumed these things were generated from the center point outward, but again I've no clue in that regard smiley

I am going to get 0.15 and I may let it run overnight again to see if that changes anything.


Logged
dentaku2
Guest
« Reply #16 on: January 22, 2007, 09:07:30 AM »

Are you running 64 Bit Ubuntu or 32 Bit Ubuntu?

You can run endlos via

Code:
java -jar endlos.jar

instead of explicit classpath and class. This is prefered as the file 'endlos.jar' won't change but the class/package names may change.

The demo "Four Comets" takes about 00:01:30 with 0.15.0 - and less than 30 seconds with 0.16.0 (in development) ... that's a 70% speed gain just by technical code optimization. No tricks or other shortcuts - still brute force!  wink
« Last Edit: January 22, 2007, 11:41:59 PM by dentaku2 » Logged
dentaku2
Guest
« Reply #17 on: January 26, 2007, 03:23:19 AM »

Code:
2007-01-26 : Version 0.16.0 - speed & effects
---------------------------

CHANGED:
  1. Improved speed of fast (float/double) precision: demo fractal "Four Comets" is 75% faster!
  2. Checkbox 'Anti-Aliasing' removed - see new tabs Rendering and Effects ('blur').
  3. Decreased precision of demo fractal "Sun" from 34 to 22. It's now 30% faster.

FIXED:
  1. Flickering of image during color cycling via mouse. Cycling is also a little faster.

NEW:
  1. Effects tabulator. Post process an image with several filters (Spin, Blur, Emboss, etc.).
  2. Rendering tabulator. Set misc rendering hints for image manipulation.
  3. Improve speed by using the Java parameter "-XX:MaxTenuringThreshold":
 
     java -server -XX:MaxTenuringThreshold=31 -jar endlos.jar
     
     With this parameter, the "Sun" demo fractal is 3% faster with my configuration.

Logged
dentaku2
Guest
« Reply #18 on: February 03, 2007, 12:27:48 AM »

Code:
2007-02-02 : Version 0.17.0 - new fractals
---------------------------

CHANGED:
  1. Fractal definition XML file. To migrate your old XML files replace
          <type>Mandelbrot</type>
     by   <class>de.dentaku.endlos.fractals.Mandelbrot</class>
     and equivalent with the Julia type:
          <type>Julia</type>
     by   <class>de.dentaku.endlos.fractals.Julia</class>
  2. Popup menu items "Open Mandelbrot", "Open Julia" replaced by "Open new fractal".
  3. Removed fast float datatype as it just bloats the code without any real benefit.
     (The fast double datatype is good enough.)
  4. Several GUI changes as a preparation to generalize the iterator and introduce
     custom fractals.
     
NEW:
  1. 9 new fractal types available: Barnsley's, Peterson's, Magnetic, Manowar Mandelbrot
     and Julia sets; Spider.
  2. New demo fractal "Spider".

Logged
Nahee_Enterprises
World Renowned
Fractal Senior
******
Posts: 2250


use email to contact


nahee_enterprises Nahee.Enterprises NaheeEnterprise
WWW
« Reply #19 on: February 03, 2007, 12:46:13 AM »

M. Hilpert (dentaku) wrote:
>
> CHANGED:
>  1. & 2. & 3. & 4.  .....
> NEW:
>  1.  9 new fractal types available:  Barnsley's, Peterson's, Magnetic,
>      Manowar Mandelbrot and Julia sets; Spider.

Some nice changes to your application, especially the addition of those formulae.  The Barnsley has always been one of my favorites.

Logged

dentaku2
Guest
« Reply #20 on: February 12, 2007, 07:43:18 AM »

Code:
2007-02-12 : Version 0.18.0
---------------------------

CHANGED:
  1. Fractal definition XML file. Migration:
     <real>           => <x>
     <imaginary>      => <y>
     <real0>          => <x0>
     <imaginary0>     => <y0>
     <width>/<height> => <imageDimension>
  2. Introduced color formulas (alpha). Instead of just switching between classic and smoothed
     coloring, a list box offers several coloring methods. So far, only one additional test algorithm
     "Function" - look how the colors change when you cycle them with the mouse wheel ... 8-
     
FIXED:
  1. Rendering hints weren't used for post processing image effects.
  2. Progress update now at least after each block line to see progress for block/image draw modes.
  3. Real number of threads (= number of blocks) weren't set in text field which also could lead
     to a progress state of > 100%.

NEW:
  1. Negative exponents supported in fast precision mode (16). So far, negative exponents were treated
     as exponent 0. Now, negative exponents are correctly treated. Thanks to Paul Bourke's site
     http://local.wasp.uwa.edu.au/~pbourke/fractals/mandelpower/ that shows examples.
  2. Demo fractal 'Dubai'.
  3. Move location (up, down, left, right) via buttons (10% per click).
  4. Image dimension presets.
Logged
dentaku2
Guest
« Reply #21 on: February 22, 2007, 10:22:26 PM »

endlos 0.19.0


Code:
2007-02-22 : Version 0.19.0 - flexibel formulas
---------------------------

CHANGED:
  1. Fractal definition XML file. Migration:
     <x0> => <custom><cr>
     <y0> => <custom><ci>
  2. Tabular "Fractal" is full generic now, i.e. all fractals are decoupled from the main
     iterator.

FIXED:
  1. Open new fractal didn't use the mouse click location.

NEW:
  1. Parameters of formulas configurable in settings GUI.
  2. Demo fractals "Blossom", "Eye", "Protozoan".
  3. Fractal class "Newton".
Logged
Nahee_Enterprises
World Renowned
Fractal Senior
******
Posts: 2250


use email to contact


nahee_enterprises Nahee.Enterprises NaheeEnterprise
WWW
« Reply #22 on: February 22, 2007, 10:46:12 PM »

M. Hilpert (dentaku2) wrote:
>
>   CHANGED:  1. & 2.
>   FIXED:  1.
>   NEW:  1. & 2. &  3. Fractal class "Newton".

Glad to see the Newtons added in.    smiley

Thanks for these recent updates!!

Logged

quaestor
Forums Newbie
*
Posts: 7


« Reply #23 on: February 26, 2007, 07:07:56 AM »

I wasn't sure if this was the right place, since this is an announcement forum, but here goes;
Love endlos!! I always like well-made programs written in Java.
As long as I switch from Beryl to Metacity before I start endlos, I have no problems (so far smiley ) using both -server and -Dsun.java2d.opengl=true

I have two small critiques:
1. Thread Count goes from 4 to 9 with no intermediates
2. On my "short" screen (800px tall), the default layout is a little tight. I couldn't access the child window's bottom border without some serious re-jiggering, which was a problem as nearly all of the property-sheet tabs were hidden. It would help a little if the window list at the bottom of the main window could be hidden (preference?).

Some numbers, all with "idle" system (single runs; i.e. not average):
Default Mandelbrot
prioritythreadstime
54:02.330
59:02.648
94:02.231
99:02.205
Dubai Demo
prioritythreadstime
54:10.244
59:09.995
94:10.770
99:10.583


Here're my specs, as dentaku seemed curious about people's rigs:

Sun Java 6 (from Ubuntu backports repo), started with
java -server -Xmx768m -XX:+UseBiasedLocking -XX:MaxTenuringThreshold=31 -XX:+UseParNewGC -Dsun.java2d.opengl=true -jar endlos.jar

Hardware
Compaq Presario R3000z CTO (laptop)
AMD Athlon 64 Processor 3400+ (2.2GHz), IM L2 cache, mmx sse sse2 mmxext 3dnowext 3dnow (32-bit OS, though)
1.5G PC2700 DDR RAM
nForce 3 mobo chipset
GeForce4 440 Go 64MB dedicated
15" WXGA LCD screen (1280x800)

Software
Ubuntu 6.10 "Edgy" (x32; mostly stock with latest updates)
Nvidia binary driver (latest available)

Thanks a bunch and keep up the great work!

q
Logged
lycium
Fractal Schemer
****
Posts: 960



WWW
« Reply #24 on: February 26, 2007, 06:52:46 PM »

....


I have two small critiques:
1. Thread Count goes from 4 to 9 with no intermediates

i'm guessing he spawns a thread per (regular) anti-aliasing sample; that really shouldn't be the case, particularly as N gets to be 4 or 5 - thread creation and management isn't free, and that N^2 will become a bottleneck very soon...

the app should spawn as many threads as there are (logical) cores, and then do load balancing.
Logged

Nahee_Enterprises
World Renowned
Fractal Senior
******
Posts: 2250


use email to contact


nahee_enterprises Nahee.Enterprises NaheeEnterprise
WWW
« Reply #25 on: February 26, 2007, 08:35:53 PM »

Ben Alkov (quaestor) wrote:
>
>    I wasn't sure if this was the right place, since this is an
>    announcement forum, but here goes;  Love endlos!!

Greetings, and welcome to this Forum!!    smiley

And yes, Thomas Ludwig (lycium) has done some nice things with his application over the past few months.

Anyway, just thought I would say hello to a new member.
 
 
Logged

dentaku2
Guest
« Reply #26 on: March 02, 2007, 09:30:51 PM »

I have two small critiques:
1. Thread Count goes from 4 to 9 with no intermediates
2. On my "short" screen (800px tall), the default layout is a little tight. I couldn't access the child window's bottom border without some serious re-jiggering, which was a problem as nearly all of the property-sheet tabs were hidden. It would help a little if the window list at the bottom of the main window could be hidden (preference?).

Hi! I'm the author of endlos. For your point 1: that's okay. the number of threads need to be the same as the number of blocks the image is divided. It
's easier to tile the image every increase by 1 row and 1 column. Therefore, the number of threads is 1, 4, 9, 16, 25, 36, ...n*n = n^2.

o

oo
oo

ooo
ooo
ooo

...


My first versions had a linear increase (1,2 , 3, 4, 5, 6, ...) but I didn't like the image blocks as they just were horizontal or vertical bars. With the current tiling, the calculated places are better scattered over the screen. Anyway, it doesn't matter much if you use 8 instead of 9 threads. It's also not the best idea to use as many threads as there are cores because in most images, the first finishing thread wouldn't have to do anything as the remaining threads are calculating. It's better to have more threads than cores as thread switching is less expensive than idle cores at the end. It's no big difference to use 9 or 16 or 25 threads during calcualtion - but the more threads you have, the less remaining image part needs to be calculated by less threads than cores. So, having waiting cores at the end of an image is much more expensive than thread switching during the major part of the image. Just test for yourself. And that's the reason why it doesn't really hurt to have a non-linear thread increase. But it looks better!  cool

For your point 2: so, there are still people out there with screens smaller than 1024x768 ... hmmm. The "the window list at the bottom" is no special feature of mine - it's automatically done by Java's desktop feature. It also looks different depending on the Look&Feel you use. E.g. the Java (metal) look and feel has no such window icon border - it's just iconifies the windows and you can maximize a window that covers those minimized icons.

As you can see on your single core computer there's no real difference between 4 or 9 threads. Dubai takes about 5 seconds on my Athlon X2 3800+ with 4 threads and about 4.3 seconds with 9 threads. (Average on calculating several times).
« Last Edit: March 02, 2007, 10:27:22 PM by dentaku2 » Logged
lycium
Fractal Schemer
****
Posts: 960



WWW
« Reply #27 on: March 03, 2007, 06:22:37 PM »

a much better way to do your multithreaded processing is to have N worker threads do interleaved scanlines. there's plenty of parallelism to go around without resorting to splitting threaded work at the subpixel (!!) level; futhermore, unless there are extremely regular correlations in the image (causing different execution times) it should result in good (even) workload distribution. the threads do not share data at all and write to independent memory regions...

why on earth did you split it at the aa level?! tongue stuck out this forces a square number of threads unless you get funky with precomputed antialiasing patterns (having toroidal symmetry), and since cpu cores come in powers of two usually that's 1, 4, 16, 64, etc., and each thread's results must then be gathered and combined, written again, ...

edit: i see the threading isn't relaeted to antialiasing at all, but the final image dimensions. interleaved threading will provide much better load balancing than blocked will, and when you add antialiasing into the mix (long render times...) it'll make a significant difference.
« Last Edit: March 03, 2007, 06:30:09 PM by lycium » Logged

dentaku2
Guest
« Reply #28 on: March 05, 2007, 02:20:37 AM »

endlos V 0.20.0



Code:
2007-03-05 : Version 0.20.0 - threads & color functions
---------------------------

CHANGED:
  1. Coloring function "Function" renamed to "Function1". Migration: in you fractal XML
     files, rename value of <colorMode>:
     
     <colorMode>Function</colorMode>   to   <colorMode>Function1</colorMode>
     
  2. Misc. GUI changes.
  3. Thread count is not squared anymore. The image is now tiled into the exact number
     of threads. This leads to misc image tiling depending on the possible tile factors.

FIXED:
  1. Randomize colors didn't work for deep iterations.
  2. Demo fractal settings were reused so that once a demo fractal was changed,
     the new fractal hasen't used it's saved settings but the last changed.

NEW:
  1. Cycle through color maps with mouse wheel when mouse pointer is over color
     maps list.
  2. Eighteen new coloring functions.
  3. New post processing effects 'posterize', 'threshold', 'rotate'.
Logged
dentaku2
Guest
« Reply #29 on: March 30, 2007, 08:25:21 AM »

Code:
2007-03-30 : Version 1.0.0 - 2D fractals
--------------------------

CHANGED:
  1. Default number of threads is number of (virtual) processors. On a dual core or a
     pentium with hyper threading this will be 2. This will use the theoretical optimal
     number of threads by default.
  2. Pause button replaced by CPU usage slider for fine grained system load.
     (0% same as former pause.)
Logged
Pages: 1 [2]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
The Colarity fractal flame generator Announcements & News Nahee_Enterprises 1 5972 Last post February 23, 2007, 12:42:12 PM
by Nahee_Enterprises
Fractal Explorer - fast fractal generator for Android Smartphones / Mobile Devices Black 6 3149 Last post November 29, 2010, 10:18:20 AM
by Cyclops
Fractacular ... a freeware Java generator with multiple algorithms Fractal Programs ChristopherLowe 1 2091 Last post October 16, 2011, 05:41:27 AM
by ChristopherLowe
Fractal tree generator Landscape/Terrain Generation zomg 8 4202 Last post February 13, 2014, 02:48:19 PM
by KRAFTWERK
Online Fractal Generator Fractal Website of the Month top-quark 3 726 Last post June 19, 2014, 06:41:32 PM
by caoslover

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.522 seconds with 30 queries. (Pretty URLs adds 0.01s, 2q)