Logo by Madman - 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. December 05, 2021, 02:58:06 AM


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: Kalezobox  (Read 1693 times)
0 Members and 1 Guest are viewing this topic.
Alef
Fractal Supremo
*****
Posts: 1174



WWW
« on: September 21, 2017, 03:01:38 PM »

Formula introduction (boring stuff). The post is intended to be like wikipedia page.

1. I wanted to make something analogous of amazingbox/mandelbox - having same logos, but so that it would not be anywhere a variation of mandelbox. Alsou I had JIT formula tutorial of http://gannjondal.deviantart.com with variation on mandelbox which was good as tutorial but not more.

Without analytical DE and one bad thing in it's spherefold it took some effors to get the clean picture. I got it only after I deconstructed spherefold.

2. I wanted to explore Lp spaces.


Kalezobox:

Changable variables and then variables.
Code:
[OPTIONS]
.DEScale = 0.5
.SIPow = 2
.Version = 9
.Double FoldX = 1
.Double FoldY = 1
.Double FoldZ = 0.5
.Double Radius_SI = 1
.Double Radius_SI_Min = 0.3
.Double Scale = 3
.Double sCurvatureX = 2
.Double sCurvatureY = 2
.Double sCurvatureZ = 2
.Double vAddition = 0
[SOURCE]
procedure KalezoBox(var x, y, z, w: Double; PIteration3D: TPIteration3D);
var
  radius, temp, invpower, contrscale : double;
intpowerX, intpowerY, intpowerZ : integer;

begin


Fold is rectangle not box. Maybe that isn't genial innovation but this allows to make amazing surface formula like with z=0, open the box if z=0.5 and change the gabarites of the fractal.

The fold is the mirror of original boxfold. I guess the 3 centers is where graph crosses the x axis.

Code:
x := x +  abs(x- FoldX) - abs(x+ FoldX)  ;
y := y +  abs(y- FoldY) - abs(y+ FoldY)  ;
z := z +  abs(z- FoldZ) - abs(z+ FoldZ)  ;


Julia like addition. I had some doubts about added value of this transformation, but it slightly moves object around and in far away wiev it makes box more interesting.
Code:
x := x + vAddition ;
y := y + vAddition ;
z := z + vAddition ;


Calculating radius in Lp spaces - a p-norm but with different p's in each axis.
radius = p root of( |x|^px + |y|^py +  |z|^pz  )

geometric mean of px, py, pz worked the best for the p root. I 'm not shure about mathematical corectness of this. There probably should be more algebraic corect formula for the p root.

It have a lots of slow functions so I made conditionals for specific cases like 2,2,2 - ordinary spherical radius and 1,1,1 - taxicab space with very fast calculating radius= abs(x) + abs(y) + abs(z) and for a case when p in all axis is equal. Alsou I used integer only p's. IntPower is faster than Power.

"Space Curvature" is a descriptive name for "p".

Code:
//=================================================
// The most advanced part
// instead of radius:= sqrt (x*x+y+y+z*z);
/// calculate radius in space where circle is circle (2), square (1) or Iphone shape (4)
// It is like Lp spaces but different along each axis.
// Using just int values - mutch faster.
//Using inverse of geometric mean. arithmetic mean don't works so well here.

intpowerX:=round(sCurvatureX);
intpowerY:=round(sCurvatureY);
intpowerZ:=round(sCurvatureZ);



// blockchain of conditionals used to speed up more basic versions of this.
//If Curvature X=Y=Z calculate root power without calculating mean value of all
if intpowerX = intpowerY then
  begin

if intpowerY = intpowerZ then  // all curvatures is equal
   begin


if intpowerX = 1 then  // choice 1. If curvatures is 1 then use fastest formula
  begin
radius  := abs(x) + abs(y) + abs(z);
end


   else if intpowerX = 2 then  // choice2. If curvatures is 2 then use standart formula
  begin
radius  := sqrt( x*x + y*y + z*z);
end


else  //choice 3. else use heavy formulas, equal powers
begin

