Logo by Sockratease - 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. April 23, 2024, 12:38:48 PM


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: n-body-fractal?  (Read 5217 times)
0 Members and 1 Guest are viewing this topic.
kram1032
Fractal Senior
******
Posts: 1863


« on: February 08, 2010, 12:39:49 AM »

Pauldelbrot's Volterra-Lokta-Msets and the small Java-Apps, Gary found, brought me to a crazy idea:

Would it be possible to do some kind of 3-body fractals? (Finding cases in 3D where the bodies form circular or elliptical or cycloidical orbits or escape in parabolas or hyperbolas or those with totally chaotic behaviour and colour each start position variation accordingly, just like those magnetic pendulum fractals but more complex...)
Not sure if I got it right with the short thinking I spent on this yet but I think, the resulting set would be 9-dimensional in total: 3Ds for startingpositions * 3 planets...
julia-sets in that case would be the orbits for a single case, I guess...

It would be possible to extend this even further, adding another 3 Dimensions for initial velocities or accelerations....
Logged
Timeroot
Fractal Fertilizer
*****
Posts: 362


The pwnge.


WWW
« Reply #1 on: February 08, 2010, 03:43:04 AM »

Would these three bodies be in 2 or 3 dimensional space? I'll assume 2d for now...

If I count the dimensions, I think it would be 2 starting coordinates per planet, then 2 coordinates per planet for the initial velocity, and a final one parameter per planet indicating mass. That makes 15 dimensions, but we can subtract 5 because we can set one planet to a mass of 1, starting at the origin, and with no velocity, leaving us with 10. They don't have "initial acceleration", and I know what you mean by ".. * 3 planets"; if one does color based on the final result, then that wouldn't really introduce new dimensions. I think it might be interesting to color based on whether all planets escape one another, or if 2 collide and one escapes, or if they all collapse.

I checked the public formula database, and there some things similar to this in lkm.ufm under "Gravity 2", "Gravity 3", and "Gravity 4". It seems interesting, but I can't get it to produce any images...maybe some here can provide a upr showing what gives us the pretty pictures?  grin
Logged

Someday, man will understand primary theory; how every aspect of our universe has come about. Then we will describe all of physics, build a complete understanding of genetic engineering, catalog all planets, and find intelligent life. And then we'll just puzzle over fractals for eternity.
kram1032
Fractal Senior
******
Posts: 1863


« Reply #2 on: February 08, 2010, 03:10:10 PM »

I thought about 3D, actually...

And you have 3 planets and thus 3*3 variables for the location, which left me with 9 Dimensions... And a 10th, 11th and 13th for masses, however, they will be fixed and maybe in the "standard case" (The equivalent to z²+c, rather than z³+c*tan(z) or what ever^^) will have all three masses set to 1 smiley
Logged
lkmitch
Fractal Lover
**
Posts: 238



« Reply #3 on: February 08, 2010, 08:21:07 PM »

Would these three bodies be in 2 or 3 dimensional space? I'll assume 2d for now...

If I count the dimensions, I think it would be 2 starting coordinates per planet, then 2 coordinates per planet for the initial velocity, and a final one parameter per planet indicating mass. That makes 15 dimensions, but we can subtract 5 because we can set one planet to a mass of 1, starting at the origin, and with no velocity, leaving us with 10. They don't have "initial acceleration", and I know what you mean by ".. * 3 planets"; if one does color based on the final result, then that wouldn't really introduce new dimensions. I think it might be interesting to color based on whether all planets escape one another, or if 2 collide and one escapes, or if they all collapse.

I checked the public formula database, and there some things similar to this in lkm.ufm under "Gravity 2", "Gravity 3", and "Gravity 4". It seems interesting, but I can't get it to produce any images...maybe some here can provide a upr showing what gives us the pretty pictures?  grin

