Logo by mauxuam - 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 25, 2024, 02:53:07 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 ... 3 4 [5] 6 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 20355 times)
0 Members and 2 Guests are viewing this topic.
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #60 on: November 08, 2016, 02:40:54 AM »

@ Crist

quote]Tried another code from your latest posts, what is fabs? Did you used Fragmentarium?[/quote

In openCL and C++ I have a fabs() which is abs() in most frags I have seen. Not sure if it a maths library thingy. And I have still haven’t learnt how to use fragmentarium:)

Quote
z = vec3({z.z, z.x, z.y); // reorientate
Yep, I dont know how that got there. I should really transpose the axis in the formula so that the reorientation wouldn’t be necessary.

Missing a z.y = abs(z.y);  before the    z.z = abs(z.z);      

also can add in a z.x = abs(z.x);  option checkbox.


BTW This is where I am up to this coding:

a) I  have written a fourth version of the PrismShape, it does all of what my first three attempts can do plus more. I will post this with an explanation of converting Mandelbulber code into .frag.
b) The CrossMenger Trick  i posted here on the 29th is my final version of that one.
c) I have yet to do a final CrossMengerKIFS version

PS you can replace
if(z.z > z.x){temp =z.z; z.z = z.x; z.x = temp;} type code
with
if(z.z > z.x){z.xz = z.zx;} in Fragnmentarium (and in openCL)

PPS  looking at the zipped file. As well as the prismShape code , you can add a dotScale to the dot in both the CrossMengerTrick and CrossMengerKIFS.

 
« Last Edit: November 08, 2016, 05:09:41 AM by mclarekin, Reason: Addded PPS » Logged
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #61 on: November 08, 2016, 04:20:19 AM »

I have finished coding Darkbeams reciprocal3 x, y, and z. ( I have still got to get a SIGN() function code to work for optimising this code.)
 Here is Darkbeams code

Quote
Description:

Computes the reciprocal of x with a different (continuous) function:

x' = sign(x)(1/Lim - 1/(abs(x)+ Lim ))


The DE is almost untouched, it should work fine also with a Raystep 0.5 !
Just don't go too low with the limiter to avoid noise.

In Mandelbulber I have it set up this way at present. I have the default parameters at 1.0 but 0.5 might be better in most cases. Hmmm

Here is the z.x part. Start/stop iteration controls are also necessary. The transform can be run on all three axis  until termination but  using  1 or 2 axis  for  only a few iterations is generally best, starting at iteration 0 or iteration1.  (It works well with the menger types but I suspect surf/box types is where this transform maybe at it's best).  

Covert from Mandelbulber to .frag:

if (fractal->transformCommon.functionEnabledx) type code is a checkBox
fractal->transformCommon.offset111.x) type code is a vec3 default(1,1,1) axis .x
fabs is abs

Code:
		if (fractal->transformCommon.functionEnabledx)
{
if (fractal->transformCommon.functionEnabledAx)
tempZ.x = (1.0 / fractal->transformCommon.offset111.x) - 1.0 / (fabs(z.x) + fractal->transformCommon.offset111.x);

if (fractal->transformCommon.functionEnabledAxFalse)
tempZ.x = (fractal->transformCommon.offsetA111.x) - 1.0 / (fabs(z.x) + fractal->transformCommon.offset111.x);

tempZ.x += fabs(z.x) * fractal->transformCommon.offset000.x; // function slope

if (z.x > 0.0)
{
z.x = tempZ.x;
}
else
{
z.x = -tempZ.x;
}
}


* cmt recipr3 008 600.jpg (136.94 KB, 600x600 - viewed 116 times.)

* Recip3.jpg (93.02 KB, 611x562 - viewed 95 times.)
Logged
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #62 on: November 08, 2016, 04:48:51 AM »

@Darkbeam. I checked out  chebyshev rotation on the net.  afro

I have just starting on MixPinski   smiley  huh? huh? embarrass smiley grin huh?  In a day or two I will probably seek some clarification grin
Logged
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #63 on: November 08, 2016, 10:52:40 AM »

hehe by the way I got an identical effect using a shorter formula (not three just one I think?). I called it ngon (and ngon2) but I don't remember how it works! cheesy lol
Maybe with a combo of "normal" atan2 and stuff...
But now I am curious about MPinski wink
Sign(x) is normally a one line macro.
Or sgn(x)=x/abs(x) horrible! cheesy
Or you make some AND with sign mask then if it is 0 it is a positive number else a negative. Duh hackish stuff sorry cheesy
There are premade cakes in Stackoverflow too; http://stackoverflow.com/questions/1903954/is-there-a-standard-sign-function-signum-sgn-in-c-c
Btw I think you added too much stuff ... the mb3d counterpart is really a 1 line... smiley
« Last Edit: November 08, 2016, 11:13:25 AM by DarkBeam » Logged

No sweat, guardian of wisdom!
claude
Fractal Bachius
*
Posts: 563



WWW
« Reply #64 on: November 08, 2016, 12:20:37 PM »

my favourite version is: sign(x) = (x > 0) - (x < 0)
Logged
Sabine
Fractal Fertilizer
*****
Posts: 373



WWW
« Reply #65 on: November 08, 2016, 05:29:44 PM »