invpower:= 1/ intPowerX;
temp:=  intPower( abs(x),intPowerX) + intPower( abs(y),intPowerY) +intPower( abs(z),intPowerZ);
radius  := power( temp ,invpower);

end;

end

   else  //choice 4 use all heavy operators
   begin


//inverse of geometric mean, calculates necesary root value
invpower:= power(intPowerX *intPowerY *intPowerZ,-0.33333333333333333333);
temp:=  intPower( abs(x),intPowerX) + intPower( abs(y),intPowerY) +intPower( abs(z),intPowerZ);
radius  := power( temp ,invpower);


end;
end

  else  //choice 4 use all heavy operators

  begin


//inverse of geometric mean, calculates necesary root value
invpower:= power(intPowerX *intPowerY *intPowerZ,-0.33333333333333333333);
temp:=  intPower( abs(x),intPowerX) + intPower( abs(y),intPowerY) +intPower( abs(z),intPowerZ);
radius  := power( temp ,invpower);


end;

//all of this were just to calculate radius


Now is the "spherefold" part.
Original mandelbox "spherefold" have 3 conditionals and it actualy does 2 transformations: the spherefold (spherical analog of boxfold) and sphere inversion. Characteristic mandelbox shapes are generated becouse of sphere inversion. In academic papers about sphere inversions the inversed squares looks like mandelbox shapes.

(in gannjondal tutorial formula "spherefold" contained sphere inversion and the solid sphere. M3D raymarcher don't likes that.)

At first I wanted to use just conditional sphere inversion. It generated the cleanest picture. But it was too boring;) So I decided to make sphere inversion between 2 radiuses like in the original mandelbox.
 
Alsou here sphere inversion is not limited by original Radius_SI =1

Code:
if radius < Radius_SI_Min then
    begin
    temp := scale;
    end
  else if radius < Radius_SI then
    begin
    temp:= radius*radius;
    temp := scale*Radius_SI*Radius_SI/temp;
   end
  else
    begin
    temp := scale;
    end;

Scaling is done together with "spherefold"
(x,y,z)=(x,y,z)*scale

+ C is added descaled.
I think z=z+C interacts with scale of fractal. Added c in the next iteration is multiplied by scale.
My comment that this generates cleaner picture and that plain z=z+c generates strech is true when there is quaternion z=z^2.
However here it does different thing, it eliminates box like owerall shape creating more sphere inversion like outlook. Maybe this alsou have to do with strech. Some strech could help to retain it's box shape when going throught boxfold.


Code:
contrscale:= 1/scale;
  x := x*temp + contrscale*PIteration3D^.J1;
  y := y*temp + contrscale*PIteration3D^.J2;
  z := z*temp + contrscale*PIteration3D^.J3;

Unlike mandelbulb I can't call this the most advanced version of abox becouse there are a lot of fairly advanced Aboxes by Darkbeam;)
This is becouse I don't like an idea of having credits being atributed to something like Hbazam205:
Code:
[END]
Version 1.3
 
Simplification, correction and then modification of Amazing/mandelBox

Uses sphere inversion between two radiuses.

+

Radius of the sphere is calculated in distorted Lp space - maybe superseed shape.
If curvatures in all axis is equal:
curvature = 1 - diamond
curvature = 2 - sphere
curvature = 4 - streamlined iphone shape - squircle or superelipse.


This is "smart" formula so if all curvatures are equal it awoyds some slow functions. Then if it is 2,2,2, or 1,1,1, it uses even less of slow functions.
Alsou to speed it up space Curvature uses only integer values, 1,2,3...


 * * *
By Edgar Malinovsky

In attachement, comparition of this boxfold and the orginal one of mandelbox. It's a mirror.


* Boxfold_versions.jpg (49.39 KB, 590x600 - viewed 775 times.)
« Last Edit: September 22, 2017, 04:19:49 PM by Alef » Logged

fractal catalisator
Alef
Fractal Supremo
*****
Posts: 1174



