Logo by Pauldelbrot - 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, 12:51:22 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: A weird cut-fold toy  (Read 1572 times)
0 Members and 1 Guest are viewing this topic.
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« on: March 22, 2015, 04:17:07 PM »

I never get anything good from foldcut polyhedra, so I thought to combine it with Sierpinski stuff and a nonstandard iterated intersect.
In other words, crazy stuff (and slow!) cheesy but look;

Code:
#info Foldcut toy (DarkBeam 2015/knighty 2011)
#define providesInit
#include "DE-Raytracer.frag"
#include "MathUtils.frag"
#group Icosahedral

uniform float Scale; slider[0.00,2,4.00]
uniform int Iterations;  slider[0,2,10]

uniform vec3 Offset; slider[(-1,-1,-1),(1,1,1),(1,1,1)]
uniform vec3 Offset2; slider[(-1,-1,-1),(1,0,0),(1,1,1)]

uniform float Angle1; slider[-180,0,180]
uniform vec3 Rot1; slider[(-1,-1,-1),(1,1,1),(1,1,1)]
//uniform float Angle2; slider[-180,0,180]
//uniform vec3 Rot2; slider[(-1,-1,-1),(1,1,1),(1,1,1)]
mat3 fracRotation2;
mat3 fracRotation1;

void init() {
//fracRotation2 = rotationMatrix3(normalize(Rot2), Angle2);
fracRotation1 = Scale* rotationMatrix3(normalize(Rot1), Angle1);
}

float DE(vec3 z)
{
float t; int n = 0;
      float scalep = 1;
      float DE1 = 1000;
      vec3 z0=z;
// Folds.
//Dodecahedral
while (n < Iterations) {
z *= fracRotation1;
z = abs(z);
       z -= Offset;
if (z.y>z.x) z.xy =z.yx;
if (z.z>z.x) z.xz = z.zx;
if (z.y>z.x) z.xy =z.yx;
       z -= Offset2;
if (z.y>z.x) z.xy =z.yx;
if (z.z>z.x) z.xz = z.zx;
if (z.y>z.x) z.xy =z.yx;
      
n++;  scalep *= Scale;
       DE1 = min(DE1,z.x/scalep);
      }
//Distance to the plane going through vec3(Size,0.,0.) and which normal is plnormal
return DE1;
}


* tempio.jpg (37.14 KB, 527x462 - viewed 250 times.)
« Last Edit: March 22, 2015, 04:18:40 PM by DarkBeam » Logged

No sweat, guardian of wisdom!
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #1 on: March 22, 2015, 05:03:40 PM »

Even crazier, a "Biomorph cube" shocked
Added a "Qube" slider, helps to get more solid shapes smiley

Code:
#info BioCube
#define providesInit
#include "DE-Raytracer.frag"
#include "MathUtils.frag"
#group Icosahedral

//Cut and fold (Houdini?) technique with icosahedral folding
//Well... in 2d, it's proved that any (simple?) polygon can be obtained with Cut and fold
//Seems it's the same for non auto intersecting polyhedra. Right?

//Size of the polyhedra
uniform float Scale; slider[0.00,1.5,4.00]
uniform int Iterations;  slider[0,2,50]

uniform vec3 Offset; slider[(-1,-1,-1),(0,1,1),(1,1,1)]
uniform vec3 Offset2; slider[(-1,-1,-1),(1,-0.3,-0.3),(1,1,1)]
uniform  float Qube; slider[-1,0.1,1]

uniform float Angle1; slider[-180,0,180]
uniform vec3 Rot1; slider[(-1,-1,-1),(1,1,1),(1,1,1)]
//uniform float Angle2; slider[-180,0,180]
//uniform vec3 Rot2; slider[(-1,-1,-1),(1,1,1),(1,1,1)]
mat3 fracRotation2;
mat3 fracRotation1;

void init() {
//fracRotation2 = rotationMatrix3(normalize(Rot2), Angle2);
fracRotation1 = Scale* rotationMatrix3(normalize(Rot1), Angle1);
}

float DE(vec3 z)
{
float t; int n = 0;
      float scalep = 1;

      vec3 z0=z;
z = abs(z);
       //z -= (1,1,1);
if (z.y>z.x) z.xy =z.yx;
if (z.z>z.x) z.xz = z.zx;
if (z.y>z.x) z.xy =z.yx;
       float DE1 =1.0-z.x;
       z = z0;
// Folds.
//Dodecahedral
while (n < Iterations) {
z *= fracRotation1;
z = abs(z);
       z -= Offset;
if (z.y>z.x) z.xy =z.yx;
if (z.z>z.x) z.xz = z.zx;
if (z.y>z.x) z.xy =z.yx;
       z -= Offset2;
if (z.y>z.x) z.xy =z.yx;
if (z.z>z.x) z.xz = z.zx;
if (z.y>z.x) z.xy =z.yx;
       
n++;  scalep *= Scale;
       DE1 = abs(min(Qube/n-DE1,(+z.x)/scalep));
      //DE1 = z.x/scalep;
      }
       //DE1 = z.x/scalep;
//Distance to the plane going through vec3(Size,0.,0.) and which normal is plnormal
return DE1;
}
« Last Edit: March 22, 2015, 07:48:42 PM by DarkBeam » Logged

No sweat, guardian of wisdom!
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #2 on: March 24, 2015, 04:28:58 PM »

Cool! Thank you hot sharing ) That's from first script.

« Last Edit: September 14, 2015, 06:02:25 PM by Crist-JRoger » Logged

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


Fragments of the fractal -like the tip of it


« Reply #3 on: March 24, 2015, 06:11:59 PM »

 embarrass How you everytime find that super stuff! wink

I implemented a different version of the algo for MB3D, anyway A Beer Cup

(The ones posted here are experiments wink )
Logged

No sweat, guardian of wisdom!
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #4 on: September 14, 2015, 06:07:50 PM »

I like this script. Simple and very nice. This is raw renders



Logged

Patryk Kizny
Global Moderator
Fractal Fertilizer
******
Posts: 372



kizny
WWW
« Reply #5 on: September 14, 2015, 06:16:29 PM »

Looks cool! Will give it a run
Logged

Visual Artist, Director & Cinematographer specialized in emerging imaging techniques.
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Generalized Box Fold. Amazing Box, Amazing Surf and variations « 1 2 » fractower 25 8383 Last post September 23, 2011, 11:31:57 PM
by knighty
Spherical Texture Fold 3D Fractal Generation Aexion 7 4557 Last post July 15, 2011, 10:07:35 PM
by Jesse
The power of fold (new) Theories & Research knighty 8 1622 Last post September 12, 2011, 10:37:50 PM
by knighty
3-fold symmetry Still Frame Kalles Fraktaler 0 1188 Last post May 08, 2014, 05:02:44 PM
by Kalles Fraktaler
Fold Box Mod Mandelbulber Gallery mclarekin 0 752 Last post February 13, 2016, 09:19:00 PM
by mclarekin

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