There's an example, "Gravity Example," in lkm.upr.  I wrote this formula to draw the orbits of bodies in a gravitational n-body system (where n = 2, 3, or  4 only), in 2d.  Here's the upr:

GravitySample {
; copyright Kerry Mitchell 27jan2000
::UUQhfin2tX5yutNMQU09CQ/DEavt5L9wtgr7iiuqfAF0SU2EhSUgi2NKf9d0DLZH7UkiWgmA
  kdizc5lzQOHoSnM3LNfKMAh8avRJi+iTeS77QfXW1YURofqL8HE8MM6gSv/gf4TjsT5aF8+9
  l7UFafrI6rKnrD9NtP/gyY+MZDNdDFjxRhBD6HOlcZjXbrFR52KlHxiQ2GZOcgCaMCicwWIq
  Oa86GZbbYQlspRXvfcrqavyJwbwoK5+aBJMo06Axyh0VyH195ToZoGlDKi8HE2ySUp2oqlVQ
  vZeoa9xyqIE4krTEtfsXZrGKmoeXa+xT5YxK6mV41UY1JYFBORIOZ+LKoAvOeDedWSCmGzxs
  0MOnllwTnMhNJZ19007L4GeDZU9pRDvVY/2j7FA29i5H9oCuvIC2aeSy0K6VrYzr86KVrX1A
  OinKgn8dNqzvJN2Wd/bUEkYnUbsH9CC8OGGorb1FqxpFnsutEuuzPuT5sW/zvmzNzXz7kt68
  pb3crx621J6fB1+jFqwAw/bt1orVSXYA8EVoBfGy2WBH0BRnqFprLUPKwoB/Ekk00UKJeKc8
  cceMjy3eOOpvJQnzRyobZE65czbKjjjx4sp4wE8Uc85IxX4y1iZzifm7sbKJovHH8vszqtzN
  2CWE/b4H6C/wYv14HyH8z7c+ZLnmxJ3Ff4UYy/O0DBnR4vW65axL0z1mzee98vhdILsDcAvl
  YH8Hgz79f8AjecK+ukT/vMIp3SOcy2sY6rkcuW8C5ct5sbKo/W0p1LdtLgD0YfQO/PJHpxgm
  eTevCNkLGehoY+CBsMvjvzk+g4/oB6fBRav0rC==
}

Kerry
Logged
kram1032
Fractal Senior
******
Posts: 1863


« Reply #4 on: February 08, 2010, 08:36:04 PM »

Hmm, probably my fault (just got the 30-days trial) but if I copy this and save it as a upr, it tells me "contains errors"
Logged
lkmitch
Fractal Lover
**
Posts: 238



« Reply #5 on: February 08, 2010, 08:41:35 PM »

Hmm, probably my fault (just got the 30-days trial) but if I copy this and save it as a upr, it tells me "contains errors"

Hmmm...  Did you try copying and pasting into another open fractal instead of saving it as a upr?  Here's an uncompressed version so you can read what the layers are and how they're colored.  I've attached the image (except, I changed the colors and modes a bit, but the orbits are the same).

