New formula - fixing the whipped cream quaternion issue.....

• 21 Replies
• 573 Views

0 Members and 1 Guest are viewing this topic.

mclarekin

• Fractal Frogurt
• Posts: 450

Re: New formula - fixing the whipped cream quaternion issue.....

« Reply #15 on: November 14, 2018, 08:28:56 AM »
@ FractalDave.  I am about to start looking at the rotabulb, but firstly some Mandelbulberv2 admin.

There are two of your fomulas in Mandelbulberv2 (below).  Should I add  http://www.fractalgallery.co.uk/ and https://www.facebook.com/david.makin.7 to the formula info?

Code: [Select]
/** * 3D Mandelbrot formula invented by David Makin * @reference * http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg7235/#msg7235 */void HypercomplexIteration(CVector4 &z, const sFractal *fractal, sExtendedAux &aux){ Q_UNUSED(fractal); aux.DE = aux.DE * 2.0 * aux.r; double newx = z.x * z.x - z.y * z.y - z.z * z.z - z.w * z.w; double newy = 2.0 * z.x * z.y - 2.0 * z.w * z.z; double newz = 2.0 * z.x * z.z - 2.0 * z.y * z.w; double neww = 2.0 * z.x * z.w - 2.0 * z.y * z.z; z.x = newx; z.y = newy; z.z = newz; z.w = neww;}

Code: [Select]
/** * Makin3D-2 found through the another shot at the holy grail topic at ff * @reference http://www.fractalforums.com/3d-fractal-generation/another-shot-at-the-holy-grail/ */void Makin3d2Iteration(CVector4 &z, const sFractal *fractal, sExtendedAux &aux){ Q_UNUSED(fractal); Q_UNUSED(aux); double x2 = z.x * z.x; double y2 = z.y * z.y; double z2 = z.z * z.z; double newx = x2 + 2.0 * z.y * z.z; double newy = -y2 - 2.0 * z.x * z.z; double newz = -z2 + 2.0 * z.x * z.y; z.x = newx; z.y = newy; z.z = newz;}

mclarekin

• Fractal Frogurt
• Posts: 450

Re: New formula - fixing the whipped cream quaternion issue.....

« Reply #16 on: November 14, 2018, 09:29:24 AM »
I thought I would have a QUICK look at your .zip before re-looking at sabines frag, there are nearly 22,000 LINES of code

Here comes some questions
a) what computer language do you use?

b) Is this correct
sqr = square, sqrt = square root,  |w| = realw ^2 + imagw ^2, cabs = length, flip = reverse sign.

I have to covert to p.xyzw , i  try not to think about real and imaginary. I have learnt that generally x is real and the rest are only imaginary, but I algebraically treat them all the  same (no favoritism )

• Posts: 171

Re: New formula - fixing the whipped cream quaternion issue.....

« Reply #17 on: November 14, 2018, 12:02:14 PM »
The particular code is for Ultra Fractal - http://www.ultrafractal.com/ and if you think mine's a lot there then check out the rest of my formulas and colourings (MMFx.xxx) plus ALL THE other publlc code for UF - easiest way is to download a trial version then update the public database from the menu in the program then view them from within UF itself, I think the ULB files in particular might startle a little
BTW apart from the new OOC (C++ style) as in the ulbs for UF the older programming formulas (uxf, ufm and ucl) can (nearly) all be imported into ChaosPro which is freeware.

You're correct except flip means swap the real and imaginary of a complex value - if you like i*conj(z) - and with respect to variable types, all the declarations are there apart from the predefined stuff like "z" or "#z" is complex, the other # variables are given in the help and the @ variables are all defined in the user parameter section. In older formulas that have no designation before "param" then a plain number as the default with no decimal point will be considered an integer parameter, with a decimal point or "E" or "e" as in 3E-6 will be considered a float, and true/false a boolean - enum returns an int depending on the selected option starting from 0 but if I remember correctly you can explicitly use the strings in commas in the code if you so wish e.g. if @param2 == "option 1"
Useful to note that cabs(z) is sqrt(|z|), getting |z| before a test (eg for zero) (and then getting the sqrt afterwards if necessary) occurs frequently
The meaning and purpose of life is to give life purpose and meaning.

• Posts: 171

Re: New formula - fixing the whipped cream quaternion issue.....

« Reply #18 on: November 14, 2018, 12:07:16 PM »
Sorry I missed this initially - yes that's great !

@ FractalDave.  I am about to start looking at the rotabulb, but firstly some Mandelbulberv2 admin.

