Logo by CorneliaYoder - 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. April 23, 2024, 08:31:17 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] 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: Collatz fractal  (Read 6397 times)
0 Members and 1 Guest are viewing this topic.
claude
Fractal Bachius
*
Posts: 563



WWW
« on: April 10, 2016, 11:54:06 PM »







* collatz.frag (1.26 KB - downloaded 142 times.)
Logged
zebastian
Conqueror
*******
Posts: 121



« Reply #1 on: April 11, 2016, 05:45:27 PM »

really nice, claude.

from your code
https://mathr.co.uk/blog/2016-04-10_collatz_fractal.html
i was able to generalize the formula to 3d with good distance estimation, this is the formula in mandelbulber:

void CollatzIteration(CVector3 &z, sExtendedAux &aux)
{
   CVector3 xV(1.0, 1.0, 1.0);
   z = xV + 4.0 * z
      - CVector3(xV + 2.0 * z)
            * z.RotateAroundVectorByAngle(xV, M_PI);
   z /= 4.0;
   aux.DE = aux.DE * 4.0 + 1.0;
}

attached images are all the same object from different points of view.


* collatz1.jpg (70.41 KB, 500x500 - viewed 2000 times.)

* collatz2.jpg (71.6 KB, 500x500 - viewed 2064 times.)

* collatz3.jpg (81.3 KB, 500x500 - viewed 1843 times.)
Logged
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #2 on: April 12, 2016, 10:19:05 AM »

Nice fractal, claude  smiley

void CollatzIteration(CVector3 &z, sExtendedAux &aux)
{
   CVector3 xV(1.0, 1.0, 1.0);
   z = xV + 4.0 * z
      - CVector3(xV + 2.0 * z)
            * z.RotateAroundVectorByAngle(xV, M_PI);
   z /= 4.0;
   aux.DE = aux.DE * 4.0 + 1.0;
}
Nice shape!
Is that possible to adapt this code for Fragmentarium?
Logged

mclarekin
Fractal Senior
******
Posts: 1739



« Reply #3 on: April 12, 2016, 10:24:56 AM »

with Add Cpixel.  Step multiplier a slow .01


* collatz aa2 800.jpg (59.63 KB, 800x400 - viewed 430 times.)
Logged
zebastian
Conqueror
*******
Posts: 121



« Reply #4 on: April 12, 2016, 02:03:56 PM »

@Crist-JRoger
>> Is that possible to adapt this code for Fragmentarium?

Yes, should be adoptable. The vector arithmetic should be mostly self explaining, you can find the implementation here:
https://github.com/buddhi1980/mandelbulber2/blob/master/mandelbulber2/src/algebra.cpp
https://github.com/buddhi1980/mandelbulber2/blob/master/mandelbulber2/src/algebra.cpp

All changes made to mandelbulber for adding Collatz iteration you can find here:
https://github.com/buddhi1980/mandelbulber2/commit/50097e6added17a3af5faafee21948178f281349

most importantly are the changes to compute_fractal.cpp. If you start the fractal in fragmentarium you are probably best of starting with a menger sponge and adopting the ray marching function to something like the CollatzIteration.
ray marching step multiplier should be down to 0.1 or even lower. otherwise the fractal starts to disappear from the outside in.
Let me know, if you have any questions about that.

@mclarekin: cool image! its hard to get a low DE miss with this formular. also nice coloring.  grin
cheers!

Logged
laser blaster
Iterator
*
Posts: 178


« Reply #5 on: April 14, 2016, 04:14:21 PM »

(I have to put something here so the forum doesn't reject this as a duplicate post... )

This is really cool! I've seen this fractal before, but the use of DE coloring almost made me not recognize it at first - it really brings out all the details.

Anyway, I realized that you could change the constants in the formula to make a whole family of Julia sets based on this formula. There are 4 complex constants in the formula, so that makes an 8-dimensional parameter space (the "/4" at the end of the formula is technically another constant, but it's redundant with the others).

Next up would be to make a Mandelbrot set for this formula, however to render it properly I'd need to derive the critical points ( I think the sin/cos based fractals have an infinite no. of critical points and are therefore hard to render properly, but I think there's a trick to it. I read some pdf's on it a long time ago, I'll see what I can dig up).


* collatz2.jpg (229.49 KB, 1440x1080 - viewed 503 times.)
Logged
laser blaster
Iterator
*
Posts: 178


« Reply #6 on: April 14, 2016, 04:16:36 PM »

Another screenie.

I'll post the .frag file, but first I need to down-convert it back to single precision. I converted it to emulated double precision for deeper zooms, but it's slow, relies on 2 custom include files, and requires a newer GPU as I use the fma function for faster emulated double multiplication. So I think my high-precision version would be more trouble than it's worth for most of you. But I'll be happy to share if you want it.


* collatz3.jpg (193.65 KB, 933x825 - viewed 457 times.)
« Last Edit: April 14, 2016, 04:28:21 PM by laser blaster » Logged
laser blaster
Iterator
*
Posts: 178


« Reply #7 on: April 14, 2016, 04:34:24 PM »

Two more!


* collatz1.jpg (114.21 KB, 933x700 - viewed 359 times.)

* collatz4.jpg (115.11 KB, 700x700 - viewed 356 times.)
Logged
claude
Fractal Bachius
*
Posts: 563



WWW
« Reply #8 on: April 14, 2016, 06:04:34 PM »

nice!
Logged
laser blaster
Iterator
*
Posts: 178


« Reply #9 on: April 15, 2016, 12:46:10 AM »

Here's the .frag with the Julia parameters:

* collatz.frag (1.76 KB - downloaded 139 times.)
Logged
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #10 on: April 15, 2016, 02:19:32 AM »

It would be cool if the beauty of the 2D antennae features posted by Claude could be replicated in 3D, but so far the best use of this formula in 3D that I have found, is in making hybrids.  I  coded variable parameters for all constants, (including /4 and Pi).  This image is using the Collatz fractal as a pre-transform of 1 iteration before the menger sponge, the "Collatz parameter controls" allows for interesting manipulation of the Menger Sponge


* collatz menger hybrid.jpg (201.1 KB, 1200x1200 - viewed 429 times.)
Logged
Mrz00m
Fractal Lover
**
Posts: 204


« Reply #11 on: April 15, 2016, 08:38:28 AM »

awesome collatz, it would be interesting to see collatz in ultrafractal or some kind of deep zoom program, and see it in color.

The menger sponge is awesome! i want to print it in 3d!!! perhaps just pring one of them, but in distorted timespace!:)
Logged
laser blaster
Iterator
*
Posts: 178