GravitySample {
; copyright Kerry Mitchell 27jan2000
fractal:
  title="Gravity Sample" width=480 height=480 layers=4
  credits="Kerry Mitchell;1/27/2000"
layer:
  caption="comet 3" opacity=25 method=multipass
mapping:
  center=0/0 magn=1
formula:
  maxiter=628 percheck=off filename="lkm.ufm" entry="gravity3-comet"
  p_zc0=-2/-0.2 p_vc0=1/0 p_z10=1/0 p_z20=-0.5/0.866025403784438647
  p_z30=-0.5/-0.866025403784438647 p_v10=0/1
  p_v20=-0.866025403784438647/-0.5 p_v30=0.866025403784438647/-0.5
  p_mass1=3.466 p_mass2=3.466 p_mass3=3.466 p_timestep=0.01
  p_ztype="comet position" p_bailout=1000
inside:
  transfer=cuberoot filename="lkm.ucl" entry="basic"
  p_colorby=magnitude
outside:
  transfer=linear
gradient:
  smooth=yes index=0 color=16777215 index=50 color=14532495 index=100
  color=11829312 index=150 color=8405008 index=200 color=0 index=250
  color=8405008 index=300 color=11829312 index=350 color=14532495
opacity:
  smooth=no index=0 opacity=255
layer:
  caption="comet 2" opacity=33 method=multipass
mapping:
  center=0/0 magn=1
formula:
  maxiter=628 percheck=off filename="lkm.ufm" entry="gravity3-comet"
  p_zc0=-2/-0.1 p_vc0=1/0 p_z10=1/0 p_z20=-0.5/0.866025403784438647
  p_z30=-0.5/-0.866025403784438647 p_v10=0/1
  p_v20=-0.866025403784438647/-0.5 p_v30=0.866025403784438647/-0.5
  p_mass1=3.466 p_mass2=3.466 p_mass3=3.466 p_timestep=0.01
  p_ztype="comet position" p_bailout=1000
inside:
  transfer=cuberoot filename="lkm.ucl" entry="basic"
  p_colorby=magnitude
outside:
  transfer=linear
gradient:
  smooth=yes index=0 color=16777215 index=50 color=9428415 index=100
  color=4240512 index=150 color=1081408 index=200 color=0 index=250
  color=1081408 index=300 color=4240512 index=350 color=9428415
opacity:
  smooth=no index=0 opacity=255
layer:
  caption="comet 1" opacity=50 method=multipass
mapping:
  center=0/0 magn=1
formula:
  maxiter=628 percheck=off filename="lkm.ufm" entry="gravity3-comet"
  p_zc0=-2/0 p_vc0=1/0 p_z10=1/0 p_z20=-0.5/0.866025403784438647
  p_z30=-0.5/-0.866025403784438647 p_v10=0/1
  p_v20=-0.866025403784438647/-0.5 p_v30=0.866025403784438647/-0.5
  p_mass1=3.466 p_mass2=3.466 p_mass3=3.466 p_timestep=0.01
  p_ztype="comet position" p_bailout=1000
inside:
  transfer=cuberoot filename="lkm.ucl" entry="basic"
  p_colorby=magnitude
outside:
  transfer=linear
gradient:
  smooth=yes index=0 color=16777215 index=50 color=12554205 index=100
  color=8405172 index=150 color=4198528 index=200 color=0 index=250
  color=4198528 index=300 color=8405172 index=350 color=12554205
opacity:
  smooth=no index=0 opacity=255
layer:
  caption="stars" opacity=100 method=multipass
mapping:
  center=0/0 magn=1
formula:
  maxiter=628 percheck=off filename="lkm.ufm" entry="gravity3-comet"
  p_zc0=-2/0 p_vc0=1/0 p_z10=1/0 p_z20=-0.5/0.866025403784438647
  p_z30=-0.5/-0.866025403784438647 p_v10=0/1
  p_v20=-0.866025403784438647/-0.5 p_v30=0.866025403784438647/-0.5
  p_mass1=3.466 p_mass2=3.466 p_mass3=3.466 p_timestep=0.01
  p_ztype="all stars" p_bailout=1000
inside:
  transfer=cuberoot filename="lkm.ucl" entry="basic"
  p_colorby=magnitude
outside:
  transfer=linear
gradient:
  smooth=yes index=0 color=16777215 index=100 color=8421504 index=200
  color=0 index=300 color=8421504
opacity:
  smooth=no index=0 opacity=255
}


* Gravity Sample.jpg (26.04 KB, 300x300 - viewed 283 times.)
Logged
Timeroot
Fractal Fertilizer
*****
Posts: 362


The pwnge.


WWW
« Reply #6 on: February 09, 2010, 01:19:01 AM »

