Skip to content

Commit

Permalink
V1.99
Browse files Browse the repository at this point in the history
  • Loading branch information
thargor6 committed Nov 23, 2017
1 parent e0051c0 commit 66c45c9
Show file tree
Hide file tree
Showing 25 changed files with 994 additions and 237 deletions.
15 changes: 15 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
V1.99
- Point-Cloud-export:
- major increase of sampling-quality
- minor speed-in crease (is compensated by generating more samples)
- jitter-option to improve sampling of round shapes, usually gives good results at high
volumetric resulutions > 1000
- option to generate normal vectors (is not the same as approximating the normals on the final mesh)
- display elapsed time
- Progressbar for the BulbTracer-preview
- renamed the "MeshGen"-button back to "BulbTracer" (which was always the intended name)
- updated the huge JIT-formula.pack ("EM_JIT_M3Formulas") from Alef from fractalforums.com
- Added the missing formulas to the distribution: JosKn-KleinIFS, JosKn-ModIFS, K-TowerIFS
- updated (again) the huge JIT-formula.pack ("EM_JIT_M3Formulas") from Alef from fractalforums.com
- NEW RELEASE

V1.98
- Point-Cloud-export in the BulbTracer-module, which is able to generate very nice
models in high resolution in a short time, even with color (which is currently
Expand Down
Binary file modified EM_JIT_M3Formulas/Domofractal_Explanation.txt
Binary file not shown.
Binary file modified EM_JIT_M3Formulas/EM_formulasFULL_readme.txt
Binary file not shown.
32 changes: 29 additions & 3 deletions EM_JIT_M3Formulas/JIT_EM_Fld_BoxBulb.m3f
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
.Double Scaleing = 2.5
.Double vAdditionX = 0
.Double vAdditionY = 0

[SOURCE]
procedure FoldBoxbulb(var x, y, z, w: Double; PIteration3D: TPIteration3D);
var
Expand All @@ -29,11 +28,17 @@ x:=x* Scaleing;
y:=y* Scaleing;
z:=z* Scaleing;


//===================================================
///Addition, new version - julia set like
x := x + vAdditionX ;
y := y + vAdditionY ;
z := z + AdditionZ ;


//=============================================
//Now starts bulb

// supermodulus of power 4
x1:= x*x*x*x;
y1:= y*y*y*y;
Expand All @@ -43,18 +48,39 @@ z1:= z*z*z*z;
sq_xz := Power(x1+z1 , 0.25);



//==================================================================
// conditionals used to speed up calculation with certain values
if Power_ = 2 then
begin

r:= sq_r*sq_r;

theta := arctan2( sq_xz , y) * 2;
zangle := arctan2(x,z) * 2;

end
else
begin

// else calculate in full hard way

r:= power(sq_r, Power_);

theta := arctan2( sq_xz , y) * Power_;
zangle := arctan2(x,z) * Power_;

end;



x := sin(zangle)*sin(theta)*r ;
y := cos(theta) *r ;
z := sin(theta)*cos(zangle)*r ;

end;
[END]
Formula version 1.2
Formula version 1.3

Folds pillow like mandelbulb shapes.
Slow
Relatively slow
23 changes: 22 additions & 1 deletion EM_JIT_M3Formulas/JIT_EM_N_ChudoBox.m3f
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,23 @@ z := z + Addition ;
///Benesi to Mag / pine transformation
/// I have no idea how this works, but the effect should be fixed rotation.
/// Thanks M Benesi for transform.


//==================================================================
// conditionals used to speed up calculation with certain values
if vBenesiRotation = 0 then
begin

// there is nothing to calculate

end
else
begin

// else calculate Benesi to Mag / pine transformation
// This version is faster than original by about 2 seconds in minute.
// As I used more pre-calculated constant values

temp := x * sqt23TOsqt12 - z * sqt13TOsqt12 ;
z1 := x * sqrt_1_3 + z * sqrt_2_3;
y1 := y * sqrt_1_2;
Expand All @@ -64,6 +80,11 @@ x:=x1*vBenesiRotation + x*temp;
y:=y1*vBenesiRotation + y*temp;
z:=z1*vBenesiRotation + z*temp;

end;





//=====================================(^_^)
///folds of different lenght
Expand Down Expand Up @@ -92,7 +113,7 @@ z := z + PIteration3D^.J3;

end;
[END]
Formula version 1.2
Formula version 1.3

3D Amazingbox type fractal. This version is more powerfull.
(^_^)
Expand Down
36 changes: 32 additions & 4 deletions EM_JIT_M3Formulas/JIT_EM_N_Domofractal.m3f
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,46 @@ z := z + vMengerZ*scale2;
z := scale *z;


//=================================
// this useless conditional speed up the next one
// At least on my AMD PC.
// Maybe becouse of weak compiler, some code optimisation or something like that, I hawe no idea why.
if Thickness = 4 then
begin
end;


//=================================================
// Unit vector addition. Unit Vector = x,y,z / |x,y,z|


//==================================================================
// conditionals used to speed up calculation with certain values


if Thickness = 0 then
begin



end
else
begin

// else calculate

radius :=sqrt(x*x+y*y+z*z) ;
x:= x - Thickness*x/radius ;
y:= y - Thickness*y/radius ;
z:= z - Thickness*z/radius ;

end;

x:= x - Thickness * x/radius ;
y:= y - Thickness * y/radius ;
z:= z - Thickness * z/radius ;


end;
[END]
Formula version 1.1
Formula version 1.3

House creator based on folds and Menger Cube
(Luca GN formula MengerSmt code).
Expand Down
189 changes: 189 additions & 0 deletions EM_JIT_M3Formulas/JIT_EM_N_ElazoBulb.m3f
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
[OPTIONS]
.DEScale = 0.9
.SIPow = 2
.Version = 9
.Double F1_Power = 4
.Double F2_Power = -4
.Double Formula_Ratio = 0.5
.Double sCurvatureX = 2
.Double sCurvatureY = 2
.Double sCurvatureZ = 2
[SOURCE]
procedure Elazobulb(var x, y, z, w: Double; PIteration3D: TPIteration3D);
var

r, rpow, th, ph, th1, ph1, th2 ,ph2: double;
invpower, x2, y2, z2: double;
intpowerX, intpowerY, intpowerZ : integer;
sinph, cosph, sinth, costh, temp, ratio : double;


begin

//=================================================
// 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
r := abs(x) + abs(y) + abs(z);
end


else if intpowerX = 2 then // choice2. If curvatures is 2 then use standart formula
begin
r := 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);
r := 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);
r := 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);
r := power( temp ,invpower);


