Logo by bib - 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. April 27, 2024, 10:06:26 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 ... 9   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: Implementing MixPinski  (Read 20651 times)
0 Members and 1 Guest are viewing this topic.
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #60 on: November 18, 2016, 04:32:00 PM »

We are have similar thoughts  smiley Last week I began collect all my frags since 0.9.12 for sharing

upd.: 1st complete render  embarrass

Labyrinth

« Last Edit: November 18, 2016, 05:04:44 PM by Crist-JRoger » Logged

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



WWW
« Reply #61 on: November 18, 2016, 06:51:16 PM »

...
rotation will be 4D when I get back to finishing off coding the 4D rotation. 3D is temporary.  There could be a .frag somewhere with 4D rotation already coded ?? This is where I was before I got sidetracked.
...
4D in frag? I think no. Not seen
Can you extend this frag 3D rotation to 4D? (see \Examples\Include\MathUtils.frag)
Code:
// Return rotation matrix for rotating around vector v by angle
mat4  rotationMatrix(vec3 v, float angle)
{
float c = cos(radians(angle));
float s = sin(radians(angle));

return mat4(c + (1.0 - c) * v.x * v.x, (1.0 - c) * v.x * v.y - s * v.z, (1.0 - c) * v.x * v.z + s * v.y, 0.0,
(1.0 - c) * v.x * v.y + s * v.z, c + (1.0 - c) * v.y * v.y, (1.0 - c) * v.y * v.z - s * v.x, 0.0,
(1.0 - c) * v.x * v.z - s * v.y, (1.0 - c) * v.y * v.z + s * v.x, c + (1.0 - c) * v.z * v.z, 0.0,
0.0, 0.0, 0.0, 1.0);
}
Logged

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



WWW
« Reply #62 on: November 18, 2016, 07:48:28 PM »

...
P = p + offset;
P = p * rotmatrix;
P = p - offset;
Thank you! Added this but conversely  undecided huh?
Code:
for(int i=0; i<MI; i++){
if(PreOffset) z-=offsetM;
if(i>=PreRotStart) z.xyz*=fracRotation1;

if(z.x+z.y<0.0) z.xy = -z.yx;
     if(z.x+z.z<0.0) z.xz = -z.zx;
     if(z.y+z.z<0.0) z.zy = -z.yz;
   if(z.x+z.w<0.0) z.xw = -z.wx;
     if(z.y+z.w<0.0) z.yw = -z.wy;
     if(z.z+z.w<0.0) z.zw = -z.wz;

z+=offsetM;
...
And really works and sometimes result looks differently
Maybe it's mathematically incorrect?
Logged

Sabine
Fractal Fertilizer
*****
Posts: 373



WWW
« Reply #63 on: November 18, 2016, 08:23:33 PM »

@mclarekin Ohh yes, pixel... I am really Really embarrassed now because I have read so many times that p=pixel...  embarrass And the formulas always are z=... But there you see the difference for me about reading something and Doing something. With me the theory seldom ever really sinks in until I have tried it myself. The same with distance estimation: I have read Syntopias writings many times, but it never really stuck and all stayed very much theoretical. Now I am busy with the formulas it all starts making much more sense, and the DE-bit in the Mandelbulber-Manual you recommended is excellent as a starter, much less intimidating than anything else I have read on the topic.
Also agree about calling it p makes more sense than calling it z (z is for maths people, p is for coords people;) )

BTW Had another go at your alternative DE version, now working finally!!!! As usual programming language was very unforgiving, it wanted a properly defined variable :}