Oh, I see. Heheh, I didn't even know there were uprs in the Public Database. X-P As a suggestion, why not make either the imaginary part or the polar angle of Z equal to the speed of the object? This might produce more interesting colors. As far as I can tell, that just means adding "+flip(v1new)" (or 2, or 3, or c) after "rmin=r". Another interesting alteration would be giving faster stars/comets more brilliance; something like r=cabs(z1new-#pixel)/log(v1new) might give pretty pictures. You write great formulas, by the way. smiley
Logged

Someday, man will understand primary theory; how every aspect of our universe has come about. Then we will describe all of physics, build a complete understanding of genetic engineering, catalog all planets, and find intelligent life. And then we'll just puzzle over fractals for eternity.
Timeroot
Fractal Fertilizer
*****
Posts: 362


The pwnge.


WWW
« Reply #7 on: February 09, 2010, 06:01:46 AM »

I think I've got a pretty good version of those alternate colorings working; I've only it done it for your 2-body formula so far, but once I get it all perfect it should be very easy it extend to more bodies. The options I've added are:
-Compounding - this takes the harmonic mean of the distance to the two stars, rather than just the closer one. It contains options so that
                      it can either be done where it takes both distances on the same timestep, or keeps track of each star individually. This
                      smooths out the lighting a lot, with the exception of a star looping back on itself. Eventually, though, I may add something
                      where it does it using mathematically correct coloring, in which case that will also be fixed.
-Velocity Brilliance - this can be activated so that with high velocities, the light extends further. For some reason, when this is used with
                            simultaneous compounding, small noisy patches appear where two stars cross at high velocities. That can be fixed by
                            unchecking "repeat gradient".
-Velocity Conversion - takes the velocity of the star when it passes nearest and allows you to either include it as the argument or the
                               imaginary part of z (or neither). So far, this produces greatly unsatisfying results visually, but I think with a custom
                               direct coloring algorithm it would look nice.
I've included what I have so far in an attachment, along with a sample upr. Of course, lkmitch wrote the formula, but let me know what you think of the modifications.

* LKM modified.zip (16.02 KB - downloaded 87 times.)
Logged

Someday, man will understand primary theory; how every aspect of our universe has come about. Then we will describe all of physics, build a complete understanding of genetic engineering, catalog all planets, and find intelligent life. And then we'll just puzzle over fractals for eternity.
kram1032
Fractal Senior
******
Posts: 1863


« Reply #8 on: February 09, 2010, 03:07:42 PM »

Hey, nice smiley
So that image would be a Juliaset. Now what would be with a (partially) Mandelbrotesk set of this, where all the planets except for one keep their starting-values and for the last one, the location-parameter gets varied, then colour in some way to find the class of the orbit (To see, wether that orbit is stable, chaotic, somewhere in-between or the planet just escapes)

That's actually what I meant in my first post smiley
Logged
Timeroot
Fractal Fertilizer
*****
Posts: 362


The pwnge.


WWW
« Reply #9 on: February 10, 2010, 01:42:58 AM »

Actually, that wouldn't be the Julia set... this is really a dynamic system (think of pictures of the Lorenz equations), plotting the orbits. What you just described - keeping all parameters constant except for one location variable - would be the Julia Set. The Mandelbrot set doesn't have a very well defined analog here... Think of the Newton fractal. It's a Julia Set (with not really any parameters). You can create a Nova fractal which has a Mandelbrot set, but that's already a different idea of formula. To create a Mandelbrot Set for the n-body problem, you would basically move one planet a set amount each iteration. That makes for very poor results in dynamic systems. A better thing may be to take different slices of parameter space, such as the respective masses, locations, and velocities of the different stars.
Logged

Someday, man will understand primary theory; how every aspect of our universe has come about. Then we will describe all of physics, build a complete understanding of genetic engineering, catalog all planets, and find intelligent life. And then we'll just puzzle over fractals for eternity.
kram1032
Fractal Senior
******
Posts: 1863