WWW
« Reply #1 on: September 21, 2017, 03:02:11 PM »

Pictures (fun stuff)

1.
Far away look on the most basic kalezobox. Folds(x,y,z)=1 , SI radius =1, si min radius = 0.25, scale=2.5, euclidian space ( curvature(x,y,z) =2 )

Mandelbulb3Dv18{
g.....Y/...E4...w....26...kc4AvgOVT5.zw2MXZOnN.EMNqBrmjjZznEvuh94mUvz25VSsrrfFyD
................................XIXgOVVoVz1........A./.........E........./2...wD
...Uz6/...UjW/...w.0/......f0...F/....E9.....AZyD.imTCqD/w......j77t0dkpXm1.....
./UaNaVD12..0.............................................U0.....y1...sD...../..
.w1...kDiggXlijv0yHMEr10PVj6zi5M4rOZPGqjWDpBSnM/HxPIxMnLRACUzAsVM.UMfBrjUJfr4STI
WxnQsvdn2kzQzYqj02Ml//sDU..../oxU/..Uv0..2....kD.2....sD..G.....................
.............oAnAt1...sD....zIg7........................................V....k1.
.....4iSoz1......1kz.wzzzL.U..6.5....61...EB....m....c3...k4....8/...I1....Sw952
.....wdelyjeYFnz....z1....6.2c..z1DV..UhV8JTUGyD6.bgyNvScz1............/8..Rjy8.
..KCQAiZ/.A.XwE7eDZzz8........../RU0.E190............s/........./.........E.lc..
zzzz.............0........E..........2U.8.kzzzD............8....................
/6U0.wzzz1...................................ozz61U7bck7RD.zzH7.aQW0b2X3mHOs.UZ2
6Vp0sQSOX/EJcIFJOHJyRO4.JlG3JV3P..Dw.IFJJJJbm/.wk1E3JJJJOxLzzXA.aQW0bgvTxzDm.Mm7
8QW..qzz61U7bck7...zzHdwuMVwY4ikvPYybV0XJt4.k1De................................
E....2..F2E.....I....c....UG7FpL3poLCxpGVlKNuxaEjV5.............................
...................wz.........zD........kz1........wz.........xD........2.2.....
...../.........E..........2.....................................................
........................}
{Titel: Kalezobox_sC444vAdd03_new}






2.
Eye like shapes generated by Lp spaces with different p's.


Mandelbulb3Dv18{
g.....Y/...k1...I....26....2lvpbi.d0.T/Zeo4MEbxj82YNmTh4EzHtidf685KuzQ/Zeo4MEbxj
................................rbwtoYcHfz1........5./.........E........y.2...wD
...Uz6/...ESs/...Q.0/....2EA....I/....Ef.....gKyZ4/8RapD/Q.........m0dkpXm1.fQcl
z.EnAnYD12..0..Q7D0RWmgLzGrlqhtJ8ZsDFcetOIt.3.A..........IU0.....y1...sD...../..
.wHnAnoDF3Q0/0eCpxH6mlw0jfc4zqsOg1ZFp3ojJmxcKjG.1wPmw1NVXV8Rz6ta4/l7vJpj5OQzoUli
/xX3i6cHKnKJzQ2CEpqv8GrDU..../I/q...Y81..2....kD.2....sD..G.....................
.............oAnAt1...sD....zIg7........................................I....k1.
.....4iSoz1.......kz.6ecWG.U..6.K/...Y0...kY....x2...k3...k3....8/...cqm....SD5A
fs4U.a0Ky7Os4rfcRYoWWy7lz16.1c..eyzq..UhV8JTUGyD6.bgyNvSczH..........2o/8.kdBrA.
..KCQAiZ/.A.XwE7eDZzz8..........3/kMxrsF.1..oLhBLPuvzu/m2oxrM4qj/QhaD8.33.Q.2c..
zzzz............k....................2./8.kzzzD............8....................
/EU0.wzzz1....................................RpR1UvNPcvtO0oJrB.yRiibT5BELRr..XR
SvxL.R1.p/.AqthrrI2oJrB.kMbrSX2HELRr.sSq4uCGEJbD..UvNPcvxB3oJrB.7TTTrLEJr.ER.srt
uSyoK/RpR1UTbfvt..EsUa3feeWCNqGQIJ36wk8EwyLsUa3f.c5HVlKOnVa98/pF................
E....2..F2E.....I....c....UG7FpL3poLCxpGVlKNuxaEjV5.............................
...................wz.........zD........kz1........wzMaNaNaNaNyD........2.2.....
...../........zD..........2.....................................................
........................}
{Titel: Kalezobox_eye_biger}






