Logo by dainbramage - 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: Support us via Flattr FLATTR Link
 
*
Welcome, Guest. Please login or register. October 08, 2024, 11:24:49 PM


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: Quaternion Julia to flames  (Read 3835 times)
0 Members and 1 Guest are viewing this topic.
cyseal
Explorer
****
Posts: 48


« on: September 24, 2015, 03:41:31 PM »

How to translate Quaternition julia from Fragmentarium to flames in Apophysis as some slice or 2D projection ?


Code:
#info 4D Quaternion Julia Distance Estimator
#include "DE-Raytracer.frag"
#group 4D Quaternion Julia

// The DE implementation here is based on the implementation by Subblue:
//  http://www.subblue.com/blog/2009/9/20/quaternion_julia
// which in turn is based on a CG shader by Keenan Crane.
// My implementation here is very compressed, so take a look at Subblue's above for a much clearer implementation.

// Number of fractal iterations.
uniform int Iterations;  slider[0,16,100]
// Breakout distance
uniform float Threshold; slider[0,10,100]
// Quaterion Constant
uniform vec4 C; slider[(-1,-1,-1,-1),(0.18,0.88,0.24,0.16),(1,1,1,1)]


// The inline expanded quaterion multiplications make this DE
// look much worse than it actually is.
float DE(vec3 pos) {
vec4 p = vec4(pos, 0.0);
vec4 dp = vec4(1.0, 0.0,0.0,0.0);
for (int i = 0; i < Iterations; i++) {
dp = 2.0* vec4(p.x*dp.x-dot(p.yzw, dp.yzw), p.x*dp.yzw+dp.x*p.yzw+cross(p.yzw, dp.yzw));
p = vec4(p.x*p.x-dot(p.yzw, p.yzw), vec3(2.0*p.x*p.yzw)) + C;
float p2 = dot(p,p);
orbitTrap = min(orbitTrap, abs(vec4(p.xyz,p2)));
if (p2 > Threshold) break;
}
float r = length(p);
return  0.5 * r * log(r) / length(dp);
}

Logged
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #1 on: September 24, 2015, 06:00:26 PM »

There is no easy way to do so.
In fact flames need a function inversion to work like their escapetime counterpart. See juliaN plugin in the Apo source code to have an idea.

http://sourceforge.net/projects/apophysis/files/

This is way more complicated in 4D though and I really think it wouldn't give a so great result at all? wink
Logged

No sweat, guardian of wisdom!
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #2 on: September 24, 2015, 06:13:35 PM »

check this thread, at least a mandelbulb can be done relatively easily wink
http://www.fractalforums.com/images-showcase-(rate-my-fractal)/yes!-a-mandelbulb-in-apophysis!!!/
Logged

---

divide and conquer - iterate and rule - chaos is No random!
cyseal
Explorer
****
Posts: 48


« Reply #3 on: September 24, 2015, 08:01:15 PM »

Thx
1) Is it possible to make Apo 7x 3d renderer as M3D or Fragmentaruim?

2) When you write C++ formula, how to integrate it as  Apo 7x plugin ?
I'm using Codelite.
Logged
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #4 on: September 25, 2015, 11:48:33 AM »

1) no!  smiley wink
But you ofc can render 3d flames that will look always different from any escapetime solid render as normally flames tend to fade away somewhere. You can get solid colors in some cases btw but it is a complicated task...
Flames work with successive color pixels and colors blend each other normally.
2) see this repository by Xyrus:
http://code.xyrus-worx.org/listing.php?repname=Apophysis+Plugins&

I strongly reccommend you to get JWILDFIRE much more simple for plugin design and more powerful. wink
Logged

No sweat, guardian of wisdom!
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Quaternion Julia Set and Mandelbox Mix 3D Fractal Generation trafassel 0 1949 Last post April 26, 2010, 07:59:05 PM
by trafassel
tasty looking julia quaternion Images Showcase (Rate My Fractal) kaini 9 2110 Last post May 06, 2010, 01:06:35 AM
by cKleinhuis
Exploration of the XYZ-symmetrized quaternion julia set 3D Fractal Generation « 1 2 » msltoe 18 5465 Last post August 05, 2010, 03:31:09 AM
by msltoe
Translucent Quaternion Julia Set FractalForums.com Banner Logos Khaotik 0 2370 Last post January 22, 2011, 03:42:10 PM
by Khaotik
Quaternion Julia Lace Gasket Fragmentarium Gallery phtolo 0 1906 Last post March 01, 2016, 08:51:21 PM
by phtolo

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