Logo by KRAFTWERK - 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 the official fractalforums.com Youtube Channel
 
*
Welcome, Guest. Please login or register. March 28, 2024, 03:05:47 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 [3] 4 5 ... 7   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: Cross Menger!? Can anyone do this?  (Read 17435 times)
0 Members and 1 Guest are viewing this topic.
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #30 on: July 13, 2016, 12:15:50 PM »

Thanks Knighty for the  settings.

DarkBeam sidetracked me away from this, with a single line transform _inv_cylindrical. Instead of it being  a quick diversion, it turned into yet another journey of discovery smiley afro

I  have been thinking about kifs and linear type folds in general,  and now can visualize the mega UI that I will probably never build.

When I was still using MandelbulberV1.21 openCL, I did a little bit of drawing up and it makes it easier to visualize. This reminded me to have another look at that code smiley


* Mgr prism 89.jpg (212.59 KB, 580x565 - viewed 158 times.)
Logged
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #31 on: August 18, 2016, 02:48:36 PM »

I have got "some sort" of pseudo kleinian code working with the prism shape and menger sponge in dev V2.09. Early days yet. smiley


* psdoKlnMgr aaa1 157 .jpg (222.72 KB, 800x600 - viewed 181 times.)
Logged
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #32 on: August 19, 2016, 02:50:02 AM »

lol  cheesy
Logged

Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #33 on: August 31, 2016, 06:30:06 AM »

Logged

3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #34 on: August 31, 2016, 06:32:19 AM »

Spring thaw, very nice, refreshing and crispy smiley
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #35 on: August 31, 2016, 09:08:14 AM »

Thank you very much  wink Originally it was this, then moved camera top and looked at water only ) and change sphere to fractal
Logged

DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #36 on: September 09, 2016, 10:44:54 AM »

I added the pure kifs version in mb3d 8D
Logged

No sweat, guardian of wisdom!
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #37 on: September 15, 2016, 12:58:56 PM »

A modification thing.


* crossMengerMod1.jpg (205.98 KB, 800x600 - viewed 120 times.)
Logged
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #38 on: September 15, 2016, 01:12:20 PM »

shared .frag?  embarrass  wink
Logged

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



« Reply #39 on: September 16, 2016, 06:51:42 AM »

