Logo by Jimpan1973 - 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 us on facebook
 
*
Welcome, Guest. Please login or register. March 29, 2024, 11:54:53 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: Quarternion Custom Formulas in OpenCL Mandelbulber 1.21  (Read 5105 times)
Description: Basic tutorial modifying Mandelbulbers standard formula
0 Members and 1 Guest are viewing this topic.
mclarekin
Fractal Senior
******
Posts: 1739



« on: December 04, 2014, 05:05:42 AM »

Here is a basic  tutorial modifying Mandelbulbers' standard Quarternion formula. Its for using openCL custom formulas in a basic way.

* Quarternion Custom Formula in OpenCL.doc (227.5 KB - downloaded 254 times.)
Logged
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #1 on: December 04, 2014, 05:12:12 AM »

If it works and you use the parameters shown, the resulting shape should look like the attached render (at 800 x 600 with AO on my old i3 CPU 24seconds.)


* quart example.jpg (87.51 KB, 800x600 - viewed 418 times.)
Logged
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #2 on: December 04, 2014, 08:44:35 AM »

This basic tutorial adds a box fold to the quarternion

* Quaternion OpenCL Custom Formulas Boxfold.doc (228 KB - downloaded 227 times.)
Logged
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #3 on: December 04, 2014, 09:17:48 AM »

Further on quarternion adding box fold tutorial
In the code below the box fold has been moved from after to in front of the quarternion part of the formula, file saved, recompiled, rendered and zoomed even further out.  The first quarternion tutorial started with just one parameter to tweek. Now we have six parameters to tweek and two locations for the box fold. The possibilities have increased greatly and yet the quarternion is still quite boring.

Code:


// quart abcd box fold v2 formula

int4 cond1, cond2;

cond1 = isgreater(z4, foldingLimit);

cond2 = isless(z4, -foldingLimit);

z4 = select(z4,  foldingValue - z4, cond1);

z4 = select(z4,  -foldingValue - z4, cond2);

zp = 2.0 * quaternionMul(z4, zp);
newz = quaternionSqr(z4);
z4 = newz + c4;
r = length(z4);
   


* quart example box2.jpg (76.46 KB, 407x450 - viewed 813 times.)
Logged
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #4 on: December 04, 2014, 11:24:14 AM »

The last part of the Mandelbulber 1.21 quarternion opencl custom formula tutorial series. Be warned don't expect a happy ending.

Oops I forgot to change float rr = dot(z,z); to float rr = dot(z4,z4);

And you know what, it made no apparent difference to the image. Trial and error sorts out what works and what doesn't. Hmmm I wonder, maybe I should be calculating  r = length (z4) after the last transform (it this case should only change the colour I think).  Errors are easy for the impatient non-programmer.

* Adding spherical fold to the quarternion.doc (109 KB - downloaded 208 times.)
« Last Edit: December 05, 2014, 04:39:59 AM by mclarekin, Reason: noting mistake and wondering words » Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #5 on: December 04, 2014, 01:50:17 PM »

cool, thank you for the walkthroughs
Logged

---

divide and conquer - iterate and rule - chaos is No random!
youhn
Fractal Molossus
**
Posts: 696


Shapes only exists in our heads.


« Reply #6 on: December 04, 2014, 08:09:00 PM »

Love the reflective comments in between, like in just after the small tutorial "And still the quarternions remain quite boring"  grin (which for me is true aswell). I've scanned through the documents and might not use them directly, but this topic has moved me to dive into the Mandelbulber code. Might be a nice activity during the evenings of wintersport, around newyear.
Logged
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #7 on: December 04, 2014, 11:28:54 PM »

@Christian. Thanks for checking it out.  Hope it made sense, its really designed for people like me who try and use the OpenCL Custom formulas feature without any programing background ( so I avoided resolving DE issues and if/else loops.) With the aid of this forum I have learnt so much over the last year and had a lot of enjoyment. My early attempts I now find quite funny, plenty of bits of added code that I now realise didn't do anything or were full of mistakes.

@youhn. Thanks also for checking it out. It was your recent post that made me realise I now knew enough to share some of what I had learnt with custom formulas. Those other tutorials you have found will be very helpful, wish they had been around when I started. And yes I chose the boring old quarternion to demonstrate the failures that can be easily achieved.

@anyone. I am happy to make any changes if  my terminology is incorrect or what I wrote was wrong or difficult in translation.  Try following this with tutorial but starting with a menger and include Mandelbox rotation.
Logged
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #8 on: December 06, 2014, 02:08:48 AM »

Even a humorous quarternion is quite boring


* quartrrrt9.jpg (101.1 KB, 800x600 - viewed 502 times.)
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Mandelbulber 1.19 - OpenCL - user defined formulas management Releases « 1 2 » Buddhi 22 15494 Last post December 28, 2013, 09:48:46 AM
by Buddhi
Burning Ship Mandelbulber 1.21 OpenCL Custom Formulas Tutorials mclarekin 12 12797 Last post December 08, 2014, 06:15:28 PM
by youhn
Decreasing Render Time with OpenCL Mandelbulber 1.21 Custom Formulas Tutorials mclarekin 0 3280 Last post December 06, 2014, 12:01:47 AM
by mclarekin
OpenCl custom formulas Feature Requests paigan0 5 3354 Last post April 01, 2017, 05:59:20 PM
by mancoast
Surf's Up! Custom Amazing Surf formula for Mandelbulber OpenCL v 1.21 Mandelbulber Gallery paigan0 5 7216 Last post July 31, 2016, 10:38:59 PM
by matsoljare

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.39 seconds with 29 queries. (Pretty URLs adds 0.02s, 2q)