« Reply #10 on: February 10, 2010, 03:54:11 PM »

Ah, yes, sure...

True, the first thing is just the orbit (and would be so in the M-set aswell), by not describing the whole plane x²+c but only c²+c, so to say... the Julia is x²+c, the orbit c²+c and the Mset x²+x, where c_1 is a constant and x_1 is the location of the very first solution...

Oh well, a Julia-Set then smiley

Actually it would work just as usual with the escape-time colouring, for the 3-body-system Julia-Set even possible for each planet seperately, by splitting up the r-g-b channel for the three planets. Not escaping -> black, one escapes -> blue (the quicker, the bluer), the other one escapes -> green (faster -> greener), the last one with red smiley
Logged
Timeroot
Fractal Fertilizer
*****
Posts: 362


The pwnge.


WWW
« Reply #11 on: February 10, 2010, 07:24:08 PM »

Well, I've come down with a cold, so that should give me time to try to code that (unless my mom tells me not to use the computer.  tongue stuck out)
Logged

Someday, man will understand primary theory; how every aspect of our universe has come about. Then we will describe all of physics, build a complete understanding of genetic engineering, catalog all planets, and find intelligent life. And then we'll just puzzle over fractals for eternity.
kram1032
Fractal Senior
******
Posts: 1863


« Reply #12 on: February 10, 2010, 08:57:40 PM »

already curious smiley
It probably actually will be pretty computing-heavy...
Logged
Timeroot
Fractal Fertilizer
*****
Posts: 362


The pwnge.


WWW
« Reply #13 on: February 10, 2010, 09:56:02 PM »

It should take only as much computation as the current, "Orbit" image does. That version could actually be optimized a lot by calculating the positions of the stars in the global: section and then storing the values in an array. But the "Julia" set would not work like that, and would have to be fully computed for each pixel (like the current code does). Btw, I thought of an analog for the "Mandelbrot Set" for dynamic systems: Just have a constant force - the "c" value - acting on one star. If it acted on all stars, it would just be a shift of the coordinate system, but acting on only one will give other results. Another option would be having the force exert only on the comet; it reminds me of a talk on swarming behavior I once saw, in which it was demonstrated that if only 5% of the fish in a school know where to go - and are always "pulled" that direction - the entire school moves just as fast as if every fish knew.
Logged

Someday, man will understand primary theory; how every aspect of our universe has come about. Then we will describe all of physics, build a complete understanding of genetic engineering, catalog all planets, and find intelligent life. And then we'll just puzzle over fractals for eternity.
kram1032
Fractal Senior
******
Posts: 1863


« Reply #14 on: February 10, 2010, 10:19:16 PM »

That effect also works with traffic wink
If there is a traffic jam as well as an obvious alternative route, theory says that only about 10% of the people need to use that root and most of the others will follow along for some reason.

Mass dynamics result in a lot of nice fractal patterns smiley
I once saw walk-simulations for crowds where each person enters and wants to leave a plazza at different sides, chosen randomly. The pattern that was created due to trying to get past all the other peoples resembled a fractal caridode smiley
Logged
Pages: [1] 2   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
inside body maybe??? Mandelbulb3D Gallery dadinok 0 383 Last post June 16, 2012, 12:40:21 PM
by dadinok
Body of a woman through the beach Mandelbulb3D Gallery KRAFTWERK 0 423 Last post January 10, 2013, 04:25:34 PM
by KRAFTWERK
Body of a beach through the woman -The Sculpture Mandelbulb3D Gallery KRAFTWERK 0 453 Last post February 28, 2013, 05:38:45 PM
by KRAFTWERK
Jewel body 1 Still Frame - Wildstyle arias 0 719 Last post May 10, 2016, 12:32:36 PM
by arias
Jewel body 2 Still Frame - Wildstyle arias 0 687 Last post May 10, 2016, 12:34:12 PM
by arias

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