Title: Smoothed MengerIfs Post by: DarkBeam on October 25, 2015, 04:59:29 PM It is just an idea. Here is the original code.
Code: Menger3(x,y,z){ // (c) knightyTo make a smoothed out version we must replace all swaps and abs() with smooth functions. The trouble is smooth the swaps :) Defining this formula: Code: function s0(a) {return (a<0)?a:0;}Now defining... Code: function s1(a,b) {return (0.5*(a-sqrt(a*a+b)));} // b must be positiveAs for smoothing abs you use sqrt(a*a+b) with the same meaning and precaution. No renders for now :D anyone can try this? Edit. Never mind. Fixed a stupid error Title: Re: Smoothed MengerIfs Post by: DarkBeam on October 25, 2015, 05:46:49 PM Function plot using Google...
https://www.google.it/search?q=sqrt(x)&sourceid=chrome-mobile&ie=UTF-8#q=(-sqrt(x*x%2B40)%2Bx)%2F2 (https://www.google.it/search?q=sqrt(x)&sourceid=chrome-mobile&ie=UTF-8#q=(-sqrt(x*x%2B40)%2Bx)%2F2) Title: Re: Smoothed MengerIfs Post by: mclarekin on October 26, 2015, 12:40:15 AM O0
I still have an infinity of coding to do, in exploring all the links you have already supplied me with. ;D Title: Re: Smoothed MengerIfs Post by: thargor6 on October 26, 2015, 01:21:41 AM No renders for now :D anyone can try this? Just released an ALPHA-version of the JIT-version ( http://www.fractalforums.com/beta-testing/experimental-mb3d-version-with-integrated-formula-compiler-(jit)/ (http://www.fractalforums.com/beta-testing/experimental-mb3d-version-with-integrated-formula-compiler-(jit)/) ). Maybe you can hack it together by yourself :DTitle: Re: Smoothed MengerIfs Post by: DarkBeam on October 26, 2015, 07:52:54 AM Great Andreas and good luck Mc! :angel1:
Title: Re: Smoothed MengerIfs Post by: cKleinhuis on October 26, 2015, 09:09:55 AM nice experiment alex, very nice to see you really continue the development, respects for that!
Title: Re: Smoothed MengerIfs Post by: DarkBeam on October 26, 2015, 11:46:49 AM ;D ;D ;D
Delphi version of MengerIfs. Code: [OPTIONS] Now on to the smooth one :D WOAH!!! Works :worm: :worm: :worm: Code: [OPTIONS] Title: Re: Smoothed MengerIfs Post by: thargor6 on October 26, 2015, 11:47:07 AM Delphi version of MengerIfs. Nice :beer:Btw, you may also use local functions here, would probably be a good approach to implement your s0/s1-function in this case, e.g.: Code: [SOURCE] Title: Re: Smoothed MengerIfs Post by: DarkBeam on October 26, 2015, 08:55:47 PM Great idea Andreas; too bad I prefer a longer code for an easier asm transcription. :) But you did a wonderful job. :beer: For the coders; Also a different smoothing style is easily done. Replace all sqrt(t*t+s) occurrencies (also those with x y z keeping the appropriate symbols ...) with: abs(t)*t*t/(s+t*t) (unoptimized but you got the idea) ;) |