Logo by KRAFTWERK - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Did you know ? you can use LaTex inside Postings on fractalforums.com!
 
*
Welcome, Guest. Please login or register. November 29, 2025, 08:35:56 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: 1 ... 23 24 [25] 26 27 ... 30   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: Kalles Fraktaler 2  (Read 151668 times)
0 Members and 1 Guest are viewing this topic.
Botond Kósa
Fractal Lover
**
Posts: 233



WWW
« Reply #360 on: May 19, 2014, 02:10:54 PM »

Here is a snippet of the very calculation of the reference:
Code:
for(i=0;i<m_nMaxIter && !m_bStop;i++){
m_db_dxr[i] = xr.ToDouble();
m_db_dxi[i] = xi.ToDouble();
m_db_z[i] = (m_db_dxr[i]*m_db_dxr[i] + m_db_dxi[i]*m_db_dxi[i])*0.0000001;

xin = (xr*xi).Double() + m_iref;
xrn = sr - si + m_rref;
xr = xrn;
xi = xin;
sr = xr.Square();
si = xi.Square();
m_nRDone++;
}

I suppose you store the full precision numbers in arrays inside sr/si/xr/xi. How are they stored exactly? In int or long arrays? Do you store decimal or binary digits? How many digits are stored in an int/long value?
Logged

Check out my Mandelbrot set explorer:
http://web.t-online.hu/kbotond/mandelmachine/
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #361 on: May 19, 2014, 06:15:53 PM »

I suppose you store the full precision numbers in arrays inside sr/si/xr/xi. How are they stored exactly? In int or long arrays? Do you store decimal or binary digits? How many digits are stored in an int/long value?
Yes, these are of type CFixedFloat.
The full precision numbers are stored in an array of 64-bit integers.
They are limited to 8 decimal digits per integer in the array.

So... perhaps the "Lattice multiplication" method could allow me to have more digits per integer, as long as I use the Microsoft specific routines to multiply them and have them stored in two integers.
It could perhaps be a little more effective if they would be stored as binary values, so that bit-wise AND, OR and shift operations could be used instead of modulus, division etc.

http://www.chillheimer.de/kallesfraktaler/fractal_src%202.5.zip
Logged

Want to create DEEP Mandelbrot fractals 100 times faster than the commercial programs, for FREE? One hour or one minute? Three months or one day? Try Kalles Fraktaler http://www.chillheimer.de/kallesfraktaler
http://www.facebook.com/kallesfraktaler
laser blaster
Iterator
*
Posts: 178


« Reply #362 on: May 19, 2014, 06:28:04 PM »

I have a couple of tips about arbitrary precision arithmetic. I once wrote my own arbitrary precision math functions for my own fractal zoomer. Nothing came of it, though.

Don't use base 10. It adds extra overhead and is only useful for banking and accounting. Use the full range of the native integer type on the target machine as the arithmetic base.

For good performance, it's essential to use inline assembly or intrinsic functions to access the carry bit from addition, and to access the full 128-bit result of multiplying two 64-bit integers (on 32-bit machines, halve those numbers).

There's also this fantastic article on hpdz.net about arbitrary-precision math for fractals (these may be the articles you mentioned earlier): http://www.hpdz.net/TechInfo/Bignum.htm

