### BURT 3D

• 19 Replies
• 159 Views

0 Members and 1 Guest are viewing this topic.

• 3f
• Posts: 1402

#### Re: BURT 3D

« Reply #15 on: May 31, 2019, 05:30:18 AM »
Ok, cleaned things up a bit, removed color code in an effort to keep it as simple as possible, adding color stuff is an exercise for the user
Honestly Sabine62 I would not have done this on my own, thank you for the nudge

Code: [Select]
#info 3Dickulus' Burt's bisector#info https://fractalforums.org/fractal-mathematics-and-new-theories/28/is-there-a-name-for-this-fractal/2748/msg13925#msg13925#info Distance Estimator#info Zn+1 = -Zn^3 + Zn^2 + Zn^1 + C#info #define WANG_HASH#include "MathUtils.frag"//#define providesColor#define providesInit//#define USE_IQ_CLOUDS#define KN_VOLUMETRIC#define USE_EIFFIE_SHADOW#define MULTI_SAMPLE_AO#include "DE-Kn2cr11.frag"#group Burt's Bisector Bulb// Number of fractal iterations.uniform int Iterations;  slider[0,9,100]// Number of color iterations.uniform int ColorIterations;  slider[0,9,100]// Bailout radiusuniform float Bailout; slider[0,5,30]uniform vec3 RotVector; slider[(-1,-1,-1),(0,0,0),(1,1,1)]uniform float RotAngle; slider[0.0,0,360]uniform bool Julia; checkbox[false]uniform vec3 JuliaC; slider[(-2,-2,-2),(0,0,0),(2,2,2)]mat3 rot;void init() { rot = rotationMatrix3(RotVector, RotAngle);}float power = 0.0;void powN(inout vec3 z, float r, inout float dr) { // extract polar coordinates float theta = acos(z.z/r); float phi = atan(z.y,z.x); dr =  pow( r, power-1.0)*power*dr + 1.0; // scale and rotate the point float zr = pow( r,power); theta = theta*power; phi = phi*power; // convert back to cartesian coordinates z = zr*vec3(sin(theta)*cos(phi), sin(phi)*sin(theta), cos(theta));}float DE(vec3 pos) { vec3 z=pos; float r; float dr=1.0; int i=0; r=length(z); vec3 z3=-z; vec3 z2=z; vec3 z1=z; while(r<Bailout && (i<Iterations)) { power = 3.; powN(z3,r,dr); power = 2.; powN(z2,r,dr); power = 1.; powN(z1,r,dr); z=z3+z2+z1; z+=(Julia ? JuliaC : pos); z*=rot; z3=-z; z2=z; z1=z; r=length(z); if (i<ColorIterations) orbitTrap = min(orbitTrap, abs(vec4(z.x,z.y,z.z,r*r))); i++; } return 0.5*log(r)*r/dr;}#preset DefaultGamma = 1Brightness = 1Contrast = 1Saturation = 1FOV = 0.4Eye = -3.49456263,0.020474322,-0.705406666Target = -2.49937892,0.024657886,-0.567591131Up = 0.121945783,-0.001467107,-0.880541503EquiRectangular = falseToneMapping = 5Exposure = 1GaussianWeight = 1AntiAliasScale = 2DepthToAlpha = falseShowDepth = falseDepthMagnitude = 1Detail = -4.5FudgeFactor = 0.279863481NormalBackStep = 1CamLight = 1,0.925490201,0.850980401,0.202830188BaseColor = 1,1,1OrbitStrength = 0.567567567X = 0.5,0.600000024,0.600000024,0.699999988Y = 1,0.600000024,0,0.656682028Z = 0.800000012,0.779999971,1,0.767281106R = 0.400000006,0.699999988,1,0.474048443BackgroundColor = 0.776470602,0.945097983,0.996078372GradientBackground = 3.59393232CycleColors = trueCycles = 3.0953488EnableFloor = trueFloorNormal = 0,0,1FloorHeight = 0.087248329FloorColor = 1,0.843137264,0.521568656FocalPlane = 4.87878819Aperture = 0InFocusAWidth = 0.644752018DofCorrect = trueApertureNbrSides = 7ApertureRot = 0ApStarShaped = falseBloom = falseBloomIntensity = 0BloomPow = 2BloomTaps = 4BloomStrong = 1LensFlare = falseFlareIntensity = 0.25FlareSamples = 8FlareDispersal = 0.25FlareHaloWidth = 0.5FlareDistortion = 1RefineSteps = 4MaxRaySteps = 5385MaxDistance = 78.9779322Dither = 0DetailAO = -0.848017619coneApertureAO = 0.5maxIterAO = 10FudgeAO = 0.136413641AO_ambient = 0.7AO_camlight = 1AO_pointlight = 1AoCorrect = 0Specular = 0.90131579SpecularExp = 152.887882AmbiantLight = 0.831372619,0.952941179,1,0.200000003Reflection = 0.200000003,0.200000003,0.200000003ReflectionsNumber = 1SpotGlow = trueSpotLight = 1,0.952941179,0.905882418,1.09622413LightPos = -7.23981895,-1.5837105,-3.8461538LightSize = 0LightFallOff = 0LightGlowRad = 0LightGlowExp = 1HardShadow = 0.61774744ShadowSoft = 18.1506849ShadowBlur = 0perf = falseSSS = falsesss1 = 0.1sss2 = 0.5HF_Fallof = 0.050774298HF_Const = 0HF_Intensity = 0.01594533HF_Dir = 0,0,1HF_Offset = 0HF_Color = 0.00392156886,0.984313726,1,0.953237409HF_Scatter = 0.068181818HF_Anisotropy = 0.403921574,0.215686277,0.0313725509HF_FogIter = 1HF_CastShadow = falseEnCloudsDir = falseCloudDir = 0,0,1CloudScale = 1CloudFlatness = 0CloudTops = -1.29545454CloudBase = -4.13636364CloudDensity = 1CloudRoughness = 1CloudContrast = 1CloudColor = 0.649999976,0.680000007,0.699999988CloudColor2 = 0.0700000003,0.170000002,0.239999995SunLightColor = 0.699999988,0.5,0.300000012Cloudvar1 = 0.99Cloudvar2 = 1CloudIter = 5CloudBgMix = 1WindDir = 0,0,1WindSpeed = 1Iterations = 10ColorIterations = 9Bailout = 2Julia = falseJuliaC = 0,0,0RotVector = 0,1,0RotAngle = 45#endpreset
...going to look closer at yours too mclarekin  just need some time

