Logo by Sockratease - 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. April 19, 2024, 08:10:34 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: orbit trap rendering ?  (Read 4820 times)
0 Members and 1 Guest are viewing this topic.
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« on: January 22, 2012, 04:05:23 AM »

have you ever thought about rendering an orbit trap of a triplex fractal as own object huh?
Logged

---

divide and conquer - iterate and rule - chaos is No random!
knighty
Fractal Iambus
***
Posts: 819


« Reply #1 on: January 22, 2012, 12:17:43 PM »

I did!  cheesy
The picture below from december 2009 is a rendering of orbit trap of low iteration mandelbulb power8 on 3 cylinders aligned to xyz axis (red for x, green for y and blue for z).

Iñigo Quilez already did it back in 2006 for quatrnion julia.


* MB8Trap.JPG (34.61 KB, 640x484 - viewed 441 times.)
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #2 on: January 22, 2012, 02:10:49 PM »

gotta try it in fragmentarium, i believe nice strutures can be found, especially when playing around with the trap mode ( min, max, avg, iter... )
Logged

---

divide and conquer - iterate and rule - chaos is No random!
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #3 on: January 22, 2012, 02:12:12 PM »

wow, the spirals on the Iñigo Quilez are intriguing, and low iteration orbit trap rendering should work very vell on gpu ....
Logged

---

divide and conquer - iterate and rule - chaos is No random!
knighty
Fractal Iambus
***
Posts: 819


« Reply #4 on: January 22, 2012, 07:15:16 PM »

That's because the orbit trap IS a spiral ?

Xenodream is also (very) good for orbit traps renderinggrin
Logged
knighty
Fractal Iambus
***
Posts: 819


« Reply #5 on: January 22, 2012, 09:36:41 PM »

Ok! here is my attempt with quaternion julia (fragmentarium script):
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.
//Knighty: modified the script to render orbit trap. The trap is just a cylinder

// 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)]

uniform float val; slider[-2,0,2]
uniform float cylRad; slider[0,0.1,1]
uniform float cylHeight; slider[0,2,5]

float cylinder(vec3 p){
p=p.yxz;
p.x-=val;
return max(abs(p.z)-cylHeight,length(p.xy)-cylRad);
}
// The inline expanded quaterion multiplications make this DE
// look much worse than it actually is.
float DE(vec3 pos) {
float d=10000.0;
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)));
float r = cylinder(p.xyz);
d=min(d,0.5 * r / length(dp));
if (p2 > Threshold) break;
}
// length(p);
return d;// 0.5 * r / length(dp);
}

#preset Default
FOV = 0.4
Eye = -3.92876,-4.64711,5.23499
Target = 1.01476,1.13689,-1.254
Up = -0.0539774,-0.724628,-0.687023
AntiAlias = 1
Detail = -3.01273
DetailAO = -0.5
FudgeFactor = 1
MaxRaySteps = 129
BoundingSphere = 3 Locked
Dither = 0.5 Locked
NormalBackStep = 1
AO = 0.529412,0.352941,0,0.7
Specular = 1.5
SpecularExp = 16
SpotLight = 1,1,1,0.38043
SpotLightDir = 0.1,0.1
CamLight = 1,1,1,1
CamLightMin = 0
Glow = 1,1,1,0.16667
GlowMax = 20
Fog = 0
HardShadow = 0
ShadowSoft = 12.9032
Reflection = 0
BaseColor = 1,1,1
OrbitStrength = 0.8
X = 0.5,0.6,0.6,0.7
Y = 1,0.6,0,0.4
Z = 0.8,0.78,1,0.5
R = 0.4,0.7,1,0.12
BackgroundColor = 1,0.666667,0
GradientBackground = 0.3
CycleColors = false
Cycles = 1.1
EnableFloor = false
FloorNormal = 0,0,0
FloorHeight = 0
FloorColor = 1,1,1
Iterations = 5
Threshold = 30
C = -0.68182,-0.63636,0,0
val = -0.144
cylRad = 0.31532
cylHeight = 5
#endpreset

#preset Round
FOV = 0.4
Eye = -1.49304,-1.07827,5.47996
Target = 0.940476,0.755427,-4.04451
Up = -0.118586,-0.968971,-0.21685
AntiAlias = 1
Detail = -3.01273
DetailAO = -0.5
FudgeFactor = 1
MaxRaySteps = 129
BoundingSphere = 3 Locked
Dither = 0.5 Locked
NormalBackStep = 1
AO = 0.529412,0.352941,0,0.7
Specular = 1.5
SpecularExp = 16
SpotLight = 1,1,1,0.38043
SpotLightDir = 0.1,0.1
CamLight = 1,1,1,1
CamLightMin = 0
Glow = 1,1,1,0.16667
GlowMax = 20
Fog = 0
HardShadow = 0
ShadowSoft = 12.9032
Reflection = 0
BaseColor = 1,1,1
OrbitStrength = 0.8
X = 0.5,0.6,0.6,0.7
Y = 1,0.6,0,0.4
Z = 0.8,0.78,1,0.5
R = 0.4,0.7,1,0.12
BackgroundColor = 1,0.666667,0
GradientBackground = 0.3
CycleColors = false
Cycles = 1.1
EnableFloor = false
FloorNormal = 0,0,0
FloorHeight = 0
FloorColor = 1,1,1
Iterations = 6
Threshold = 30
C = -0.68182,-0.63636,0,0
val = -1.84
cylRad = 0.69369
cylHeight = 0.0505
#endpreset
« Last Edit: January 23, 2012, 10:46:43 AM by knighty, Reason: did some corrections to the fragmentarium script code » Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #6 on: January 22, 2012, 09:51:35 PM »

i had to change the row:

float r = cylinder(p, 0.1);

to
float r = cylinder(p.xyz, 0.1);

because function signature demanded a 3 component vector, but p is 4 component ... it is working, and i am playing with it right now, thx
Logged

---

divide and conquer - iterate and rule - chaos is No random!
knighty
Fractal Iambus
***
Posts: 819


« Reply #7 on: January 23, 2012, 10:44:34 AM »

Thanks. Nvidia glsl compiler is too "bad programmer" freindly. fiery
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #8 on: January 23, 2012, 11:41:51 AM »

Just tried out a simple sphere orbit length(p-center) i use ati card because the 6800 card has the best processing value compared to prize. . . Rendering of those sturctures is quite cool!
Logged

---

divide and conquer - iterate and rule - chaos is No random!
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Convergent Orbit Trap Images Showcase (Rate My Fractal) Ross Hilbert 0 2843 Last post August 12, 2008, 08:37:13 PM
by Ross Hilbert
Circle Orbit Trap Images Showcase (Rate My Fractal) Ross Hilbert 1 2125 Last post February 13, 2009, 07:10:24 PM
by cKleinhuis
Orbit Trap is closing down (BUT... has re-opened) Fractal Website of the Month ker2x 8 10108 Last post October 28, 2012, 05:31:49 AM
by taurus
orbit trap feature request « 1 2 » ericr 24 4772 Last post March 25, 2013, 01:24:16 PM
by ericr
Blue Orbit Trap Images Showcase (Rate My Fractal) Fracticality 0 1568 Last post April 06, 2017, 01:16:03 AM
by Fracticality

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.008s, 2q)