It has great tips such as halving the number of multiplications needed for a bignum multiplication (which introduces error, but it's more efficient to use this trick and simply increase precision to compensate), and halving it once again for squaring .It also covers karatsuba multiplication, which I would recommend using for very high precisions (the savings will eventually greatly outweigh the costs of the extra carries), although it's not a good fit for SSE instructions, as the article mentions.
Logged
Botond Kósa
Fractal Lover
**
Posts: 233



WWW
« Reply #363 on: May 19, 2014, 08:59:22 PM »

Laser blaster summed it up very well. One more thing to add: you can avoid multiplication and replace it with a squaring (which is about twice as fast) using an algebraic trick. Details can be found in the following article written by Bruce Dawson, author of Fractal eXtreme:
http://randomascii.wordpress.com/2011/08/13/faster-fractals-through-algebra/
Logged

Check out my Mandelbrot set explorer:
http://web.t-online.hu/kbotond/mandelmachine/
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #364 on: May 19, 2014, 09:36:48 PM »

sorry, no I don't have.
if you know how to set this up, let me know, and we'll do this

if you have access to webserver logs...

$> grep fraktal_sft64.zip /var/log/www-access.log | wc -l

will tell you how many times the file has been accessed on *nix machines smiley


Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
youhn
Fractal Molossus
**
Posts: 696


Shapes only exists in our heads.


« Reply #365 on: May 19, 2014, 09:52:49 PM »

I want to use Kalles Fraktaler to make zoom video, but I'm having some troubles. I'm running Kalles through wine on Linux and would like to produce a serie of still images, which I can scale back to get AA pictures. Then I want to use ffmpeg of mencoder to create the actual video. Is there a way to script it from command line? Or another way to produce large series of images?
Logged
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #366 on: May 19, 2014, 10:05:47 PM »

Thanks for the articles.
Of those I had already read and adopt one of them, i.e. the maximum precision truncates the result of a multiplication, and squaring can reuse the same result from a*b and b*a.
I just tested the square instead of multiplication trick, and it reduces the time to calculate an e8000 reference with 60000 iterations from 1:10 to 0:47 minute, so I can save a little but not revolutionary much...

I think the main drawback with my implementation is that each integer in the array only store 8 decimal digits. If they could store full 64-bit binary values and be multiplied to a 128 bit result, and implemented in assembler, I guess that would probably make it a couple of times faster.

I want to use Kalles Fraktaler to make zoom video, but I'm having some troubles. I'm running Kalles through wine on Linux and would like to produce a serie of still images, which I can scale back to get AA pictures. Then I want to use ffmpeg of mencoder to create the actual video. Is there a way to script it from command line? Or another way to produce large series of images?
You have the option to store additional jpeg images for each frame on a zoom sequence.
There will still be kfb files, so you have to remove these manually if you don't want them.
You can choose to store them in highest quality so that you don't loose too much quality.
« Last Edit: May 19, 2014, 10:12:51 PM by Kalles Fraktaler » Logged

Want to create DEEP Mandelbrot fractals 100 times faster than the commercial programs, for FREE? One hour or one minute? Three months or one day? Try Kalles Fraktaler http://www.chillheimer.de/kallesfraktaler
http://www.facebook.com/kallesfraktaler
youhn
Fractal Molossus
**
Posts: 696


Shapes only exists in our heads.


« Reply #367 on: May 20, 2014, 07:46:41 PM »

Maybe I'm looking in the wrong corner, but I cannot seem to find a way to create good enough series of images. The function "Store Zoom-out images" seems broken (or just does not work correctly running it under Wine in Linux?). Both the kfb and jpg files are created and the numbering in the filenames seems OK. But after some images have been calculated, it seems to hang on just 1 location. Only the first and last few are good, everything in between are duplicated of 1 image.

In the keyframemovie.exe program I don't see an option for storing all (30 fps) images as jpg.
Logged
marius
Fractal Lover
**
Posts: 206


« Reply #368 on: May 21, 2014, 12:39:39 AM »

I just tested the square instead of multiplication trick, and it reduces the time to calculate an e8000 reference with 60000 iterations from 1:10 to 0:47 minute, so I can save a little but not revolutionary much...

I think the main drawback with my implementation is that each integer in the array only store 8 decimal digits. If they could store full 64-bit binary values and be multiplied to a 128 bit result, and implemented in assembler, I guess that would probably make it a couple of times faster.

Just pointing out the obvious:
e8000 is 1000 "digits" in your notation? Thus a simple multiply (non-karatsuba) would be order of 1000x1000 operations.
e8000 in 64 bit would be 125 "digits". Thus 125x125 operations. That makes it 64x faster.. might be worth the hassle, perhaps?

Also, computers are binary machines. Doing such computations in decimal is a crime against their nature  tongue stuck out
Logged
Botond Kósa
Fractal Lover
**
Posts: 233



WWW
« Reply #369 on: May 21, 2014, 01:44:05 AM »

Just pointing out the obvious:
e8000 is 1000 "digits" in your notation? Thus a simple multiply (non-karatsuba) would be order of 1000x1000 operations.
e8000 in 64 bit would be 125 "digits". Thus 125x125 operations. That makes it 64x faster.. might be worth the hassle, perhaps?

Also, computers are binary machines. Doing such computations in decimal is a crime against their nature  tongue stuck out

e8000 is 8000 decimal digits, this equals to 8000 * log210 = 26575 binary digits, and this equals 416 words (assuming 64-bit word length). So it would need 416x416 operations in binary, that is only about 5 times faster.
Logged

Check out my Mandelbrot set explorer:
http://web.t-online.hu/kbotond/mandelmachine/
marius
Fractal Lover
**
Posts: 206


« Reply #370 on: May 21, 2014, 05:05:35 AM »

e8000 is 8000 decimal digits, this equals to 8000 * log210 = 26575 binary digits, and this equals 416 words (assuming 64-bit word length). So it would need 416x416 operations in binary, that is only about 5 times faster.

Good point, duh. It seemed excessive when I did the math in my head but what's a factor of 10 among friends? grin
Logged
SeryZone
Strange Attractor
***
Posts: 253


Contemplate...


« Reply #371 on: May 21, 2014, 06:38:36 AM »

Heehee... My location is useful, isn't it?
P.s. Who knows, what does it means:
sfufpd or shufps ymm1, ymm2 and after binary code??? How it works?
Logged

Botond Kósa
Fractal Lover
**
Posts: 233



WWW
« Reply #372 on: May 21, 2014, 09:22:27 AM »

Heehee... My location is useful, isn't it?
P.s. Who knows, what does it means:
sfufpd or shufps ymm1, ymm2 and after binary code??? How it works?

http://www.jaist.ac.jp/iscenter-new/mpc/altix/altixdata/opt/intel/vtune/doc/users_guide/mergedProjects/analyzer_ec/mergedProjects/reference_olh/mergedProjects/instructions/instruct32_hh/vc293.htm
http://www.jaist.ac.jp/iscenter-new/mpc/altix/altixdata/opt/intel/vtune/doc/users_guide/mergedProjects/analyzer_ec/mergedProjects/reference_olh/mergedProjects/instructions/instruct32_hh/vc292.htm

These are descriptions for the shufps and shufpd working on 128-bit xmm registers. 256-bit ymm variants work analogously, but shuffle twice as many data.
Logged

Check out my Mandelbrot set explorer:
http://web.t-online.hu/kbotond/mandelmachine/
ratcat65
Forums Freshman
**
Posts: 13


« Reply #373 on: May 21, 2014, 12:43:36 PM »

Newbie question here, i'm afraid. The last few frames of creating a zoom out movie are painfully slow to render. I'm currently stuck rendering a mandelbrot at 1.5 million iterations which is absurd. Is there some way to render these final few keyframes at a more realistic resolution? I tried cancelling the render and then lowering the iterations and then refresh but the program just renders that one frame and stops. If i try to restart the zoom out it just goes back to 1.5 million iters again.
Logged
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #374 on: May 21, 2014, 12:56:11 PM »

Ratcat65 - lower the iterations and restart the zoom sequence - but not with the "resume" menu option but instead with the "store zoom sequence" menu. The program keeps track of previous rendered files and their numbers. 
I will make an update within short with this issue fixed. There is a risk though that it will be an issue with the extreme movies like the YouTube user "fractal universe" creates, so I need to test it...
Logged

Want to create DEEP Mandelbrot fractals 100 times faster than the commercial programs, for FREE? One hour or one minute? Three months or one day? Try Kalles Fraktaler http://www.chillheimer.de/kallesfraktaler
http://www.facebook.com/kallesfraktaler
Pages: 1 ... 23 24 [25] 26 27 ... 30   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Superfractalthing or Kalles Fraktaler General Discussion paolo 6 11926 Last post January 27, 2014, 12:08:08 PM
by panzerboy
Kalles Fraktaler 95 (Sery'z Edition) Movies Showcase (Rate My Movie) SeryZone 2 10051 Last post July 11, 2014, 09:12:32 PM
by SeryZone
4k zoom mix - Kalles Fraktaler Movies Showcase (Rate My Movie) Fractal Kaleidoscope 2 10416 Last post July 19, 2014, 02:48:23 PM
by SeryZone
Kalles Fraktaler 2.5.7 Kalles Fraktaler « 1 2 » Kalles Fraktaler 20 26339 Last post October 25, 2017, 07:26:34 PM
by Mrz00m

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

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