Welcome to Fractal Forums

Fractal Software => Fragmentarium => Topic started by: vinz on June 30, 2013, 06:19:40 PM




Title: [Solved] DE for Curved Plane
Post by: vinz on June 30, 2013, 06:19:40 PM
Hi,

I would like to include this simple shape in fragmentarium. Is someone able to gimme the DE for that?
i've tried some deformations and blends  from Iq Website, but i can't obtain a good result.
because i can't have the curved transition between the two planes.

Thanks for Any help. ;D


Title: Re: Simple Shape
Post by: Kali on June 30, 2013, 07:17:33 PM
This is one quick solution, but it doesn't work well when seeing the curvature from outside.
Now I'm thinking, maybe a deformation of a cylinder cut could work best, I'll give it a try.


Title: Re: Simple Shape
Post by: vinz on June 30, 2013, 07:30:51 PM
EXACTLY !!!  what i needed ... Thanks you very Much Kali, you're Great Awesome :thanks1:  :beer: :beer: :beer: :beer:


Title: Re: Simple Shape
Post by: Kali on June 30, 2013, 07:55:38 PM
Most welcome :)

Here is another version that works ok from all angles, but with fixed curvature, because with other settings I get strange results...
See if it works fine for you, this one is a cylinder section with a modified distance metric.



Title: Re: Simple Shape
Post by: vinz on June 30, 2013, 08:00:55 PM
Hahaha Great to have a second solution ...  :D, thanks you for your time Kali, but it seems this one is not working for me ...
here what appear inside the preview window...


Title: Re: Simple Shape
Post by: Kali on June 30, 2013, 08:23:04 PM
oops!  don't know what happened... works fine for me... mysteries of GLSL  ;D


Title: Re: Simple Shape
Post by: vinz on June 30, 2013, 08:24:46 PM
Hahahaha ! no problem the first one looks Great ! Thanks again Kali  ;D

And to be able to control the curvature is really a Plus !


Title: Re: Simple Shape
Post by: Syntopia on June 30, 2013, 09:25:16 PM
Pow's first argument must be positive. If you replace with:
Code:
float l=length(pow(abs(p.xy),vec2(4.))); 
it works.


Title: Re: Simple Shape
Post by: Kali on June 30, 2013, 09:34:23 PM
Oh, that's right, I forgot! thanks Mikael!

Here's another solution, it should work fine, but the curvature is always semicircular.


Title: Re: Simple Shape
Post by: vinz on June 30, 2013, 09:35:45 PM
Thanks for your Help Syntopia ... here it works but this is limitating because it need a huge amount of fuge factor.



Title: Re: Simple Shape
Post by: vinz on June 30, 2013, 09:39:40 PM
Great Kali ! this one work well too :thanks1: :D ... could you gimme a hint ? how increase the width and the depht of the curved plane ? ::)


Title: Re: Simple Shape
Post by: Syntopia on June 30, 2013, 09:40:22 PM
Shouldn't need any fudge. Be sure to keep the last power-function:
float l=length(pow(abs(p.xy),vec2(4.))); l=pow(l,.25);


Title: Re: Simple Shape
Post by: Kali on June 30, 2013, 09:41:31 PM
This is the corrected version #2, now with curvature/width/depth sliders.


Title: Re: Simple Shape
Post by: vinz on June 30, 2013, 09:52:32 PM
Shouldn't need any fudge. Be sure to keep the last power-function:
float l=length(pow(abs(p.xy),vec2(4.))); l=pow(l,.25);

It Work Fine my Bad ... ThanKs you Syntopia  :D

Code:
float  DE(vec3 p) {
float l=length(pow(abs(p.xy),vec2(4.))); l=pow(l,.25);
float d=max(abs(p.z)-1.,max(-l+1.,l-1.01));
d=max(d,p.x-.5); d=max(d,p.y-.5);
return d;
}

This is the corrected version #2, now with curvature slider.

Excellent, it's Work Great ... Thanks you so much for your Help Kali   :beer: :beer: :beer: :beer: :beer: :beer: :beer:

I've much more than what i need, Except a way to scale this in different axis, but i will figure out by myself ^^
you're GREAT  :D


Title: Re: Simple Shape
Post by: vinz on June 30, 2013, 10:03:06 PM
This is the corrected version #2, now with curvature/width/depth sliders.
AWESOME Kali ! this is PERFECT ... with Width and Depht sliders !!!!!!!!!!!!!!!!! :beer: :beer: :beer: :beer: :beer: :beer: :beer: :beer:


Title: Re: Simple Shape
Post by: Kali on June 30, 2013, 10:04:59 PM
Yes, I updated it again when I saw your question.
No prob, glad I was able to help... and also it was for me a nice little pastime for this boring sunday ;D


Title: Re: Simple Shape
Post by: vinz on June 30, 2013, 10:07:30 PM
 hahaha !  ;D  :D