Logo by DsyneGrafix - 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: Check out the originating "3d Mandelbulb" thread here
 
*
Welcome, Guest. Please login or register. April 20, 2024, 01:18:33 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: Sphereflake  (Read 493 times)
0 Members and 1 Guest are viewing this topic.
TruthSerum
Guest
« on: May 25, 2015, 10:06:20 AM »

This sphereflake was formed by recursively duplicating spheres along the principle axis of a point on the surface. In this way, points on the surface are divided into sets associated with an axis vector.

This is just a screenshot of ShaderToy. It looks much better in motion: https://www.shadertoy.com/view/Xlj3DK

Logged
TruthSerum
Guest
« Reply #1 on: May 25, 2015, 10:12:33 AM »

Here's what it looks like when the spheres are replaced by cubes:

Logged
flexiverse
Safarist
******
Posts: 99



« Reply #2 on: May 26, 2015, 03:24:13 AM »

Very interesting thanks !
Logged
eiffie
Guest
« Reply #3 on: May 26, 2015, 04:53:53 PM »

I like the way you are constructing the fractal directly - it is easier to understand - but typically since the code becomes simpler we would write the map loop like this:
Code:
        float fd=(length(p)-1.0)/bs; //divide the result by how much we have scaled up p
        p=abs(p);
        if(p.x<p.y)p.xy=p.yx;//sorting the longest dim into x
        if(p.y<p.z)p.yz=p.zy;
        if(p.x<p.y)p.xy=p.yx;
        p.xy-=1.0; //move xy back towards origin 0.92 makes them just touch
        p*=3.3333; //scale up - makes the result smaller
        bs*=3.3333; //bs is now keeping track of the running scale
        
        if (fd < d) {
            d = fd;
            r = float(i)/3.0;
        }

edit: corrected the offset - my bad
« Last Edit: May 28, 2015, 05:00:27 PM by eiffie, Reason: bad math » Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Juliabulb with "octahedral" transform ~ sphereflake? Theory msltoe 4 7117 Last post March 13, 2011, 12:14:02 AM
by DarkBeam

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