3.
Kalezobox with sphere inversion Radius = 1.175. It is alredy in examples but it have very typical and good shape.

Mandelbulb3Dv18{
g.....c....s/...S....26...UEIUBxgIN0.DwNxdug8./EvOEyXrV7JwXCRKdIPCGxzmTsLhr/FbyD
................................FLlv0qkyjz1........6./..................2/2...wD
...Uz6....UiB....Q.0/....2EM....1/....E9.....Ur/XjZXKhqD/Q......BJJ/0dkpXm1....U
z.UaNadD12../..........wz................................AU0.....y1...sD...../..
.zHnAnoDT8zZNtcJfx1..........m9OgNtBZNdjnjDFb79EAu1yFg.KdOHNzYYyE8CTy2qDK3Ji0lAM
FuHg8B.twtHMzSqU1NJeqIqDU.....2C5...FB...2....sD.6....sD..G.....................
.............oAnAt1...sD....zIg7........................................6....k1.
.....4iSoz1.......Er.QLMy/U6.UC.f....Y0...k6....x2...c3...E9....j....cK2....TN5A
...U.a0KyRLs4rPMRYoWyx7lz1..0c..rTzx...MarH7iXyD6oa4dabdnz1...........I.8.UF4N2.
.sM93P58iz9.eLISw7kxz0........../6U0.wzzz1...........s/........./.........E.0c..
zzzz............N1...................2U.8.kzzzD............8....................
/6U0.wzzz1....................................RpR1UvNPcvxDUCuc1.ibhVibw/ELRr.sSq
4uyZc.RpR1UTbfvtXl0.aJ5.yRiibb0AELRr.srtuSiLJ/RpR1.Aqthr7YpB.I5.kMbrS98LELRr..XR
Svhev/RpR1Emrrrx..EsUa3feeWCNqGQIJ36wk8EwyLsUa3f................................
E....2..F2E.....I....c....UG7FpL3poLCxpGVlKNuxaEjV5.............................
...................wz.........zDOaNaNaNadzHnAnAnAngwz...................6.2.....
...../.........E..........2.....................................................
........................}
{Titel: Kalezobox_sphInv1p175}






4.
Slightly improved parameter from Mutagen

Mandelbulb3Dv18{
g.....Y/...k1...I....26...UQFXBKwl5yz0TKjmxs5P0EAcT8r3AibzvXydrKtAUwzGLi4BjSXvzD
................................wqN63/kElz1........5./..................y.2...wD
...Uz6....Ulm1...M.0/....2Um....n/...2Ef.....EsYgj5S0FpD/.......Need0dkpXm1.xYY2
./UaNadD12..02kXl0UaUyRvzCPAobb7bXyDU94vOWdObz9...........U0.....y1...sD...../..
.zHnAnoDWXC/OzEG/uXyJr6ZDl7NzQbmoVxfNIpDGB7yRIq7bxPr9hJ0Itn.wAW/YFBir9dD7ZHtJeZs
EunnebXqjaFJz0VCH9tHQGqDU.....Ik2/.......2....sD.6....sD..G.....................
.............oAnAt1...sD....zIg7........................................I....k1.
.....83iyz1.......kz.wzzz1.U..6.P....61...EB....m....c3....5....2/...o2.....SN52
...U.ydelyjeYFnzvm9ZzLWiO16.1c..6XAm..EizccZWGyD6EdGkxmWcz1...........I/8.EBzA0.
.sM93P58iz9.MmnWK2zwz0........../RU0.E190............s/........./.........E.2c..
zzzz............n/...................2./8.kzzzD............8....................
/EU0.wzzz1...................................ozz61U7bck7RD.zzH7.aQW0b2X3mHOs.UZ2
6VJBsczNc.EJcIFJOHpzO04.JlG3JV3P..Dw.IFJJJJbm/.wk1E3JJJJOxLzzXA.aQW0bgvTxzDm.Mm7
8QW..qzz61U7bck7...zzHdwuMVwY4ikvPYybV0XJt4.k1De................................
E....2..F2E.....I....c....UG7FpL3poLCxpGVlKNuxaEjV5.............................
..........EoY3wbLlYtzkGnkGIc/byDVf53iSIs8zXNaNaNaNatzcNaNaNaNawDrGL4bq4Hsz1.....
...0./.......U.E..........oXx6QU0S.Xz0..........................................
........................}
{Titel: MutaGenEB3215F60EF242BA04B5_Kalezobox2_big}