Olde code:
Code:
float DE(vec3 p)
{
vec4 z=vec4(p,w);
float r2=0.;  //  r2 is a better term as we are using radius squared for bailout (dot(z,z) )
float Dd = 1.0;

for(int i=0; i<MI && r2<bailout; i++){

New code:
Code:
float DE(vec3 p)
{
vec4 z=vec4(p,w);
float r2=0.;  //  r2 is a better term as we are using radius squared for bailout (dot(z,z) )
float Dd = 1.0;
int i;
for(i=0; i<MI && r2<bailout; i++){

Notice how the condition of the loop had to change too.

and the 'footer'wink will work as you wrote:

Code:
float r = sqrt(r2);
//return (r - offsetD) / abs(Dd); // offsetD has a default of 0.0 which is the std case. The offsetD results are similar or maybe the same as adjusting Detail Level( Quality)
float Iter = i; // this DE works also in openCL so it might be something to with "i" in Fragmentarium
return sqrt(r)*pow(scaleM,-Iter);
}

@Crist-JRoger: Great Labyrinth! A real beauty  smiley
Can you try the code up here in your frag and test if the frag is still intact? It needs a bit adjusting on Detail and Fudgefactor...
Have also looked at 4D-formulas in fragM, haven't found any 4D-rotation, also had a look at the rotations in mathutils like you, but felt rather intimidated by all the sinusses and cosinusses  crazy eyes  laugh
Logged

sabine62.deviantart.com
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #64 on: November 18, 2016, 08:42:32 PM »

Sabine, ok I'll check it
Just for fan  cheesy added z.w+=sin(z.w); then replace to z.w-=sin(z.w); then z.w-=sin(z.w)+cos(z.w);  hrmm after Dd *= scaleM; in loop







Logged

Sabine
Fractal Fertilizer
*****
Posts: 373



WWW
« Reply #65 on: November 18, 2016, 09:32:40 PM »

@Crist-JRoger: Ehmm... the upper image: Seems you found SMOOTH Mixpinski!!!  grin grin grin A Beer Cup

I am still trying to get reciprocalX3b to work, but it plays merry hell with the DE (it also does next to really cool also really terrible things in mb3d, but there it is much more controleable (for me... wink)) crazy eyes It does behave better with the alternative DE-return, but still not good!



I really am not sure now if this is the 'normal' distortion and it is only me not finding the right place for it to look good, or if there's still something amiss with the code...  suspious Need to test more...
Logged

sabine62.deviantart.com
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #66 on: November 18, 2016, 09:38:33 PM »

About return func.
return r/abs(Dd); enouth because in Frag we have Detail/FudgeFactor sliders and offsetD have the same intention.
return sqrt(r)*pow(scaleM,-Iter); gives very strange results, i don't like it )

easier - it is better ©
Logged

Sabine
Fractal Fertilizer
*****
Posts: 373



WWW
« Reply #67 on: November 18, 2016, 10:01:02 PM »

Hm, I think it is better than return r/abs(Dd) and also, Fudgefactor can be set to 1 if necessary without discontinuations...  grin
Can we agree to disagree and keep both? wink
Logged

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


Fragments of the fractal -like the tip of it


« Reply #68 on: November 18, 2016, 10:15:43 PM »

Thank you! Added this but conversely  undecided huh?
Code:
for(int i=0; i<MI; i++){
if(PreOffset) z-=offsetM;
if(i>=PreRotStart) z.xyz*=fracRotation1;

if(z.x+z.y<0.0) z.xy = -z.yx;
     if(z.x+z.z<0.0) z.xz = -z.zx;
     if(z.y+z.z<0.0) z.zy = -z.yz;
   if(z.x+z.w<0.0) z.xw = -z.wx;
     if(z.y+z.w<0.0) z.yw = -z.wy;
     if(z.z+z.w<0.0) z.zw = -z.wz;

z+=offsetM;
...
And really works and sometimes result looks differently
Maybe it's mathematically incorrect?
No idk what is correct anymore!!!  Lol huh?
But I love the water cloudy pinsky a lot A Beer Cup
Also Sabine's Image!
Logged

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



WWW
« Reply #69 on: November 18, 2016, 10:42:27 PM »

Hm, I think it is better than return r/abs(Dd) and also, Fudgefactor can be set to 1 if necessary without discontinuations...  grin
Can we agree to disagree and keep both? wink
Strange, very strange, because I have freezes and lags with return sqrt... But  r/abs(Dd) works with Fudgefactor=1  undecided
Diffetent frags? Here my last edit

DarkBeam, thank you! Any ideas for randomize pinsky in Frag?  grin

* MixPinski.frag (19.09 KB - downloaded 38 times.)
Logged

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



« Reply #70 on: November 18, 2016, 11:28:47 PM »

set up
 iteration 0 mixPinski
iteration 1 3D rotation
iterations 2 - termination   Mixpinski

all combinations  of  45,0, 45     45, 0,0     45,45,45  etc produce interesting symmetric shapes.  I like 45,45,45 the best .
 attached image is 45,0,0

other image is a minimalistic  structure   a hybrid with prismeshapeCMT


* mixPinski can2 default 45x S7.jpg (159.54 KB, 644x492 - viewed 56 times.)

* mixPinski cmt dal6a 800.jpg (75.39 KB, 800x600 - viewed 64 times.)
Logged
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #71 on: November 19, 2016, 12:15:53 AM »

  linear analytic DE my current thoughts:

In a standard situation when we graph outDist value over iteration count, and adjusting DE value by "* scale", the  curve is following the equation  outDist =  r/DE.

This is good for "safe, robustDE" fractals, but when the Distance Estimation is not good we can try tweaking the outDist maths.


outDist =   ( r- tweakOffset) / (DE * tweakScale) 


Now if we are tweaking only one iteration,  I can tweak to the same specific tweaked outDist value by using either manipulating the scale or offset tweaks.

But when we are tweaking more than one iteration (all iterations is the most normal case)  the two tweaks work differently.

The offset is tweaking the outDist by a constant value each iteration, whereas the tweakScale is tweaking  the outDist proportional to  tweakScale.

Alternatively I also tweak  this way 

outDist = r  /  ((DE * tweakScale) -tweakOffset)



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



« Reply #72 on: November 19, 2016, 01:29:34 AM »


previous post I wrote about tweaking the outDist  after termination condition has been met.

Alternatively we can tweak the outdistance by tweaking the DE at only specific iterations.

Example is when we are running an iteration loop where we add in a transform only at  iteration 4 ( or say at iters 5,6,7)

The maths of this added transform may be detrimental to the distance estimation calculation.

So we try including a generic DE tweak in the transform 's code   DE =  (DE * tweak scale) + tweakOffset).

I find that in some cases this will help.

Many of the latest formulas and some transforms in MandelbulberV2 have some sort of DE tweak included, maybe just a DE *= tweakscale.

For me this is another area of experimentation , that I still have to figure out.


BTW Crist and Sarbi, I note that we all seem to have various knowledge that each other lacks, I have learnt  new things working with you guys afro afro
Logged
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #73 on: November 19, 2016, 02:44:56 AM »

@ crist
Quote
And really works and sometimes result looks differently
Maybe it's mathematically incorrect?

if it makes a fractal that can be rendered with acceptable image quality, the maths is correct. IMHO grin

This is how I currently view the process ;

I could make a make Mandelbox out of four transforms - boxfold, spherical fold, scale and  addC.

I then can add in a rotation and an offset transforms.

I can then swap the order of all six transforms to make different fractals, then add in more copies of these six transforms. to make all possible combinations    ( except  note scale then rotate is the same as rotate then scale)

I then could further infinitize  by adding  in any other transform ,  z.x =sin(z), octo, fabs() prismShape, Bensi T1 etc .that work with analytical distance estimation.

I have start/stop iteration controls on every transform.

I conclude that  any combinations of transforms where the maths renders a good image in a reasonable amount of time,  is what I technically describe as "good maths" otherwise it is called "bad maths" and i dont  like it".. grin

But amongst all the infinite possibilities of transform sequences and parameter settings, some things work well others don't.   The  map forward to some maths then map back is a procedure that works well.

There is an infinite amount of combinations that can follow this rule.

example - symmetrical pattern (not tested)

magForward
* scale
+ offset1
rotForward
fasb(z+offset2)
rotBack
- offset1
* -scale
magBackwards

or a simple magForward ,  MBox ,  magBack

or    +offset  ,      ( scale,  fabs,  rotate, menger)  , -offset

this sort of thing is often "good maths" smiley




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



« Reply #74 on: November 19, 2016, 04:31:13 AM »

Back to the MixPinski

what we have is Mixpinski4D_mod1

the true mixPinski4 looks like this,

so TODO is  4D rotation plus  figure out the difference. so we can make the true mixPinski4.


* mixpinski default.jpg (105.16 KB, 480x360 - viewed 109 times.)
Logged
Pages: 1 ... 3 4 [5] 6 7 ... 9   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Help about implementing the perturbation theory Programming « 1 2 » CFJH 23 2412 Last post May 14, 2015, 06:40:57 PM
by therror
mixPinski 1600 Mandelbulber Gallery mclarekin 3 998 Last post November 19, 2016, 02:54:00 AM
by paigan0
mixPinski sphFold Mandelbulber Gallery mclarekin 0 1200 Last post November 19, 2016, 10:27:57 AM
by mclarekin
Implementing ABoxModKaliEiffie Amazing Box, Amazing Surf and variations « 1 2 3 » mclarekin 30 10841 Last post November 27, 2016, 11:52:55 AM
by Sabine
Implementing Menger Sponge 45 rot Sierpinski Gasket mclarekin 9 3631 Last post December 04, 2016, 10:49:35 PM
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.178 seconds with 25 queries. (Pretty URLs adds 0.011s, 2q)