vinz
Iterator
Posts: 154
|
|
« 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.
|
|
« Last Edit: June 30, 2013, 10:09:16 PM by vinz »
|
Logged
|
|
|
|
Kali
|
|
« Reply #1 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.
|
|
« Last Edit: June 30, 2013, 07:19:18 PM by Kali »
|
Logged
|
|
|
|
vinz
Iterator
Posts: 154
|
|
« Reply #2 on: June 30, 2013, 07:30:51 PM » |
|
|
|
« Last Edit: June 30, 2013, 07:40:49 PM by vinz, Reason: je sais pas ecrire ! »
|
Logged
|
|
|
|
Kali
|
|
« Reply #3 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.
|
|
|
Logged
|
|
|
|
vinz
Iterator
Posts: 154
|
|
« Reply #4 on: June 30, 2013, 08:00:55 PM » |
|
Hahaha Great to have a second solution ... , thanks you for your time Kali, but it seems this one is not working for me ... here what appear inside the preview window...
|
|
« Last Edit: June 30, 2013, 08:05:35 PM by vinz »
|
Logged
|
|
|
|
Kali
|
|
« Reply #5 on: June 30, 2013, 08:23:04 PM » |
|
oops! don't know what happened... works fine for me... mysteries of GLSL
|
|
|
Logged
|
|
|
|
vinz
Iterator
Posts: 154
|
|
« Reply #6 on: June 30, 2013, 08:24:46 PM » |
|
Hahahaha ! no problem the first one looks Great ! Thanks again Kali And to be able to control the curvature is really a Plus !
|
|
« Last Edit: June 30, 2013, 08:28:43 PM by vinz »
|
Logged
|
|
|
|
Syntopia
|
|
« Reply #7 on: June 30, 2013, 09:25:16 PM » |
|
Pow's first argument must be positive. If you replace with: float l=length(pow(abs(p.xy),vec2(4.)));
it works.
|
|
|
Logged
|
|
|
|
Kali
|
|
« Reply #8 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.
|
|
|
Logged
|
|
|
|
vinz
Iterator
Posts: 154
|
|
« Reply #9 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.
|
|
|
Logged
|
|
|
|
vinz
Iterator
Posts: 154
|
|
« Reply #10 on: June 30, 2013, 09:39:40 PM » |
|
Great Kali ! this one work well too ... could you gimme a hint ? how increase the width and the depht of the curved plane ? :
|
|
|
Logged
|
|
|
|
Syntopia
|
|
« Reply #11 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);
|
|
|
Logged
|
|
|
|
Kali
|
|
« Reply #12 on: June 30, 2013, 09:41:31 PM » |
|
This is the corrected version #2, now with curvature/width/depth sliders.
|
|
« Last Edit: July 01, 2013, 12:16:16 AM by Kali »
|
Logged
|
|
|
|
vinz
Iterator
Posts: 154
|
|
« Reply #13 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 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 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
|
|
|
Logged
|
|
|
|
vinz
Iterator
Posts: 154
|
|
« Reply #14 on: June 30, 2013, 10:03:06 PM » |
|
|
|
« Last Edit: June 30, 2013, 10:04:44 PM by vinz »
|
Logged
|
|
|
|
|