5.
Deep zoom on surface like fractal. (shallow zooms was ugly) Folding in z axis = 0, no rotation and it is not a julia set. Naviagtor can't render it properly

Mandelbulb3Dv18{
g....../..UN0...V....26...Eoy7g5YlePzq3xYHNBHGsDXrhpUaAtbzfXoE1Dy1Kvzq3xYHNBHGsD
................................bET1XJ.Ya/2........5./..................o.2...wD
...Uz6.....tM/...M.0/......b....S0...2Ef.....InyDdyvrUiD/.......BJJJ0dkpXm1.8Qx6
z.UaNadD12../.UaAUFdJ0ztz0iesNpOyoyjDzG4u77W/x9...........U0.....y1...sD...../..
.zHnAnoDEGyFczyBcv1..........qfwgyEzKDVjPufAdNIH1sXXtoJGqXGtyUY5N65pDShDwrZT5BNJ
FsXpOA/RIzspyyGoKSYxcIiDU.....IuK........2....sD.6....sD..G.....................
.............oAnAt1...sD....zIg7........................................M....k1.
.....83iyz1.......kz.wzzz1.U..6.P....61...EB....m....c3....D....4/...k1.....Sn52
...U.4hsYzDklKuz....z1....6.1c..Dzwn...........U6.cXcESLfz1..........2Y28.UEkw..
.Ub96aAIVz9.1se7Umvxz0........../RU0.E190............s/........./.........E.2c..
zzzz............x/...................2./8.kzzzD............8....................
/EU0.wzzz1...................................ctDV/Uc0RXcp.ml5TA.gm8fgqiBD0VF.Ab5
0B5k5x624/kfiIqfKkZm2y0.nSr9nWiOHNE9.Ab5078zydtDV/Uc0RXcIxbaz24.W8oBWitTOyHM.6eE
r68jzdtDV/kqYltq..knScEIp/ml5Twlph2.6XWSAE3.F0UJ................................
E....2..F2E.....I....c....UG7FpL3poLCxpGVlKNuxaEjV5.............................
...................wz.........zD...................wz.........yD..........2.....
...../.........E..........2.....................................................
........................}
{Titel: Kalezobox_surf}




Logged

fractal catalisator
Alef
Fractal Supremo
*****
Posts: 1174



WWW
« Reply #2 on: October 10, 2017, 01:12:37 PM »

1.


Mandelbulb3D deep zoom at Kalezobox surface (z=0) which is absolutely thin (no rotation or anything else). Pure render, no lights.
Before modifications zoom out and from the surface will be necessary.

