Logo by reallybigname - 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. April 16, 2024, 06:41:29 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: Minimal surfaces are beautiful  (Read 1548 times)
0 Members and 1 Guest are viewing this topic.
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« on: November 10, 2016, 10:50:55 PM »

Some of my favourites:
http://demonstrations.wolfram.com/EnneperSurface/
http://demonstrations.wolfram.com/LopezMinimalKleinBottle/
http://demonstrations.wolfram.com/ViewsOfTheCostaMinimalSurface/

Ennepers is the simplest of them.
I tried to think a way to plot it in a non parametric way... Never found an answer!
Anyone is able to write an a Ennepers 3d in Shadertoy? smiley
<a href="https://vimeo.com/moogaloop.swf?clip_id=106575488&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA" target="_blank">https://vimeo.com/moogaloop.swf?clip_id=106575488&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA</a>
Logged

No sweat, guardian of wisdom!
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #1 on: November 18, 2016, 03:24:40 PM »

I always wanted to render this cool surface that apparently has a very simple ready to use equation.
(from Wikipedia)
Scherk's second surface looks globally like two orthogonal planes whose intersection consists of a sequence of tunnels in alternating directions. Its intersections with horizontal planes consists of alternating hyperbolas.

It has implicit equation:



Too bad for me, sinh() is a function that grows exponentially but raytracers need linear distance fields to render correctly. Also it's sign is not constantly positive.
But we can always do some math tricks. Let's see.
Sinh(a) = (exp(2*a)-1)/(2*exp(a))

If we replace, and bring the denominator to the left of the previous expression; grin

4*exp(x+y)*sin(z) = exp(2*(x+y)) - exp(2*x) - exp(2*y) +1;
If we call 4*exp(x+y)*sin(z) = J, and eliminate negative signs, we have;
J + exp(2*x) + exp(2*y) = exp(2*(x+y)) +1;
Now it is a nice expression. Exp is always >= 0, so both terms have an expression that's always >= 0 except J. Log() can linearize an exponential field only if both equation terms are strictly > 0.
But nobody forbids to make a little cheat later on it. Supposing J>0, if we take logarithm on both terms we have log(N) = log(D), that equals to
log(N)-log(D)=0,
or log(N/D)=0 (implicit surface expression), that always gives us real values if both N and D are >= 0.
Using this routine we can get a linear field that plots a Scherk;

Code:
float ScherkDe(float x, float y, float z)
 {
  float Ex=exp(x); float Ey=exp(y); float zz=Ex*Ey;
  float N = Ex*Ex+Ey*Ey;
  float D = 1+zz*zz;
  zz = 4.*sin(z)*zz; // can be + or - or change 4 to get elliptic holes
  if (zz>0) N += zz else D -= zz; // we bring it to the correct eq side :)
  return abs(log(N/D))-.05; // give it a little thickness so it renders better
}
The surface as is it's boring but you can do variations wink
A cool one is
ScherkDe(k*sin(x), k*sin(y), z)/k;
Or try to do complex transform on x and y to create effects.
This gallery shows a lot of those lovely surfaces: (not much is clear though)
https://wewanttolearn.wordpress.com/2015/11/11/scherks-minimal-surface/
« Last Edit: November 18, 2016, 04:05:25 PM by DarkBeam » Logged

No sweat, guardian of wisdom!
KRAFTWERK
Global Moderator
Fractal Senior
******
Posts: 1439


Virtual Surreality


WWW
« Reply #2 on: November 18, 2016, 08:39:58 PM »

Cool DB, but where is the M3D formula?  afro
Logged

DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #3 on: November 18, 2016, 10:06:09 PM »

Cool DB, but where is the M3D formula?  afro

Lol Johan, stuck on my pc still because I need to tune it a little u mad?
Logged

No sweat, guardian of wisdom!
woronoi
Alien
***
Posts: 32



« Reply #4 on: November 18, 2016, 10:23:27 PM »



https://www.shadertoy.com/view/4tcXDN


Logged
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #5 on: November 18, 2016, 11:15:36 PM »

 Beautiful shader! The de is imperfect as it shows in the 3d navi into mb3d. Idk if it is fixable in some way. (The final renders are perfect btw.) Thanks. A Beer Cup
But you spoiled the surprise a little  afro
« Last Edit: November 18, 2016, 11:25:09 PM by DarkBeam » Logged

No sweat, guardian of wisdom!
woronoi
Alien
***
Posts: 32



« Reply #6 on: November 19, 2016, 06:38:04 AM »

But you spoiled the surprise a little

I'm surprised too. It's working!
Logged
KRAFTWERK
Global Moderator
Fractal Senior
******
Posts: 1439


Virtual Surreality


WWW
« Reply #7 on: November 19, 2016, 09:41:45 AM »

Lol Johan, stuck on my pc still because I need to tune it a little u mad?

No problem Luca grin , I can wait!  afro
Logged

DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #8 on: November 21, 2016, 06:40:09 PM »

An attempt to replicate those pics;
http://numod.ins.uni-bonn.de/grape/EXAMPLES/AMANDUS/ktower.html
Except it actually uses another method that I didn't understand.
I used a lame one embarrass
(the correct one may be a simple mirroring)
I used a complex power but preserving intact the magnitude, that can give some trouble for higher powers; visualize this w EvalDraw

Code:
(x,y) //press F1 for help
z=mousx/10;
t=atan2(y,x); u=sqrt(x*x+y*y); // complex power (unoptimized but general)
t=3/2*t; // complex power (replace 3 with any integer to get pretty stars)
x=sin(t)*u; // complex power
y=cos(t)*u; // complex power
ex=exp(x);
ey=exp(y);
zz=ex*ey;
n=ex*ex+ey*ey;
d=1+zz*zz;
zz=4*sin(z)*zz;
if (zz>0) n=n+zz; else d=d-zz;
return log(n/d);

//press ALT/ESC for menu
Logged

No sweat, guardian of wisdom!
woronoi
Alien
***
Posts: 32



« Reply #9 on: November 21, 2016, 09:21:46 PM »

https://www.shadertoy.com/view/lldSWN
Logged
Sabine
Fractal Fertilizer
*****
Posts: 373



WWW
« Reply #10 on: November 21, 2016, 09:33:16 PM »

@woronoi The most beautiful 'swiss cheese"!  A Beer Cup
Logged

sabine62.deviantart.com
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #11 on: November 21, 2016, 10:27:13 PM »

I am seeing a bad de woronoi so keeping into account a power of 3 I think this should be better (still shows some sand in the center):

return (.1666667*abs(log(n/d))-0.01); // not sure about 0.01 maybe higher or lower

Thanks for testing those foolish routines of mine tho cheesy
Logged

No sweat, guardian of wisdom!
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Minimal Mandelbulb3D Gallery kr0mat1k 0 442 Last post March 03, 2011, 02:08:49 PM
by kr0mat1k
More natural Mandelbulb surfaces The 3D Mandelbulb Alef 4 5289 Last post December 25, 2011, 04:56:17 PM
by Alef
Iso potential surfaces Fragmentarium Feline 10 2943 Last post August 28, 2012, 09:20:25 PM
by Syntopia
Space-filling surfaces (new) Theories & Research « 1 2 » msltoe 16 1179 Last post August 28, 2013, 09:51:34 AM
by Tglad
Flat surfaces Images Showcase (Rate My Fractal) Dinkydau 4 1040 Last post January 14, 2015, 10:29:02 PM
by Dinkydau

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