edit: rot back after julia
« Last Edit: June 01, 2019, 02:33:38 AM by 3DickUlus »
Fragmentarium is not a toy, it is a very versatile tool that can be used to make toys

https://en.wikibooks.org/wiki/Fractals/fragmentarium

#### mclarekin

• Fractal Frankfurter
• Posts: 604

#### Re: BURT 3D

« Reply #16 on: May 31, 2019, 07:44:18 AM »
@3DickUlus dont look at mine yet it keeps getting fixed.
I will implement in C++ to find out what is the best way of dealing with the DE.
But in theory it is now z = z^4 + z^3 +z^2 + z + c, for integer powers only, using asin atan2 type Mandelbulbs
where each seperate power has a weight control.

@sabine62, it is fast as there is no pow(). latest beta version attached (even faster)

• 3f
• Posts: 1402

#### Re: BURT 3D

« Reply #17 on: May 31, 2019, 04:30:34 PM »
-z^3 + z^2 + z is Burt

Yours has an extra term and not negating the first so I think it would be quite a bit different.

#### mclarekin

• Fractal Frankfurter
• Posts: 604

#### Re: BURT 3D

« Reply #18 on: June 01, 2019, 12:53:19 AM »
Yep, I am coding the asine atan2 generic  (eventually starting at z^8) , you can choose any subset of terms, and they can be positive or negative terms)

• 3f
• Posts: 1402

#### Re: BURT 3D

« Reply #19 on: June 08, 2019, 09:22:58 AM »
I'm done (for now) playing with the code for Burt's Bisector Bulb, finding some really amazing stuff hiding in this one.

Basic coloring, change to suit as you please.

All of the thumbs in the contact are in BBB.frag as presets.

### Similar Topics

###### BURT 2D

Started by 3DickUlus on Code Snippets (fragments)

12 Replies
889 Views
April 24, 2019, 09:06:28 AM
by Sabine62