end;

//all of this were just to calculate the radius



//===========================================

//same angles for both bulbs;
th := ArcTan2(y, x);
ph := ArcSin(z/r);


//=====================================
// mandelbulbs
//No 1

th1 := th * F1_Power;
ph1 := ph * F1_Power;
rpow := Power(r, F1_Power);

///calculate sin and cos at once;
SinCos(th1, sinth, costh);
SinCos(ph1, sinph, cosph);

// If there is no SinCos function just put () around ph and th
// and add formula number -> rpow * cos(ph1) * cos(th1);

x := rpow * cosph * costh;
y := rpow * cosph * sinth;
z := rpow * sinph;

//=========================================
// mandelbulb
// No 2

// if both bulbs is equal recycle values.

if F1_Power = F2_Power then
begin
x2:=x;
y2:=y;
z2:=z;
end

else
begin

// else calculate other bulb, too

th2 := th * F2_Power;
ph2 := ph * F2_Power;
rpow := Power(r, F2_Power);

///calculate sin and cos at once;
SinCos(th2, sinth, costh);
SinCos(ph2, sinph, cosph);

x2 := rpow * cosph * costh ;
y2 := rpow * cosph * sinth ;
z2 := rpow * sinph ;

end;

//=========================================
// interpolate formulas
// Here is like when on ruler one bulb is on 0 cm another is on 1 cm.

ratio:= (1-Formula_Ratio);

x:=x2*Formula_Ratio + x*ratio + PIteration3D^.J1;
y:=y2*Formula_Ratio + y*ratio + PIteration3D^.J2;
z:=z2*Formula_Ratio + z*ratio + PIteration3D^.J3;


end;
[END]
Version 1.3
Maybe this is one of the most tehcnologicaly advanced mandelbulbs ever (^_^)

Using idea from GNJ - two real power standart mandelbulbs (F1 , F2) interpolated (ratio) - empty middles.

And my
of calculating radius in distorted space - superseed shape:
curvature = 1 - diamond - angular and stretching (floral) bulb
curvature = 2 - sphere - ordinary bulb
curvature = 4 - iphone shape - streamlined - pillow shaped bulb


By tehnologicaly advanced I meant that this is "smart" formula:
if powers or all curvatures is equal it awoyds some slow functions, and 1 1 1 or 2 2 2 uses faster formulas.


Alsou to speed up space Curvature uses only integer values, 1,2,3...
Equal curvatures is more noiseless.

* * *
By Edgar Malinovsky
Loading

0 comments on commit 66c45c9

Please sign in to comment.