Logo by haltenny - 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: Visit us on facebook
 
*
Welcome, Guest. Please login or register. September 22, 2021, 12:33:47 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]   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: Sad Elephant  (Read 923 times)
0 Members and 1 Guest are viewing this topic.
Fractal Ken
Fractal Lover
**
Posts: 246


Proud to be 2D


« on: June 21, 2013, 06:19:00 PM »



Strange attractor
xn+1 = sin(1.52xn - 2.55) + sin(-2.70yn - 1.43)
yn+1 = sin(1.77xn + 2.82) + sin(1.58yn + 2.35)
Logged

Fortran will rise again
Kali
Fractal Supremo
*****
Posts: 1138


« Reply #1 on: June 22, 2013, 07:38:06 PM »

Superb render, Ken! Love the colors... Right now I'm playing with volumetric 3D renders, if you could translate your formula to 3D and give some hints on the code I could try to implement it using GLSL. I'd love to see a rotating 3D version of this.
Logged

|</\|_|
░░░░░░░

http://fractkali.deviantart.com/
Fractal Ken
Fractal Lover
**
Posts: 246


Proud to be 2D


« Reply #2 on: June 23, 2013, 12:31:33 AM »

Thanks, Kali! I love these attractors; they're like IFS fractals with only one transformation. I think a 3D generalization would be very feasible and look great. In case you're unaware, the old Chaoscope program generates 3D strange attractors, though I know almost nothing about it.

Let me talk about the 2D case first. I got the idea of looking at strange attractors from this post by element90. He's apparently implemented them (in a nonstandard way) in his software Saturn and Titan. I've been exploring the following generalization of Peter de Jong attractors:

xn+1 = sin(axn + b) + sin(cyn + d)
yn+1 = sin(exn + f) + sin(gyn + h)

a, b, c, d, e, f, g, and h are constants between -PI and PI. The initial conditions are x0 = 0 and y0 = 0, though I highly doubt it matters. I iterate the formulas billions of times (probably overkill) and count the number of times each pixel gets hit, with a coloring nuance I'll explain later. Note that the orbit is entirely within a square centered at the origin with side length 4.

How do I choose the 8 constants? I have a program which repeatedly generates random constants, saves them to a file, and creates the corresponding thumbnail-size image. I look at a bunch of thumbnails and pick one I like. (I'd say about a third of them show chaotic behavior).

How do I color the image? I'll use this particular picture as an example. Each time the orbit lands on a pixel, I increase the green counter by 1, the red counter by |xn+1 - xn| (the horizontal distance of the last hop), and the blue counter by |yn+1 - yn| (the vertical distance of the last hop). There are certainly other possibilities involving distances and angles. It's probably unnecessary, but I do sort each counter and use the ranks to ensure an even color distribution.

For the 3D case the direct generalization of the recurrence relations is

xn+1 = sin(axn + b) + sin(cyn + d) + sin(ezn + f)
yn+1 = sin(gxn + h) + sin(iyn + j) + sin(kzn + m)
zn+1 = sin(pxn + q) + sin(ryn + s) + sin(tzn + u)

There are 18 constants; I skipped some letters to avoid typographical or notational confusion. I don't know whether picking good constant values by generating a lot of random thumbnails is easy in 3D. If not, perhaps examining a less general set of formulas is worthwhile. Please let me know if you want me to look at this issue. One thing is certain: The attractor will live in a cube centered at the origin with side length 6.

I think the 3D generalization is otherwise straightforward. For coloring, I'd probably try incrementing counters by |xn+1 - xn|, |yn+1 - yn|, and |zn+1 - zn|.

Good luck --- I bet the 3D renders will be spectacular.
Logged

Fortran will rise again
C.K.
Explorer
****
Posts: 57


The Artineer


WWW
« Reply #3 on: June 23, 2013, 07:37:32 PM »

Woah, that's pretty incredible o_O.  I especially like how you decided to apply the colors, very vivid.  Very clean too.

Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Wavy Elephant Mandel Brot Duncan C 0 1070 Last post April 20, 2010, 02:41:36 AM
by Duncan C
The elephant graveyard. Images Showcase (Rate My Fractal) domidup 0 540 Last post May 15, 2012, 03:37:07 PM
by domidup
Elephant Worm Movies Showcase (Rate My Movie) Kali 11 2656 Last post November 28, 2012, 04:13:19 AM
by M Benesi
Dive into Seahorse, Dragon and Elephant valleys Movies Showcase (Rate My Movie) Kalles Fraktaler 1 804 Last post January 20, 2014, 04:14:14 AM
by Dinkydau
Elephant Nebula Images Showcase (Rate My Fractal) laser blaster 2 552 Last post May 21, 2014, 06:30:06 PM
by laser blaster

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.143 seconds with 24 queries. (Pretty URLs adds 0.006s, 2q)