There are two of your fomulas in Mandelbulberv2 (below).  Should I add  http://www.fractalgallery.co.uk/ and https://www.facebook.com/david.makin.7 to the formula info?

Code: [Select]
/** * 3D Mandelbrot formula invented by David Makin * @reference * http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg7235/#msg7235 */void HypercomplexIteration(CVector4 &z, const sFractal *fractal, sExtendedAux &aux){ Q_UNUSED(fractal); aux.DE = aux.DE * 2.0 * aux.r; double newx = z.x * z.x - z.y * z.y - z.z * z.z - z.w * z.w; double newy = 2.0 * z.x * z.y - 2.0 * z.w * z.z; double newz = 2.0 * z.x * z.z - 2.0 * z.y * z.w; double neww = 2.0 * z.x * z.w - 2.0 * z.y * z.z; z.x = newx; z.y = newy; z.z = newz; z.w = neww;}

Code: [Select]
/** * Makin3D-2 found through the another shot at the holy grail topic at ff * @reference http://www.fractalforums.com/3d-fractal-generation/another-shot-at-the-holy-grail/ */void Makin3d2Iteration(CVector4 &z, const sFractal *fractal, sExtendedAux &aux){ Q_UNUSED(fractal); Q_UNUSED(aux); double x2 = z.x * z.x; double y2 = z.y * z.y; double z2 = z.z * z.z; double newx = x2 + 2.0 * z.y * z.z; double newy = -y2 - 2.0 * z.x * z.z; double newz = -z2 + 2.0 * z.x * z.y; z.x = newx; z.y = newy; z.z = newz;}

• Posts: 171

Re: New formula - fixing the whipped cream quaternion issue.....

« Reply #19 on: November 14, 2018, 12:27:54 PM »
Aaargh just realised that for my code for rotabulbs I'm not sure the version stored on the web has it so I've attached an updated version......
To see the code for the rotabulbs just look at the funcs starting with "test3d7" then "rotpowxy" - test3d7 is a full formula just excluding the +c, the others are all written to be called generically anywhere you like, e.g. first thing to do on each iteration

SPOILER ALERT for anyone who has this ufm already - because this is a WIP it may break some older saved UPRs so keep a back up of your current version of the ufm before unzipping !!

• Posts: 171

Re: New formula - fixing the whipped cream quaternion issue.....

« Reply #20 on: November 14, 2018, 03:15:49 PM »
<snip>
I have learnt that generally x is real and the rest are only imaginary, but I algebraically treat them all the  same (no favoritism )

Bicomplex is an exception, after the following manipulation:

complex z1 = z+flip(conj(w))
complex z2 = z-flip(conj(w))

where as parts of a bicomplex z and w are both complex (i.e. two value variables not actually truly complex), one can then perform any single complex function on z1 and z2 separately to get the same function of a bicomplex, e.g. square z1 and square z2, and then convert back to true bicomplex:

z = 0.5*(z1+z2)
w = 0.5*flip(conj(z2-z1))

NB. Since in the above the true bicomplex form is z and w NOT z1 and z2 any bicomplex variables applied to z1 and z2 need to have been converted from true bicomplex in exactly the same way.
Ideally this can be done for all iterations for a given point in the z1/z2 form i.e. so within all a given iteration loop no conversion is required, but as implemented as a func in my code the conversion is done in the func so that it can be applied correctly anywhere.
« Last Edit: November 14, 2018, 03:27:49 PM by FractalDave »

mclarekin

• Fractal Frogurt
• Posts: 450

Re: New formula - fixing the whipped cream quaternion issue.....

« Reply #21 on: November 16, 2018, 08:26:00 AM »
thanks for that information Dave.

Similar Topics

"Whipped Cream" on steroids

Started by FractalDave on Fractal Mathematics And New Theories

2 Replies
136 Views
November 12, 2018, 11:42:05 PM
by FractalDave
Ice Cream Sandwich

Started by quaz0r on Fractal Image Gallery

0 Replies
54 Views
September 15, 2018, 02:52:57 AM
by quaz0r
Resolution Issue ?

Started by MonkeyDogBoy on Mandelbulber

2 Replies
286 Views
February 19, 2018, 12:38:20 AM
by Tas_mania
Possible issue with cancelled attached pics ?

Started by FractalDave on Forum Help And Support

0 Replies
41 Views
December 20, 2018, 03:46:01 AM
by FractalDave
Quaternion

Started by Bill Snowzell on Fractal Image Gallery

0 Replies
127 Views
January 02, 2018, 10:11:34 PM
by Bill Snowzell