This is an attempt at the formula part of a .frag.  (I don't know enough yet about programming for fragmentarium)

If you can get it to work, please post back the corrected .frag so i can see my mistakes.

I have been using it to make hybrids with aSurf, pseudoKlienianMod, and MengerMods

This image is with gap.y set at 1.99, the rest of parameters at default.

Code:
#info CrossMengerMod1
#include "DE-Raytracer.frag"
#group CrossMenger

// Number of fractal iterations.
uniform float Scale; slider[0.,1.,2.]
uniform float ScaleY; slider[0.,1.,2.]
uniform float ScaleZ; slider[0.,1.,2.]
uniform int iter; slider[0, 12, 250}
uniform float3 gap; slider[(-1.,-1.,-1.),(0.,0.,0.),(3.,2.,3.]  gap = offset scale,
uniform bool Mod; checkbox[false] // this works only with some settings

const float SQRT_3_4  = 0.86602540378443864676372317075294;
const float SQRT_3 =  1.73205080756887729352744634150587;
float t;
float temp;
float dot1;
const float DE = 1.0;
const float Bailout = 10.0;
vec3 z = p;

uniform vec3 RotVector; slider[(0,0,0),(1,1,1),(1,1,1)]
uniform float RotAngle; slider[0.00,0,180]
mat3 rot;
void init() {
rot = rotationMatrix3(normalize(RotVector), RotAngle);
}

void CrossMengerMod1( vec3 z)
{
    z.z = abs(z.z);
    dot1 = (z.x * -SQRT_3_4 + z.y * 0.5) * Scale;
    t = max(0.0, dot1);
    z.x -= t * -SQRT_3 - (0.5 * SQRT_3_4);
    z.y = abs(z.y - t);

    if (z.y > z.z)
    {
      temp = z.y;
      z.y = z.z;
      z.z = temp;
    }
    z.y -=  1.5;
    z -= gap * vec3(SQRT_3_4, -1.5, 1.5);

    if (z.z > z.x)
    {
      temp = z.z;
      z.z = z.x;
      z.x = temp;
    }
    if(Mod)
    {
      if (z.x >= 0.0)
      {
        z.y = max(0.0, z.y) * ScaleY;
        z.z = max(0.0, z.z) * ScaleZ;
      }
    z *= rot;
    }

 
   for(int i=0; i< iter; i++)
 
   { // CrossMengerTrick
     z.y = abs(z.y);
     z.z = abs(z.z);
     dot1 = (z.x * -SQRT_3_4 + z.y * 0.5);
     float t = 1 * max(0.0, dot1);
     z.x -= t * -SQRT_3;
   
     z.x -= SQRT_3_4;

    float dy = 0.0;
    float dz = 0.0;
    if (z.y > 0.5 && z.z > 0.5)
    {
      dy = 1.5;
      dz = 1.5;
    }
    else if
        ((z.y - 1.5) * (z.y - 1.5) + z.z * z.z < z.y * z.y + (z.z - 1.5) * (z.z - 1.5))
    {
      dy = 1.5;
    }
    else
      dz = 1.5;

    z.y -= dy;
    z.z -= dz;
    z *= 3.0;
    DE *= 3.0;
    z.y += dy;
    z.z += dz;

    z.x += SQRT_3_4;

    r = length(z);
    if ( r > Bailout)
    return ( r - 2.) / DE;
  }
}


* crossMengerMod1 cac1 1200.jpg (187.12 KB, 1200x1200 - viewed 111 times.)
Logged
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #40 on: September 17, 2016, 08:59:06 PM »

Thank you! I tried to make this code working... so here some strange  shocked it shows little different geometry ) but it runs  embarrass
Code:
#info CrossMengerMod1
#include "MathUtils.frag"
#include "DE-Raytracer.frag"
#group CrossMenger

// Number of fractal iterations.
uniform float Scale; slider[0.,1.,2.]
uniform float ScaleY; slider[0.,1.,2.]
uniform float ScaleZ; slider[0.,1.,2.]

uniform int Iter; slider[0,12,250]

uniform vec3 gap; slider[(-1.,-1.,-1.),(0.,0.,0.),(3.,2.,3.)]
uniform bool Mod; checkbox[false]


const float SQRT_3_4  = 0.86602540378443864676372317075294;
const float SQRT_3 =  1.73205080756887729352744634150587;
float t;
float temp;
float dot1;
//const float DE = 1.0;
const float Bailout = 10.0;
//vec3 z = p;

uniform vec3 RotVector; slider[(0,0,0),(1,1,1),(1,1,1)]
uniform float RotAngle; slider[0.0,0,180]
mat3 rot;


float DE(vec3 z) {
 rot = rotationMatrix3(normalize(RotVector), RotAngle);
z.z = abs(z.z);
dot1 = (z.x * -SQRT_3_4 + z.y * 0.5) * Scale;
t = max(0.0, dot1);
z.x -= t * -SQRT_3 - (0.5 * SQRT_3_4);
z.y = abs(z.y - t);
if (z.y > z.z) {
temp = z.y;
z.y = z.z;
z.z = temp;
}


z.y -=  1.5;
z -= gap * vec3(SQRT_3_4, -1.5, 1.5);
if (z.z > z.x) {
temp = z.z;
z.z = z.x;
z.x = temp;
}
if(Mod) {
if (z.x >= 0.0) {
z.y = max(0.0, z.y) * ScaleY;
z.z = max(0.0, z.z) * ScaleZ;
}
z *= rot;
}


for(int i=0; i< Iter; i++) { // CrossMengerTrick
    z.y = abs(z.y);
    z.z = abs(z.z);
    dot1 = (z.x * -SQRT_3_4 + z.y * 0.5);
    float t = 1. * max(0.0, dot1);
    z.x -= t * -SQRT_3;
    z.x -= SQRT_3_4;
    float dy = 0.0;
    float dz = 0.0;
if (z.y > 0.5 && z.z > 0.5) {
dy = 1.5;
dz = 1.5;
}
else if ((z.y - 1.5) * (z.y - 1.5) + z.z * z.z < z.y * z.y + (z.z - 1.5) * (z.z - 1.5)) {
dy = 1.5;
    }
else
dz = 1.5;
z.y -= dy;
z.z -= dz;
z *= 3.0;
float DE1=1.0;
DE1*= 3.0;
z.y += dy;
z.z += dz;
z.x += SQRT_3_4;
z = length(z);
//if (z > Bailout)
return ( z- 2.) / DE1;
  }

}
Logged

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



« Reply #41 on: September 18, 2016, 02:06:38 AM »

Thanks, I now have a better understanding of  .frag.

I will code it up in Mandelbulber V1.21 OpenCL  and see what I get and report back.

The important bit is the first half , which gives you control over the prism shape, you can replace the crossmengertrick with iterations of other linear types
Logged
Tim Emit
Conqueror
*******
Posts: 111



https://www.facebook.com/
WWW
« Reply #42 on: September 19, 2016, 10:36:20 AM »

@crist.. that code runs ok as far as shapes  but it doesn't seem to iterate or make much interesting forms...or is that just me !
Logged
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #43 on: September 19, 2016, 06:15:59 PM »

The important bit is the first half , which gives you control over the prism shape, you can replace the crossmengertrick with iterations of other linear types
Unfortunately I can't. Not yet I think  grin because all GLSL-guru escaped undecided and maybe soon I will be able to understand this interesting process: imagine - create a mathematical model - implement the code  smiley

Tim my code is wrong (but runs without errors) Somebody (Knighty, where are you?huh?  grin ) can help.
Logged

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



« Reply #44 on: September 20, 2016, 09:40:58 AM »

The formula  can make the attached image, (but there is an extra bit on the far end shocked I have lost the symmetry).  More work required!


* crossMengerMod1 fgg1 800.jpg (199.93 KB, 800x600 - viewed 149 times.)
Logged
Pages: 1 2 [3] 4 5 ... 7   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
cross 2D Art ramblerette 0 1460 Last post March 29, 2009, 02:28:49 PM
by ramblerette
At the Cross Images Showcase (Rate My Fractal) John Smith 0 1103 Last post June 10, 2012, 10:43:53 PM
by John Smith
Cross JWildfire Gallery thargor6 1 805 Last post December 06, 2012, 04:04:30 AM
by Pauldelbrot
3D Printed Cross Sections of the Menger Sponge Format, Printing & Post Production tit_toinou 6 4537 Last post April 29, 2013, 03:35:56 PM
by cKleinhuis
Cross Mandelbulb3D Gallery MichaelWGioffredi 0 848 Last post April 22, 2015, 11:33:06 AM
by MichaelWGioffredi

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.297 seconds with 25 queries. (Pretty URLs adds 0.014s, 2q)