Logo by Kaliyuga - 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: Support us via Flattr FLATTR Link
 
*
Welcome, Guest. Please login or register. March 29, 2024, 02:25:38 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]   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: 4D Julia / 3-sphere intersection  (Read 13795 times)
0 Members and 2 Guests are viewing this topic.
Daniel_P
Guest
« on: October 11, 2012, 05:03:02 PM »

It's been a while since I visited, but I wanted to share something I recently generated.
It's an idea I was talking about 3 years ago, but I finally tried it out!
Basically using an inverse stereographic projection to find for each point in 3d space a corresponding point on the 3-sphere, then evaluate the 4D julia set at this point to see whether the point in 3d space is in the set.
I'm then either rendering the point cloud or taking an isosurface.
The results seem a bit different from what you get by just intersecting flat planes.
I also tried it out with a few different powers. One could also vary the radius or position of the 3-sphere.




These are all with fairly low resolution and numbers of iterations, because the way I was generating them is very slow, as it needs to calculate the value for every point in 3d space (I'm using Rhino3d and Grasshopper). I was wondering if one of you could find a way to render these more efficiently
Logged
hobold
Fractal Bachius
*
Posts: 573


« Reply #1 on: October 11, 2012, 08:23:54 PM »

These do look interesting. I am unsure if this method will reveal anything truly new about the 4D Julia sets, though. A sphere is not flat, but it is approximated reasonably well around a given point by its tangent (hyper-)plane. Still, this is worth trying to get a better feel for the overall 4-dimensional set!
Logged
Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« Reply #2 on: October 12, 2012, 07:56:36 PM »

Interesting idea.

I tried it out in Fragmentarium. If I understand correctly you take a point, and apply an inverse stereographic projection, like:

Code:
// Mul = 2 is standard stereographic projection
uniform float Mul; slider[0,2,3]
vec4 stereographic3Sphere(vec3 p) {
float n = dot(p,p)+1.;
return vec4(Mul*p,n-2.)/n;
}

Then I used the standard Quaternion Julia power-2 formula (QuaternionJulia.frag).

I got these images:








I think your images look different?

Would you mind posting the 3-sphere projection formula you use and the 4D julia for the middle image (the black and white) one - then I could compare.
Logged
Daniel_P
Guest
« Reply #3 on: October 12, 2012, 11:54:21 PM »

Hi there,

Your images are interesting, but they do look like something different than mine...
This is what I use for the inverse stereographic projection:

a  = 2 * x / (1 + x * x + y * y + z * z);
b  = 2 * y / (1 + x * x + y * y + z * z);
c  = 2 * z / (1 + x * x + y * y + z * z);
d = (-1 + x * x + y * y + z * z) / (1 + x * x + y * y + z * z);

then I take the 2 complex numbers

Z = a+bi
C = c+di

and do the usual iteration of Z = Z^2 + C
(or actually, Z^4 + C, and Z^3 + C in my second and 3rd images respectively)
Logged
Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« Reply #4 on: October 13, 2012, 09:27:38 AM »

Ah.

We do the same stereographic projection, but then I test the 4D coordinates in a standard Quaternion Julia setup (where the Julia constant is a free parameter).

I just assumed that by '4D Julia', you meant Quaternion algebra.

I'll try out the 2D version when I get some time.
Logged
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #5 on: October 13, 2012, 11:59:56 AM »

Looks cool, not so fractal but cool. A Beer Cup
Logged

No sweat, guardian of wisdom!
Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« Reply #6 on: October 13, 2012, 11:58:08 PM »

I tried with your approach (using complex numbers).
My images are still a bit different, though. How many iterations do you use? You don't add any offsets?

Power 2:

Power 3:

Power 4:

with offset:

Power 8 with offset:


I use the following code:

Code:
#include "IBL-Raytracer.frag"
#include "complex.frag"
#group 2D Steregraphic Julia

uniform int Iterations;  slider[0,16,100]
uniform float Threshold; slider[0,10,100]
uniform float Power; slider[-2,2,12]
uniform vec4 Offset; slider[(-1,-1,-1,-1),(0,0,0,0),(1,1,1,1)]

vec4 stereographic3Sphere(vec3 p) {
float n = dot(p,p)+1.;
return vec4(2.*p,n-2.)/n;
}

float DE(vec3 pos) {
vec4 p4 = stereographic3Sphere(pos)+Offset;
vec2 p = p4.xy;
vec2 c = p4.zw;
float dp = 1.0;
for (int i = 0; i < Iterations; i++) {
dp =  pow( length(p), Power-1.0)*Power*dp + 1.0;
p = cPower(p,Power)+c;
if (dot(p,p) > Threshold) break;
}
float r = length(p);
return  0.5 * r * log(r) / abs(dp);
}

Logged
Daniel_P
Guest
« Reply #7 on: October 14, 2012, 01:19:16 AM »

Wow - these are looking good!
thanks for sharing.

In the images I posted I think the number of iterations I used was always between 3 and 6

I didn't use what I would think of as an offset, but maybe it is equivalent - I was taking the modulus of the result at each point as a 3d scalar field, then taking an isosurface of that. I chose the threshold value for this isosurface just depending on what I thought looked interesting (usually I think between 0.5 and 1)
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  


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