Title: Special "offset" and "rotate" options from Fractallab possible in M3d-formula? Post by: SaMMy on March 07, 2011, 03:15:55 AM Hi, there are options in the new WebGL-Prog. FractalLab that modifies the MengerSponge very nice.
The options called OFFSETS (offset x, y, z) and the other called FRACTAL ROTATION 1 (rotate x, y, z). I try and try to do the same in M3d - but nothing, complete other results for me :'( PLEASE, is it possible to "do" the same on a M3D-MENGER (i.e. with one of the new formulas) ? Many thanks. SaMMy Here are to samples, the first with modified Offset y , the other with modified Rotate y. Title: Re: Special "offset" and "rotate" options from Fractallab possible in M3d-formula? Post by: SaMMy on March 07, 2011, 03:22:23 AM i find some code in Fractal-Lab. I dont know anything on programming - is the answer to find here ?
#ifdef dEMengerSponge // Pre-calculations vec3 halfSpongeScale = vec3(0.5) * scale; // Adapted from Buddhis algorithm // http://www.fractalforums.com/3d-fractal-generation/revenge-of-the-half-eaten-menger-sponge/msg21700/ vec3 MengerSponge(vec3 w) { w *= objectRotation; w = (w * 0.5 + vec3(0.5)) * scale; // scale [-1, 1] range to [0, 1] vec3 v = abs(w - halfSpongeScale) - halfSpongeScale; float d1 = max(v.x, max(v.y, v.z)); // distance to the box float d = d1; float p = 1.0; float md = 10000.0; vec3 cd = v; for (int i = 0; i < maxIterations; i++) { vec3 a = mod(3.0 * w * p, 3.0); p *= 3.0; v = vec3(0.5) - abs(a - vec3(1.5)) + offset; v *= fractalRotation1; // distance inside the 3 axis aligned square tubes d1 = min(max(v.x, v.z), min(max(v.x, v.y), max(v.y, v.z))) / p; // intersection d = max(d, d1); if (i < colorIterations) { md = min(md, d); cd = v; } } // The distance estimate, min distance, and fractional iteration count return vec3(d * 2.0 / scale, md, dot(cd, cd)); } #endif Title: Re: Special "offset" and "rotate" options from Fractallab possible in M3d-formula? Post by: DarkBeam on March 07, 2011, 12:57:52 PM WHOA those Menger variations are simply outstanding. Especially the Menger castle and the spheric... :o
I'm not good with IFS formulas. But I was also thinking about a Cantor set, Oppenheimer wrote a formula for this but he don't told me what is, he said it's all in Wikipedia but it's not all in Wiki :-\ Cantor 3D on video ;D http://www.youtube.com/watch?v=R6lSGzL4cuI Title: Re: Special "offset" and "rotate" options from Fractallab possible in M3d-formula? Post by: visual.bermarte on March 07, 2011, 03:00:46 PM @Sammy: why don't you use Fractal-Lab directly? :dink:
Title: Re: Special "offset" and "rotate" options from Fractallab possible in M3d-formula? Post by: SaMMy on March 07, 2011, 05:11:36 PM @ visual:
because of the low resolution in FractalLab and because my very old gdx-Card (Nvidia 7800GS). I have found a little more info what special kind of Menger-Modification we can see here: The images are rendered on the GPU using another Pixel Bender filter I'm working on. The square images are based on a Menger sponge with rotation and offsets applied at each iteration, which is why the structure divides and changes on each iteration. Creates a nice 'greeble' effect :-) (from: http://www.subblue.com/blog/2010/11/7/subdivision (http://www.subblue.com/blog/2010/11/7/subdivision)) Here are some more pics: PLEEEEAASE, is there no way to do this in M3D ?? (http://www.subblue.com/assets/0000/5209/subdiv-street6_large.jpg) (http://www.subblue.com/assets/0000/5263/subdiv-flats6_large.jpg) Title: Re: Special "offset" and "rotate" options from Fractallab possible in M3d-formula? Post by: bib on March 07, 2011, 07:10:52 PM PLEEEEAASE, is there no way to do this in M3D ?? Not directly as far as I know. What you you tested? Maybe it's a stupid question but why do want to do it in M3D if you can do it in Fractal Lab? Title: Re: Special "offset" and "rotate" options from Fractallab possible in M3d-formula? Post by: SaMMy on March 07, 2011, 07:48:57 PM Hi bib:
Quote Maybe it's a stupid question but why do want to do it in M3D if you can do it in Fractal Lab? - my gfx-card is very old and slow (Nvidia 7800GS, AGP, 256MB), - only low resolution possible in FractalLab, - and the note from subblue: "... slow down and freeze your system if you try to render an image that is too large ..." Quote Not directly as far as I know. What you you tested? I try menger together with some add-formulas ( i.e. rotate, translate and so on). But without a real understanding of mathematic it's impossible for me to find the right formula-combo :tongue1: Title: Re: Special "offset" and "rotate" options from Fractallab possible in M3d-formula? Post by: DarkBeam on March 07, 2011, 08:07:39 PM Hi bib: Quote Maybe it's a stupid question but why do want to do it in M3D if you can do it in Fractal Lab? - my gfx-card is very old and slow (Nvidia 7800GS, AGP, 256MB), - only low resolution possible in FractalLab, - and the note from subblue: "... slow down and freeze your system if you try to render an image that is too large ..." Quote Not directly as far as I know. What you you tested? I try menger together with some add-formulas ( i.e. rotate, translate and so on). But without a real understanding of mathematic it's impossible for me to find the right formula-combo :tongue1: Well... Don't you think that it's hard to write a formula without actually know what is? ;D Title: Re: Special "offset" and "rotate" options from Fractallab possible in M3d-formula? Post by: SaMMy on March 07, 2011, 08:54:45 PM Quote Well... Don't you think that it's hard to write a formula without actually know what is? :) Thats right. I do fractal-art since over 10 years, so i know the theoretical foundations. But anyway i'am no mathematican. :-\ :) But I'am absolute fascinated from this kind of divided structures that i start to find a solution by 'trail and error' in M3D. :hurt: :) So there is really no way to " ... apply an offset / rotation at each iteration so that the structure divides and changes on each iteration ... (on a menger)" in m3d ? SaMMy --------- HEITER WEITER Title: Re: Special "offset" and "rotate" options from Fractallab possible in M3d-formula? Post by: DarkBeam on March 07, 2011, 09:09:03 PM Quote Well... Don't you think that it's hard to write a formula without actually know what is? :) Thats right. I do fractal-art since over 10 years, so i know the theoretical foundations. But anyway i'am no mathematican. :-\ :) But I'am absolute fascinated from this kind of divided structures that i start to find a solution by 'trail and error' in M3D. :hurt: :) So there is really no way to " ... apply an offset / rotation at each iteration so that the structure divides and changes on each iteration ... (on a menger)" in m3d ? SaMMy --------- HEITER WEITER Maybe, but what for the second formula you asked? :) Title: Re: Special "offset" and "rotate" options from Fractallab possible in M3d-formula? Post by: DarkBeam on March 07, 2011, 09:16:11 PM i find some code in Fractal-Lab. I dont know anything on programming - is the answer to find here ? #ifdef dEMengerSponge // Pre-calculations vec3 halfSpongeScale = vec3(0.5) * scale; // Adapted from Buddhis algorithm // http://www.fractalforums.com/3d-fractal-generation/revenge-of-the-half-eaten-menger-sponge/msg21700/ vec3 MengerSponge(vec3 w) { w *= objectRotation; w = (w * 0.5 + vec3(0.5)) * scale; // scale [-1, 1] range to [0, 1] vec3 v = abs(w - halfSpongeScale) - halfSpongeScale; float d1 = max(v.x, max(v.y, v.z)); // distance to the box float d = d1; float p = 1.0; float md = 10000.0; vec3 cd = v; for (int i = 0; i < maxIterations; i++) { vec3 a = mod(3.0 * w * p, 3.0); p *= 3.0; v = vec3(0.5) - abs(a - vec3(1.5)) + offset; v *= fractalRotation1; // distance inside the 3 axis aligned square tubes d1 = min(max(v.x, v.z), min(max(v.x, v.y), max(v.y, v.z))) / p; // intersection d = max(d, d1); if (i < colorIterations) { md = min(md, d); cd = v; } } // The distance estimate, min distance, and fractional iteration count return vec3(d * 2.0 / scale, md, dot(cd, cd)); } #endif The key is in the bold line. In my opinion it is a 2d rotation of the xy plane, but applied just before the folding... Technically it may be not hard to implement, but I don't know exactly the Menger3 formula and I don't like the effect of this... :dink: Title: Re: Special "offset" and "rotate" options from Fractallab possible in M3d-formula? Post by: SaMMy on March 07, 2011, 09:59:26 PM I can try to get an answer from Jesse for the menger3-formula. You dont like this effect ? - I'am really addicted to this kind of structures. :D Here is a 2 pics with less iterations: (http://www.subblue.com/assets/0000/5227/subdiv-street4_large.jpg) (http://www.subblue.com/assets/0000/5236/subdiv-street3_large.jpg) And here is the complete Code (but I worry that thisis not helpfully?): Code: /** Title: Re: Special "offset" and "rotate" options from Fractallab possible in M3d-formula? Post by: Jesse on March 07, 2011, 10:45:58 PM I can try to get an answer from Jesse for the menger3-formula. You dont like this effect ? - I'am really addicted to this kind of structures. :D ;D this is obvious, but you are totally crazy too! For me it is a feeling of respect to Subblue and his work, so just copying his formulas he made is not really what i want to do. But this only my feeling, Subblue might think different, and if someone who is capable of making formulas for m3d can fullfill your wish, it should be ok for me. :dink: Title: Re: Special "offset" and "rotate" options from Fractallab possible in M3d-formula? Post by: Oppenheimer_ on March 27, 2011, 11:35:13 PM WHOA those Menger variations are simply outstanding. Especially the Menger castle and the spheric... :o I'm not good with IFS formulas. But I was also thinking about a Cantor set, Oppenheimer wrote a formula for this but he don't told me what is, he said it's all in Wikipedia but it's not all in Wiki :-\ Cantor 3D on video ;D http://www.youtube.com/watch?v=R6lSGzL4cuI i'd like to clear out a few things here. at first i didn't wrote a formula that describes the cantor set. that video was an experiment and only shows a pretty coarse approach on that topic. the idea was to present an audiovisual feeling of the ruleset of the cantorset. and i still think that everything one needs to know about the c-set/dust is well described over at wikipedia (http://en.wikipedia.org/wiki/Cantor_set). Title: Re: Special "offset" and "rotate" options from Fractallab possible in M3d-formula? Post by: Lee Oliver on April 04, 2011, 10:45:04 PM I don't know if this is exactly what you are looking for, but it seems to be similar. In order to achieve some of the transformations from subblue's program just adjust the julia values.
(http://nocache-nocookies.digitalgott.com/gallery/6/1787_04_04_11_10_41_13.jpeg) Title: Re: Special "offset" and "rotate" options from Fractallab possible in M3d-formula? Post by: DarkBeam on April 05, 2011, 10:15:15 AM What program you are using? :dink:
Title: Re: Special "offset" and "rotate" options from Fractallab possible in M3d-formula? Post by: Lee Oliver on April 05, 2011, 11:15:39 AM I'm using Mandelbulb 3D just as you were requesting. :)
(sorry I forgot to include the parameters :dink:) Mandelbulb3Dv16{ N.....S....O/...w..........eTWMybMIzzGztX.sdQb0EIodrfJRioyvwhXLoFnv1z4ujOMVvSByj ................................KdUAY8i78.2........Y./..................I/2..... .................Q.//....6Ux....o/....E.......hKkXea7NpD/QU5y9xD....//...w1.BnAH z.URBOhD..../2.........wz........................................y1...sD...../.. .w1...sD8NWhDKPwIxXxfZAPndDOyURUcoBZvtnDi49zZuSuhqfsv4ldOaYJzsq38Ty/07cjNerhTHtS ywfAXH4.bUGUyQBOorMhlHpD......Y3....2.................sD.6E..................... ..............................LRX9.0qBi.UOrs0UnRX9.orBi.cVrs0.ESX9.............. .....................EqUP0.U..6......A1...EB.........A1...EE....4/...k1....UJn2I ...U.yziw.6..0AU..6k.eOpzP2./c..sbhY.osRBv4SdZzjJAqyTr69/.2...........EA8.klLS4. QvM93P58izPZKWugHVQxz0...........2X0..6U.0.xk4smd5DxzY3yFGmnCfyD..........E6lcEz DFZO......................kkhw1ZBGouz4U.8.kzzzD................................. /6U0.wzzz1....................................6U.0.U./..ee0U.06..1Ak.EJJzzzz.caO J0.mx/6U.0.U./..Qs5U.06..02...bT.06U..6E...ly/6U.0.U./..Mw5U.06..02..kqT.06U..6E ...kz/6U.0.U./.....U.06.eeG8dY0.IJpzzzD.wy5U.06..IbPbJqPitWOkR4................. E6../A....E.....I....c....EHZtqNZ7rA..pPrJaQ..............................U/4MU/ 4M.................0./........zD........kz1........wz........................... ................................................................................ .....................2...../....1....2IPVdLOiR460x4S............................ .Qk0..........................zD........kz1........wz.........zD................ ................................................................................ ................................/....E/...U0....BJaPbJaQn.kMcNZA................ ................4MU/4MU/................6.2........wz.........zD........kz1..... ...................................................................wz........... ............................................} Title: Re: Special "offset" and "rotate" options from Fractallab possible in M3d-formula? Post by: DarkBeam on April 05, 2011, 12:06:29 PM Amazing combo, thanks :banana: :banana: :thumbsup1:
Title: Re: Special "offset" and "rotate" options from Fractallab possible in M3d-formula? Post by: DarkBeam on April 05, 2011, 12:20:52 PM This is without Amazing box, it's not necessary for the effect :) Mandelbulb3Dv16{ N.....S....O/...w.........kGE8FQCvc/.DblJ9Mcw/2ESzDYePnNZz1akPOigSovyc3U4eVHJAwD ................................SxwdyOPYpz1........Y./..................y.2..... .................Q.//....6kD/...p/....E......MYnXi6q3gqD/QU5y9xD....//...w1.BnAH z.URBOhD..../2.........wz........................................y1...sD...../.. .w1...sDlurL7WR/fx1..........iuOKsK4XMdj3OlMSnb60rPgyxJWMLkOz6u/vkK4XMdjZSkCgZl6 KuXffNVPNAWZyMl9PQ6q3gqD......I7....G.................sD.6E.0................... ..............................LRR4.0qpN.UOLb/UnRR4.orpN.cVLb/.ESR4.............. .....................EqUP0.U..6......A1...EB.........A1...EE....4/...k1....UJn2I ...U.yziw.6..0AU..6k.eOpzP2./c..sbhY.osRBv4SdZzjJAqyTr69/.2...........EA8.klLS4. QvM93P58izPZKWugHVQxz0...........2X0..6U.0.xk4smd5DxzY3yFGmnCfyD..........E6lcEz DFZO......................kkhw1ZBGouz4U.8.kzzzD................................. /6U0.wzzz1....................................6U.0.U./..ee0U.06..1Ak.EJJzzzz.caO J0.mx/6U.0.U./..Qs5U.06..02...bT.06U..6E...ly/6U.0.U./..Mw5U.06..02..kqT.06U..6E ...kz/6U.0.U./.....U.06.eeG8dY0.IJpzzzD.wy5U.06..IbPbJqPitWOkR4................. E6../A....E.....I....c....EHZtqNZ7rA..pPrJaQ..............................U/4MU/ 4M.................0./........zD........kz1........wz........................... ................................................................................ .....................2.....3....1....w3Jm3aPnlKMoJ4............................. ..............................zj..............................zD................ ................................................................................ ................................/....E/...U0....BJaPbJaQn.kMcNZA................ ................4MU/4MU/................6.2........wz.........zD........kz1..... ...................................................................wz........... ............................................} And MengerCastle: Mandelbulb3Dv16{ N.....S....O/...w.........kjWMsOcz4wzCBDhVQl1qwjsT8r86KWKzHL/kGkT0EszmwYgVUtfvyj ................................bhIZifINE/2........Y./..................y.2..... .................M.//....6EQ/...70....E......YjGAfsK45lD/.U5y9xD....//...w1.BnAH z.URBOhD..../2.........wz........................................y1...sD...../.. .w1...sDY9rvqZ1aosHC8fne68G0zGl85FWoXYkD9HdH7iZlFwHhE/LyaQ1mvIjkhmYHToXjAvWjBimZ os1G9Aa7GDG0zcO/TY8WWYkD......oH......................sD.6kz0................... ..............................LRR4.0qpN.UOLb/UnRR4.orpN.cVLb/.ESR4.............. .....................EqUP0.U..6......A1...EB.........A1...EE....4/...k1....UJn2I ...U.yziw.6..0AU..6k.eOpzP2./c..sbhY.osRBv4SdZzjJAqyTr69/.2...........EA8.klLS4. QvM93P58izPZKWugHVQxz0...........2X0..6U.0.xk4smd5DxzY3yFGmnCfyD..........E6lcEz DFZO......................kkhw1ZBGouz4U.8.kzzzD................................. /6U0.wzzz1....................................6U.0.U./..ee0U.06..1Ak.EJJzzzz.caO J0.mx/6U.0.U./..Qs5U.06..02...bT.06U..6E...ly/6U.0.U./..Mw5U.06..02..kqT.06U..6E ...kz/6U.0.U./.....U.06.eeG8dY0.IJpzzzD.wy5U.06..IbPbJqPitWOkR4................. E6../A....E.....I....c....EHZtqNZ7rA..pPrJaQ..............................U/4MU/ 4M.................0./........zD........kz1........wz........................... ................................................................................ .....................2.....3....1....w3Jm3aPnlKMoJ4............................. ..............................zj........Uz1...................zD................ ................................................................................ ................................/....E/...U0....BJaPbJaQn.kMcNZA................ ................4MU/4MU/................6.2........wz.........zD........kz1..... ...................................................................wz........... ............................................} ;D |