Logo by LAR2 - 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 us on facebook
 
*
Welcome, Guest. Please login or register. September 19, 2020, 11:47:00 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] 2   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: [Solved] DE for Curved Plane  (Read 1382 times)
0 Members and 1 Guest are viewing this topic.
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. grin


* Screenshot - 30_06_2013 , 18_15_24.jpg (51.1 KB, 989x810 - viewed 280 times.)
« Last Edit: June 30, 2013, 10:09:16 PM by vinz » Logged
Kali
Fractal Supremo
*****
Posts: 1138


« 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.

* curvedplanes.frag (1.47 KB - downloaded 99 times.)
« Last Edit: June 30, 2013, 07:19:18 PM by Kali » Logged

|</\|_|
░░░░░░░

http://fractkali.deviantart.com/
vinz
Iterator
*
Posts: 154


« Reply #2 on: June 30, 2013, 07:30:51 PM »

EXACTLY !!!  what i needed ... Thanks you very Much Kali, you're Great Awesome thank you post swing  A Beer Cup A Beer Cup A Beer Cup A Beer Cup
« Last Edit: June 30, 2013, 07:40:49 PM by vinz, Reason: je sais pas ecrire ! » Logged
Kali
Fractal Supremo
*****
Posts: 1138


« Reply #3 on: June 30, 2013, 07:55:38 PM »

Most welcome smiley

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.


* curvedplanes2.frag (1.27 KB - downloaded 86 times.)
Logged

|</\|_|
░░░░░░░

http://fractkali.deviantart.com/
vinz
Iterator
*
Posts: 154


« Reply #4 on: June 30, 2013, 08:00:55 PM »

Hahaha Great to have a second solution ...  cheesy, thanks you for your time Kali, but it seems this one is not working for me ...
here what appear inside the preview window...


* Screenshot - 30_06_2013 , 19_58_45.jpg (24.48 KB, 1147x662 - viewed 277 times.)
« Last Edit: June 30, 2013, 08:05:35 PM by vinz » Logged
Kali
Fractal Supremo
*****
Posts: 1138


« Reply #5 on: June 30, 2013, 08:23:04 PM »

oops!  don't know what happened... works fine for me... mysteries of GLSL  grin
Logged

|</\|_|
░░░░░░░

http://fractkali.deviantart.com/
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  grin

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
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« Reply #7 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.
Logged
Kali
Fractal Supremo
*****
Posts: 1138


« 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.

* curvedplanes3.frag (1.48 KB - downloaded 100 times.)
Logged

|</\|_|
░░░░░░░

http://fractkali.deviantart.com/
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.



* Screenshot---30_06_2013-,-21_29_21.jpg (93.09 KB, 1442x577 - viewed 297 times.)
Logged
vinz
Iterator
*
Posts: 154


« Reply #10 on: June 30, 2013, 09:39:40 PM »

Great Kali ! this one work well too thank you post swing cheesy ... could you gimme a hint ? how increase the width and the depht of the curved plane ? :smiley
Logged
Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« 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
Fractal Supremo
*****
Posts: 1138


« Reply #12 on: June 30, 2013, 09:41:31 PM »

This is the corrected version #2, now with curvature/width/depth sliders.

* curvedplanes2.frag (1.49 KB - downloaded 107 times.)
« Last Edit: July 01, 2013, 12:16:16 AM by Kali » Logged

|</\|_|
░░░░░░░

http://fractkali.deviantart.com/
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  cheesy

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   A Beer Cup A Beer Cup A Beer Cup A Beer Cup A Beer Cup A Beer Cup A Beer Cup

I've much more than what i need, Except a way to scale this in different axis, but i will figure out by myself Grin with closed eyes
you're GREAT  cheesy
Logged
vinz
Iterator
*
Posts: 154


« Reply #14 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 !!!!!!!!!!!!!!!!! A Beer Cup A Beer Cup A Beer Cup A Beer Cup A Beer Cup A Beer Cup A Beer Cup A Beer Cup
« Last Edit: June 30, 2013, 10:04:44 PM by vinz » Logged
Pages: [1] 2   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Formula-s7_CQJ (Interesting Shape) Mystic Fractal Programs Gallery Nahee_Enterprises 0 723 Last post March 08, 2010, 10:56:01 PM
by Nahee_Enterprises
Nautilius (a question about shape) Mandelbulb 3d MindsEye 2 948 Last post January 31, 2012, 07:59:09 PM
by MindsEye
Object invisibility to shape fog. Mandelbulb 3d Erisian 2 836 Last post March 17, 2012, 09:23:28 PM
by Erisian
Prism Shape hybrid. Mandelbulber Gallery mclarekin 0 322 Last post June 27, 2016, 01:45:16 AM
by mclarekin
Prism Shape hybrid 3.1 Mandelbulber Gallery mclarekin 0 400 Last post June 28, 2016, 04:12:46 AM
by mclarekin

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