Mandelbulb3Dv18{
g.....E4....D...V....2A....dBqvhmeDHzGyKBfqjAIqDCgaOq/R/cz9OZO.kPpIvzGyKBfqjAIqD
................................PXw3H.NV402........5./..................q.2...wD
...Uz6...........ME0/....2U9/...c0...2.b.....Ufd/u6ICwdD/.......0ged1dkpXm1....U
./.LD8YD12..1.UaAUFdJ0ztz0iesNpOyoyjDzG4u77W/x9...........U0.....y1...sD...../..
.zHnAnoDpgxFpf0Y.v1..........KeaKXo3XgSjCG8dTafNOr1gUS2sT3DjyccW7fgAR.fDOfXho7Qh
brnTKC0nmo/gyKN3OrxLlnfDU.....YAqK.......2....sD.6....sD..G.0...................
.............oAnAt1...sD....zIg7........................................R....k1.
.....83iyz1.......kz.wzzz1.U..6.P....61...EB....m....c3....D....4/...k1.....Sn52
...U.4hsYzDklKuz6V2GzX2G6/6.1c..Dzwn...........U6.cXcESLfz1..........2Y28.UEkw..
.Ub96aAIVz9.1se7Umvxz0........../RU0.E190............s/...................E.2c..
zzzz............x/...................2./8.kzzzD............8....................
/EU0.wzzz1...................................ctDV/Uc0RXcp.ml5TA.gm8fgqiBD0VF.Ab5
0B5k5x624/kfiIqfKkZm2y0.nSr9nWiOHNE9.Ab5078zydtDV/Uc0RXcIxbaz24.W8oBWitTOyHM.6eE
r68jzdtDV/kqYltq..knScEIp/ml5Twlph2.6XWSAE3.F0UJ................................
E....2..F2E.....I....c....UG7FpL3poLCxpGVlKNuxaEjV5.............................
...................wz.........zD...................wz.........yD..........2.....
...../.........E..........2.....................................................
........................}
{Titel: Kalezobox_surf_deeper}





2.


Mandelbulb3D slight zoom at Kalezobox surface with (z=0.1).

Mandelbulb3Dv18{
g......0....4...V....I6...Ezat9hIw.wzavdzht584xDOCPl6XRO..gKGuHCN0B..96HanVlrGrD
................................X0r08PLjD.2........8./..................q.2...wD
...Uz6....ETE....Q.0/....2EW0...10...2Ea.....YW1AA6Er2nD/Q....../KJp0dkpXm1.8Qxc
z.EnAnYD16..0.UaAUFdJ0ztz0iesNpOyoyjDzG4u77W/x9...........U0.....y1...sD...../..
.zHnAnoD4EAyHVI0Kx1..........Gqh.9fJB6cjhklXsW.Ylt1HXY7nP1oIzkukLEeIkJoDEYBRU2rW
zt1TcESdG/LFz0Cfvfwq.BpDU.....YbW1..Tk0..2....sD.6....6E/.G.....................
.............oAnAt1...sD....zIg7........................................V....k1.
.....83iyz1.....c3kz.wzzzL.U..6.P....61...EB....m....c3...EC....2/...k1.....Sv52
...U.4hsYzDklKuz6V2GzX2G6/6.1c..Dzwn...........U6.cXcESLfz1..........2Y28.UEkw..
.Ub96aAIVz9.1se7UmvxzC........../RU0.E190............s/...................E.2c..
zzzz............x/...................2./8.kzzzD............8....................
/EU0.wzzz1...................................ctDV/Uc0RXcp.ml5TA.gm8fgqiBD0VF.Ab5
0B5k5x624/kfiIqfKkZm2y0.nSr9nWiOHNE9.Ab5078zydtDV/Uc0RXcIxbaz24.W8oBWitTOyHM.6eE
r68jzdtDV/kqYltq..knScEIp/ml5Twlph2.6XWSAE3.F0UJ................................
E....2..F2E.....I....c....UG7FpL3poLCxpGVlKNuxaEjV5.............................
...................wz.........zDOaNaNaNaty1........wz.........yD..........2.....
...../.........E..........2.....................................................
........................}
{Titel: Kalezobox_surf_thicker}
Logged

fractal catalisator
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Kalezobox Mandelbulb3D Gallery Alef 0 773 Last post August 22, 2017, 04:28:59 PM
by Alef

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