@Luca Is this THE _reciprocalX,...Y,... - ...Z3 you're all talking about??? And if yes... We can haz for Frag?  love
Logged

sabine62.deviantart.com
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #66 on: November 08, 2016, 05:35:01 PM »

Lol Sabi! Yes it is but what do you mean? You can code it as a one line transform then add it after a menger iter smiley ... easy for a basic programmer like you!
 kiss grin
Logged

No sweat, guardian of wisdom!
Sabine
Fractal Fertilizer
*****
Posts: 373



WWW
« Reply #67 on: November 08, 2016, 08:02:21 PM »

I never touched anything even remotely 'fractalesque' with basic in the last 30 years, I think, and what I did then was only very basic fractal stuff.
Basic I used in my work and later VScript and JScript (now Those are really hi-tec, I know!  rolling on floor laughing) for simple eventlog readouts, replication-logs and other info for rapporting, WMI stuff, that kind thing, mostly r/w & string-modification-hell. And sometimes still write something small and handy or fun for at home. Ohh forgot: some LISP for Autocad in the jolly 90's, whahaha now that will come in handy :}
So really, Luca, trust me now and forever, I'm a total nitwit when it comes to fractals AND programming, honestly!!!  cry

But will try nonetheless wink kiss

Logged

sabine62.deviantart.com
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #68 on: November 09, 2016, 02:01:40 AM »

@sabine02

Reciprocal3  x' = sign(x)((1/Lim - 1/(abs(x)+ Lim)  works best,
 including the linear slope    + (abs(x) * slope)       works well
adding a two limit mode works OK in some cases,  but can cause poor DE


@darkbeam & claude

template <typename T>
inline int sign(T val)
{
   return (T(0) < val) - (val < T(0));
}

is what Buddhi has added for me,although I currently cannot get it to work smiley

With MixPinski "A strange but intriguing fractal",  progress stopped at 4D rotation,  huh?, is there any examples of how this is done??

Meanwhile, when looking at 4D rotation I came across the tesseract afro

https://en.wikipedia.org/wiki/Rotations_in_4-dimensional_Euclidean_space#/media/File:Tesseract.gif

and I start wondering if this structure translation has been used in making a fractal?
Logged
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #69 on: November 09, 2016, 05:02:45 AM »

CrossMengerTrick alternating with  rotateForward_fold_rotateBack (rotatedAbs, rotatedFolding & "rotatedMBoxFolding")


* cmt rotatedFolding aaa1 600.jpg (117.87 KB, 600x600 - viewed 101 times.)
Logged
Sabine
Fractal Fertilizer
*****
Posts: 373



WWW
« Reply #70 on: November 09, 2016, 09:04:50 AM »

@mclarekin Thanks a lot smiley
Logged

sabine62.deviantart.com
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #71 on: November 09, 2016, 09:56:07 AM »

Dear mclarekin you may look at this shader for a reference wink

https://www.shadertoy.com/view/llSSzc

It has xw yw and zw routines. I am sure MBulber already has a 3d rotation support wink
You just modify routines accordingly. (A copypaste should do the job cheesy ).
The mixpinski itself is just a modded copypaste of Knighty Sierpinski fused with Menger but with one more dimension!
« Last Edit: November 09, 2016, 12:02:34 PM by DarkBeam » Logged

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



« Reply #72 on: November 10, 2016, 03:05:07 AM »

PrismShape for 1 iteration to deform crossmenger trick.

 This crude deformation is by replacing line in prismShape
         dot1 = (z.x * -SQRT_3_4 + z.y * 0.5) * fractal->transformCommon.scale;
by
         dot1 = (z.y * -SQRT_3 + z.z)     * fractal->transformCommon.scale;

@darkbeam. Answering two questions with one link, well done. smiley

I recognise that 4D rotation from somewhere back then, it looks much simpler  now.

That tesseract is  hypnotizing/fascinating to watch.

Thanks again smiley


* cmt dot 003 600.jpg (95.59 KB, 600x600 - viewed 93 times.)
Logged
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #73 on: November 12, 2016, 04:54:25 AM »

This is the UI setup for darkbeams rotateForward_Fold_rotateBack,  that I have used to deform the CrossMengerTrick.  The UI only covers some of the possibilities. 

 Seems to work well with mandelbulbs too!


* rotated folding.jpg (92.39 KB, 552x809 - viewed 96 times.)
Logged
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #74 on: November 12, 2016, 04:57:12 AM »

Here I have deformed the CrossMengerKIFS with Darkbeams tetra3D.


* cmKIFS tetra3D 001 600.jpg (210.03 KB, 600x600 - viewed 94 times.)
Logged
Pages: 1 ... 3 4 [5] 6 7   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
cross 2D Art ramblerette 0 1561 Last post March 29, 2009, 02:28:49 PM
by ramblerette
At the Cross Images Showcase (Rate My Fractal) John Smith 0 1172 Last post June 10, 2012, 10:43:53 PM
by John Smith
Cross JWildfire Gallery thargor6 1 864 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 5761 Last post April 29, 2013, 03:35:56 PM
by cKleinhuis
Cross Mandelbulb3D Gallery MichaelWGioffredi 0 909 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.224 seconds with 25 queries. (Pretty URLs adds 0.016s, 2q)