« Reply #12 on: April 16, 2016, 12:28:14 AM »

I'm finding this formula really fascinating so far. Mclarekin had a good idea of replacing pi with a parameter, which gives some of the coolest variations in 2D. I've found that the most interesting shapes can be found with all real values for the parameters. Complex values can give nice results too, but often look similar to quadratic and cubic Julias which are old news. There are new and alien looking shapes things all over the parameter space, but most of them seem to be clustered near the real-valued parameters.

There's one thing really interesting I noticed - some of these Julia sets almost have a kind of shape stacking. I've been studying the default-valued set in particular. As you move out further along the main antenna, you find period doubled versions of previous shapes. Sometimes you find what looks to be two previous shapes shape-stacked together. You can't do any shape stacking by zooming in, only by moving further out along any antenna. I'm trying to figure out what the "ancestry" of each shape along the main western antenna is, along with what pattern they follow. Perhaps the ancestry path of each integer-centered body along the real line corresponds to the path taken by it's central point when iterated under the Collatz function? Just speculation so far.

Anyway, this fractal is cool. I hope to see some pictures from more talented explorers.
Logged
stardust4ever
Fractal Bachius
*
Posts: 513



« Reply #13 on: April 16, 2016, 07:39:41 AM »

I've been fascinated on and off for some time by the Collatz postulate, with how every positive integer always reverts back to a 4-2-1 loop, no matter what. And if you allow negatives, there are a finite number of additional known loops. Some particularly hard numbers grow to quite impressively high values before eventually regressing to the aformentioned 4-2-1 loop.

I'm more interested in this unique fractal and any hidden details it may hold at higher values. Is it Mandelbrot-like increasing complexity or relative sameness? I've seen a few renders but I don't understand how it is calculated. If it uses trig, then an arbirary precision library for it would be bog-slow compared to deep-zoom Mandelbrots.

Also is there a plugin for UF5? I own a basic license for Ultra Fractal but haven't done much with it in the past several years since I got obsessed with deep zoom fractal exploration, and my second and third order abs() fractal sets got incorporated into Fractal Extreme plugins and Kalles Fraktaler. UF5 is far too slow for doing any arbitrary deep zoom stuff.
 afro

Edit: No trig at all! I just read the following writeup which is quite fascinating:
http://jlpe.tripod.com/collatz/cfractal.pdf

It does require a complex abs() necessitating the square root function which would complicate arbitrary precision zooming. The Collatz fractal has two different versions based upon whether it uses the ceiling or floor of the complex absolute value to determine evenness or oddity, and computes the result based on whether the fractal eventually converges on 4-2-1 or escapes without bound. And I suppose one could develop an exterior coloring technique based on how quickly it escapes to some arbitrarily large bailout, or internally based upon how long slowly it converges on 4-2-1. This might make the boundary of the set highly ornate, even in monochrome, with fractal details on both edges of the curve if both inner and outer coloring methods are employed.
« Last Edit: April 16, 2016, 08:04:47 AM by stardust4ever » Logged
claude
Fractal Bachius
*
Posts: 563



WWW
« Reply #14 on: April 16, 2016, 01:03:03 PM »

Edit: No trig at all! I just read the following writeup which is quite fascinating:
http://jlpe.tripod.com/collatz/cfractal.pdf

That's a different Collatz fractal, I copied the one from Wikipedia which does have trig ( https://en.wikipedia.org/wiki/Collatz_conjecture#Iterating_on_real_or_complex_numbers ).

I tried a quaternion implementation too (copying the cos() function from Boost), but didn't get anything interesting-looking.
Logged
Pages: [1] 2   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
collatz conjecture graph in processing General Discussion ker2x 6 3080 Last post October 08, 2010, 10:31:20 AM
by jehovajah
Fractal in "Collatz iteration" Other types Khaotik 0 6526 Last post October 30, 2011, 06:41:13 AM
by Khaotik
exponential fractal, logarithm fractal, sinus fractal Mandelbrot & Julia Set hgjf2 7 25162 Last post January 20, 2017, 04:01:12 AM
by SamTiba
collatz fractal extension (new) Theories & Research M Benesi 2 454 Last post January 31, 2014, 05:22:39 PM
by s31415
MBox Collatz Hybrid Mandelbulber Gallery mclarekin 0 917 Last post April 13, 2016, 12:02:33 PM
by mclarekin

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.221 seconds with 28 queries. (Pretty URLs adds 0.013s, 2q)