Logo by Maya - 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 the official fractalforums.com Youtube Channel
 
*
Welcome, Guest. Please login or register. March 29, 2024, 01:56:06 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: 3D Burning Ship formula and .frag file  (Read 3877 times)
0 Members and 1 Guest are viewing this topic.
laser blaster
Iterator
*
Posts: 178


« on: October 22, 2014, 12:27:57 AM »

Hello. I've written Fragmentarium code for the 3D burning ship. Here's a picture of the main miniship on the western antenna (click for full-size):


Here is one of the Julia sets of this formula (this Julia and the others I posted in  the gallery are included as presets).


 This is essentially the standard mandelbulb with abs() applied to all axes before the power operation. Here's the iteration formula, in trig form (I've written it in pseudocode using only scalar variables, to make it easier to understand for those who don't know glsl).

Code:
x = abs(x)
y = abs(y)
z = abs(z)

r = sqrt(x*x + y*y + z*z)

phi = atan2(y,x)
theta = asin(z/r)

r = pow(r, Power)
theta = theta * Power
phi = phi * Power

x = r*cos(theta)*cos(phi)
y = r*cos(theta)*sin(phi)
z = r*sin(theta)

x+= JuliaX
y += JuliaY
z += JuliaZ

I made two versions, a fast, power-2 only version, and arbitrary-power version that is much slower as it uses trig functions. The arbitrary power version also allows an arbitrary rotation to be applied each iteration, while the fast version ignores the RotVector and RotAngle parameters. Both versions use 4-point distance estimation, because the fast scalar DE approximation is not accurate for a fractal with this much stretching and skewing (it would probably work ok for the higher powers, but then you'd essentially be looking at the mandelbulb). So it's a bit slow(turn down the detail setting to get it to run faster). Let me know if you get any compiler errors.

I also uploaded a slightly modified version of Syntopia's DE_Raytracer that I used to render the above images. I changed it so that the spot light shadows don't influence the cam light, so now the cam light can act as a proper fill light for the shadowed areas. (NOTE: It will work just fine with the standard raytracer).


* Shipbulb_DeltaDE_FastPow2.frag (17.08 KB - downloaded 385 times.)
* DE-Raytracer.frag (12.2 KB - downloaded 368 times.)
* Shipbulb_DeltaDE.frag (14.88 KB - downloaded 386 times.)
« Last Edit: October 22, 2014, 01:13:33 AM by laser blaster » Logged
Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« Reply #1 on: October 22, 2014, 11:04:45 PM »

Very impressive Fractal - looks extremely botanic.

Would it be okay if I included this as an example in the Fragmentarium distribution?
Logged
laser blaster
Iterator
*
Posts: 178


« Reply #2 on: October 22, 2014, 11:34:52 PM »

Please do, that would be great. smiley
Logged
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #3 on: March 01, 2015, 06:14:01 PM »

Interesting fractal. Many thanks for sharing!

Logged

eiffie
Guest
« Reply #4 on: March 01, 2015, 06:58:04 PM »

OooooooO!
Logged
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #5 on: March 01, 2015, 07:00:29 PM »

 Last DE embarrass your shadows code as knighty says )
Logged

laser blaster
Iterator
*
Posts: 178


« Reply #6 on: March 01, 2015, 07:12:01 PM »

Glad you liked it! cheesy
Did eiffie make a new shadows code? Where do I find this?
Logged
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #7 on: March 01, 2015, 07:15:02 PM »

Maybe not new ) but in DE looks nice! Here
Logged

Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Burning Ship Mutatorkammer Gallery cKleinhuis 2 4530 Last post March 21, 2008, 05:22:42 PM
by GFWorld
3D burning ship Mandelbulb3D Gallery bib 0 4577 Last post November 02, 2010, 09:34:27 PM
by bib
Distance Estimation formula for the Burning Ship? Programming laser blaster 4 5375 Last post April 20, 2014, 05:45:28 PM
by top-quark
Metaship.frag - cool burning ship variant Fragmentarium laser blaster 0 2193 Last post March 17, 2014, 03:30:09 AM
by laser blaster
Perturbation formula for burning ship (hopefully correct :P) (new) Theories & Research « 1 2 3 » laser blaster 34 4385 Last post September 20, 2017, 08:34:34 AM
by claude

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.159 seconds with 28 queries. (Pretty URLs adds 0.01s, 2q)