Themabewertung:
  • 0 Bewertung(en) - 0 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5
(Archiv) Volker's Dachboden
#1
Hallo und Moin,

dann hau ich auch mal ein Bild rein ... und nach und nach vielleicht auch noch ein anderes ;-)

Dieses basiert auf CosinePow8 mit _SinHY, gerendert mit MB3D.

[spoil]Mandelbulb3Dv18{
g.....C2..UT7...M7...I6...kVSzWsQOrpzeJu9kGn1BxjQA2U4eVh0wfc9qqAsQ7pzuBYczpGLPxj
................................EyMj255br/2........A./..........nAnAnAnIG/2...wD
...Uz6....U71.../M.0/....2EW0...71...2E3.....YFL9s/OlLfD/.UJEArD..Ae0xckpp1.....
.7EnAnYD12..12.xbHA4/MStzwn46h1RZ7jDFzZognEe8z9............3/....y1...sD...../..
.z1...sDFuzmLzuU0v1..........M6isLAUJtSjA6GxKYhJSrf7XculnV.kywX.uwTU28fj1XWRBk9F
ernsfSA.0GcgyE9pFNwQ6.gDU.....YMe.............sD.6....sD..G.....................
.............oAnAt1...sD....zw1.................KTnSRNtUE4Siwui/...lI0.Ek....k1.
.....4iSoz1.......kz.wzzz1EV.Y5.H0...g1...UB....m....c3....F....6/...I1.....SF52
...U.ydelyzRkNqzTeOgzTbOa/6.1c..zzzz..UrOA.Km..E6MH/CQa3vz1..........Ek.LkzXWF1.
..PwJnxqKv9.CseqUo3pz0.IKgdN3Pxj/EU0.wzzz1...........s/...................E.2c..
zzzz.............0...................2./8.kzzzD............8....................
/EU0.wzzz1...................................2cXS0koLfhqEyUX.45.4zvh4Xn5/ucb.Axp
OfRyis6Ul/UlzSfl1k1qHzA..bvf.jSH/ucb.AxpOfxjUVxoD1.kty8kWhKUCu7.HThqOXjRMDxn..Qi
j0wzz3cXS0koLfhq...crIGJzz/crIGJyz1crIGJxz3crIGJ................................
E....6E.F2U.....I....2....kEjBLOiJ4IjRbA.IaQ..........................k/9.......
...................wz.........zj................................................
................................................................................
.....................2.....3....2....wpIdt4ON/.60x4S.65.........................
.....2...............................................XknxLXJ9SxD................
................................................................................
................................}
{Titel: 20161019-CoSinePow8_SinhY-01-02}[/spoil]


Angehängte Dateien Bild(er)
   
Zitieren
#2
Moin Volker,

erstmal: willkommen an Board!.. und ein interessanter visueller Einstieg hier. Da wird Glassdreams sich ja vielleicht freuen, hier im Moment nicht mehr ganz allein zu MB3D-en. Big Grin

Und sogar mit Params! 8-) Vorbildlich! Wink
Bin gespannt auf mehr.
Apophysis 7X v.15B | Amberlight 1.2.1 | Mandelbulber 2.11-1 | Explorador FF 7.7 | fr0st 1.4 | Chaoscope 0.3.1
Zitieren
#3
So, wieder mal ein Bildchen .. basierend auf den Difs-Tipps von hypex2772 und m2001.

Danke Euch :-)

[Bild: mini]
Zitieren
#4
Schöne räumliche Tiefe und Tönung!
Ist doch immer wieder interessant, was man mit einfachen Kugeln so alles anstellen kann .. Smile
Apophysis 7X v.15B | Amberlight 1.2.1 | Mandelbulber 2.11-1 | Explorador FF 7.7 | fr0st 1.4 | Chaoscope 0.3.1
Zitieren
#5
Und da ich gerade nicht von Difs wegkomme gleich noch so ein Ding :-)

[Bild: mini]

Code:
Mandelbulb3Dv18{
g.....O/..U81...4....26...kSnbbIzvEzziGDF13aWE.EBLQ1ZtX2hzPPOEZeNABpzyUl3VBMhlzj
................................XQQ/yOaFL/2........A.tA/........nAnAnAnQ5/2...wD
...Uz6........../M.0/.....kG/...c.....ED.....MLcbdCtl0jD/.U6xnNE...G0dkpXk1.e...
.7....kD12../..........wz.................................U0.....y1...sD...../..
.z1...sDlQOt1pqdSvP0T5d808.myOzdUhotBNfDcNt1uuF8MuXhLdieBfNlygwAE7KqCyhDpbw8K7DH
8vvkwAKXrZHryY28GzWez8gjU.....I8...........LD8YD.6....sD..G.....................
.............oAnAt1....E....z.es9E................................UXpGUE4....k1.
.....4iSoz1.......kK.wzzz1.d..6.R/...M2....A....M0...c3...k9....n....I1.....SF5I
...U.CqMXxDecWuzXBqMzX8ec06.oc..Pjxq...MarH7iXyD6oa4dabdnz1..........Ik.LkzXWF1.
..PwJnxqKv9.CseqUo3pz0.IKgdN3Pxj/EU0.wzzz1...........s/...................E.2c..
zzzz.............0...................2./8.kzzzD............8....................
/EU0.wzzz1...................................EZCq..2E./29mkasp2.YG8dYCJ4d3LK.UCu
cXSuZkaRp/Uk1DwkY5XI5/1.cZKOddNEnQn8.UCucXCQFh7SB/.dYG8dx/aNyx4.oG9hoe3QPWLH.E8d
YGu0.GZCq..2E./2...U..U7zz/U..U7yz1U..U7xz3U..U7................................
E....AU.V2k.....I....c....EMh3aSdtqN7NoI.MoI.A3..........................MU/4...
..................................................cF./.......O2E.......Uq.A.....
...wz.........zD........kz1.......kD./........yD................................
.....................2.....3....A....6pPpt4NZFaEjV5.............................
....Cs...sU.02E................E..........2........../.........E................
...............EOaNaNaNaty1.............................kz1........wz...........
................................/....E/...E1....XZ5Pdt4NZ7LG4B3.................
............Cs.......6U./2..............kz1........wz..........E................
.............U.E..............................zD...................wz.........zD
........kz9.................................}
{Titel: AmazingIfs_09-01}
Zitieren
#6
So, ich habe mal ein paar Tage Pause gemacht und bin nun auf der Suche nach ... ruhigen ... Fraktalen, die einen nicht so sehr mit Details weghauen.
Der Erfolg lässt noch auf sich warten, daher mal ein ABox-Kali-Hybrid mit AmazingBox und _SphereFolding:

[Bild: mini]
Zitieren
#7
RIP ... Render in Progress ... ich schätze, dass die Artefakte im Vordergrund noch weicher zu bekommen sind. Aber im Moment bin ich zu ungeduldig, möchte weiter erkunden :-)

[Bild: mini]
Code:
Mandelbulb3Dv18{
g.....Y/...V1...4....I6...EaMyNQ7Q2zzSoTsPUhGh0EIN8Vj3ujbzHJisG9nRUmzOoM9uzFrjzj
................................US8jn6GZb/2........A.71.................y.2...wD
...Uz6....UC..../Q.0/....2kW0...b....2Ej.....2.8JNffcqiD/QkgpgFEbJJV/l9RHk1.OXXX
zA....kD12../2.........qzqAnAnAnAnwjaNaNaNaN4z9...........U0.....12...sD...../..
.z1...sDJ777Tb9LgvHYoC5V.QJkyMZ5TmREBsgjAw62SYhG6sX0KDssJzOuyQue8SULbqhDhuygNREK
Fv1iYml6di3ryig9pvxFEWiDU.....23....8.........sD.6....sD..G.....................
.............oAnAt1...AE....zMxBvpZZ10NMtpR1......................kgpgFE3....k1.
.....4iSoz1.......kz.wzzz1.U..6.e/...Y1....C....J0...20...E9....P....I1.....SF52
...U.08cUyDcU0uzzzzzz1....6.2c..Pjxq...MarH7iXyD6oa4dabdnz1..........2k.8.kXWF1.
.sM93P58iz9.MmnWK2zwz0..........JEk6undGX...ic5xiMGtzuVnbh0VMExj..RqkEjIjzP.2c..
zzzz.............0...................2./8.kzzzD............8....................
/EU0.wzzz1...................................UIEl..cU08cKUkm659.U08cUS.1zzzz..8c
U08gQwxuo1.cU08cu10k.1A.U08cU4l7dWNV..8cU0ecnIwjf0.cU08cMf2cU08.U08cUOnL.0....8c
U0uom/8cU0.cU08c...cU08czz/cU08cyz1cU08cxz3cU08c................................
E....I.//3......zzzzz1......Gx4RVFLNYNoPgFKOiR4......................MU/4.U/4MU/
4M............................/k..........UaNaNaNat4./..........................
................................................................................
..........................kzzzzz......UFjl4NdtqNIJ4Rm3qAY/......................
06..4MU/.6E.06E./.............zD................................................
................................................................................
................................1....E/...U0....VpKMuZaPbZYFH/ENm/..............
..............U/4M........k.16.........................................kZ.2.....
..k4.1.......m/EQxckpX0LfzXNaNaNaNavz63iSIsuFVyD........z.2.....................
..........................................E.....I....k....UIjJbPYJ4N0x4S........
.........................sU1..U106E./..............wz.........zD........kznAnAnA
nAn../...............................dNaNaNaNavD..............................zD
........kz1..........................................6.....3....A....6pPpt4NZFaE
jV5.................................Cs...sU.02E...............zD........kz1.....
...wzAnAnAnAn2.E...............................EOaNaNaNaty1.....................
........kz1........wz...........................................}
{Titel: AmazingIfs_08-01}
Zitieren
#8
Ich bin gerade auf einem S/W-Trip ... und auch so erinnert mich dieses Fraktal stark an eine Wirbelsäule, Becken und Kreuzbein.

[Bild: mini]
Zitieren
#9
Ein leichter Tweak vom vorhergehenden Set ... war auch zuerst nur in Graustufen, habe mich dann aber zu etwas gewagteren Farben bewegen lassen :-D

[Bild: mini]
Zitieren
#10
FractView ... ich bin gerade im Bann der Symmetrie. Julia-Set vom Celtic.

[Bild: mini]

Code:
{
  "scale": [
    6.371340217576665E-7,
    -1.6006009350544042E-6,
    1.6006009350544042E-6,
    6.371340217576665E-7,
    -0.5777068992990607,
    0.48179450816340086
  ],
  "source": [
    "\/\/ Default Preset",
    "\/\/ This is a good start for all kinds of fractals",
    "\/\/ including newton sets, nova fractals and others.",
    "var x int, y int, color int;",
    "",
    "",
    "extern maxdepth int = 120;",
    "",
    "\/\/ some further arguments",
    "extern juliaset bool = false;",
    "extern juliapoint cplx = -0.8:0.16;",
    "",
    "\/\/ c: coordinates, breakcondition: a function whether we should stop, ",
    "\/\/ value: a real variable to return some kind of value",
    "\/\/        used in 3d-types for the height.",
    "\/\/ returns a quat representing the color",
    "func escapetime(c, breakcondition) {",
    "\tvar i int = 0,",
    "\t\tp cplx = juliapoint if juliaset else c,",
    "\t\tzlast cplx = 0,",
    "\t\tz cplx,",
    "\t\tznext cplx = 0;",
    "",
    "\textern mandelinit expr = \"0\";",
    "",
    "    z = c if juliaset else mandelinit;",
    "",
    "\textern function expr = \"mandelbrot(z, p)\";",
    "",
    "\tvar color quat;",
    "",
    "\twhile {",
    "\t\tznext = function;",
    "\t\tnot breakcondition(i, znext, z, zlast, c, p, color)",
    "\t} do {",
    "\t\t\/\/ advance to next values",
    "\t\tzlast = z;",
    "\t\tz = znext;",
    "\t}",
    "",
    "\t\/\/ return color",
    "\tcolor",
    "}",
    "",
    "\/\/ everything that is drawn must have a get_color-function.",
    "",
    "\/\/ c = coordinates (scaled)",
    "\/\/ value is a real variable for z-information in 3D",
    "\/\/ but also otherwise convenient to separate drawing",
    "\/\/ algorithm from transfer",
    "\/\/ returns color.",
    "func get_color(c, value) {",
    "",
    "\t\/\/ if the fractal accumulates some values",
    "\t\/\/ like in traps or addends, here is a got place to do it.",
    "",
    "\tfunc breakcondition(i, znext, z, zlast, c, p, color) {",
    "\t\tfunc bailoutcolor() {",
    "\t\t\textern bailout real = 128;",
    "\t\t\textern max_power real = 2;",
    "\t\t\tvar smooth_i = smoothen(znext, bailout, max_power) ;",
    "",
    "            \/\/ the next ones are only used in 3d-fractals",
    "\t\t\textern bailoutvalue expr = \"i + smooth_i\";",
    "\t\t\tvalue = bailoutvalue ;",
    "\t\t",
    "\t\t\textern bailouttransfer expr = \"log(value + 19)\";",
    "",
    "\t\t\textern bailoutpalette palette = [",
    "\t\t\t\t\t[#006, #26c, #fff, #fa0, #303]];",
    "\t",
    "\t\t\tcolor = bailoutpalette bailouttransfer",
    "\t\t}",
    "",
    "\t\tfunc lakecolor() {",
    "\t\t\textern epsilon real = 1e-9;",
    "\t\t",
    "\t\t\t\/\/ the next ones are only used in 3d-fractals",
    "\t\t\textern lakevalue expr = \"rad znext\";",
    "\t\t\tvalue = lakevalue;",
    "",
    "\t\t\textern laketransfer expr =",
    "\t\t\t\t\"arcnorm znext : log(1 + value)\";",
    "",
    "\t\t\textern lakepalette palette = [",
    "\t\t\t\t[#000, #000, #000, #000],",
    "\t\t\t\t[#f00, #ff0, #0f8, #00f],",
    "\t\t\t\t[#f88, #ff8, #afc, #88f]];",
    "",
    "\t\t\tcolor = lakepalette laketransfer",
    "\t\t}",
    "",
    "\t\t{ lakecolor() ; true } if not next(i, maxdepth) else",
    "\t\tradrange(znext, z, bailout, epsilon, bailoutcolor(), lakecolor())",
    "\t}",
    "\t",
    "\tescapetime(c, breakcondition)",
    "}",
    "",
    "func get_color_test(c, value) {",
    "\t\/\/ this one is just here for testing light effects",
    "    \/\/ circle + donut + green bg",
    "    var rc = rad c;",
    "    ",
    "    { value = (circlefn rc + 5); int2lab #0000ff} if rc < 1 else",
    "    { value = circlefn abs (rc - 3); int2lab #ff0000 } if rc =< 4 and rc >= 2 else",
    "    { value = -10; int2lab #00ff00 }",
    "}",
    "",
    "\/\/ ******************************************",
    "\/\/ * Next are just drawing procedures. They *",
    "\/\/ * should be the same for all drawings.   *                 ",
    "\/\/ ******************************************",
    "",
    "extern supersampling bool = false;",
    "extern light bool = false;",
    "",
    "\/\/ drawpixel for 2D",
    "func drawpixel_2d(x, y) { ",
    "\tvar c cplx = map(x, y);",
    "\tvar value real;",
    "\tget_color(c, value) \/\/ value is not used",
    "}",
    "",
    "\/\/ drawpixel for 3D",
    "func drawpixel_3d(x, y) {",
    "\tvar c00 cplx = map(x, y),",
    "\t\tc10 cplx = map(x + 1, y + 0.5),",
    "\t\tc01 cplx = map(x + 0.5, y + 1);",
    "\t",
    "\tvar h00 real, h10 real, h01 real; \/\/ heights",
    "\t",
    "\t\/\/ color is already kinda super-sampled",
    "\tvar color = (get_color(c00, h00) + get_color(c10, h10) + get_color(c01, h01)) \/ 3;",
    "",
    "\t\/\/ get height out of value",
    "\tfunc height(value) {",
    "\t\textern valuetransfer expr = \"value\";",
    "\t\tvaluetransfer",
    "\t}",
    "\t",
    "\th00 = height h00; h01 = height h01; h10 = height h10;",
    "",
    "\t\/\/ get the normal vector (cross product)",
    "\tvar xp = c10 - c00, xz = h10 - h00;",
    "\tvar yp = c01 - c00, yz = h01 - h00;",
    "\t",
    "\tvar np cplx = (xp.y yz - xz yp.y) : (xz yp.x - xp.x yz);",
    "\tvar nz real = xp.x yp.y - xp.y yp.x;",
    "\t\t",
    "\t\/\/ normalize np and nz",
    "\tvar nlen = sqrt(rad2 np + sqr nz);",
    "\tnp = np \/ nlen; nz = nz \/ nlen;",
    "\t\t",
    "\t\/\/ get light direction",
    "\textern lightvector cplx = -0.667 : -0.667; \/\/ direction from which the light is coming",
    "\tdef lz = sqrt(1 - sqr re lightvector - sqr im lightvector); \/\/ this is inlined",
    "",
    "\t\/\/ Lambert's law.",
    "\tvar cos_a real = dot(lightvector, np) + lz nz;",
    "",
    "\t\/\/ diffuse reflexion with ambient factor",
    "\textern lightintensity real = 1;",
    "\textern ambientlight real = 0.5;",
    "",
    "\t\/\/ if lumen is negative it is behind, ",
    "\t\/\/ but I tweak it a bit for the sake of the looks:",
    "\t\/\/ cos_a = -1 (which is super-behind) ==> 0",
    "\t\/\/ cos_a = 0 ==> ambientlight",
    "\t\/\/ cos_a = 1 ==> lightintensity",
    "",
    "\t\/\/ for a mathematically correct look use the following:",
    "\t\/\/ if cos_a < 0 then cos_a = 0;",
    "\t\/\/ color.a = color.a * (ambientlight + lightintensity lumen);",
    "\t",
    "\tdef d = lightintensity \/ 2; \/\/ will be inlined later",
    "",
    "\t\/\/ Change L in Lab-Color",
    "\tcolor.a = color.a (((d - ambientlight) cos_a + d) cos_a + ambientlight);",
    "",
    "\t\/\/ Next, spectacular reflection. Viewer is always assumed to be in direction (0,0,1)",
    "\textern spectacularintensity real = 1;",
    "",
    "\textern shininess real = 8;",
    "",
    "\t\/\/ r = 2 n l - l; v = 0:0:1",
    "\tvar spec_refl = 2 cos_a nz - lz;",
    "\t",
    "\t\/\/ 100 because L in the Lab-Model is between 0 and 100",
    "\tif spec_refl > 0 then",
    "\t\tcolor.a = color.a + 100 * spectacularintensity * spec_refl ^ shininess;",
    "",
    "\tcolor",
    "}",
    "",
    "func do_pixel(x, y) {",
    "\t\/\/ two or three dimensions?",
    "\tdef drawpixel = drawpixel_3d if light else drawpixel_2d;",
    "\t",
    "\tfunc drawaapixel(x, y) {",
    "\t\t0.25 (",
    "\t\t\tdrawpixel(x - 0.375, y - 0.125) + ",
    "\t\t\tdrawpixel(x + 0.125, y - 0.375) + ",
    "\t\t\tdrawpixel(x + 0.375, y + 0.125) +",
    "\t\t\tdrawpixel(x - 0.125, y + 0.375)\t\t\t",
    "\t\t);",
    "\t}",
    "",
    "\t\/\/ which function to apply?",
    "\tdef fn = drawpixel if not supersampling else drawaapixel;",
    "",
    "\tcolor = lab2int fn(x, y)",
    "}",
    "",
    "\/\/ and finally call the draing procedure",
    "do_pixel(x, y)"
  ],
  "arguments": {
    "exprs": {
      "function": "rabs sqr z + p",
      "bailoutvalue": "i + smooth_i",
      "bailouttransfer": "log(value + 1)"
    },
    "bools": {
      "juliaset": true,
      "light": false,
      "supersampling": true
    },
    "ints": {
      "maxdepth": 220
    },
    "reals": {
      "ambientlight": 1,
      "spectacularintensity": 10,
      "epsilon": 1.0E-9
    },
    "cplxs": {
      "lightvector": [
        -0.333,
        -0.667
      ]
    },
    "palettes": {
      "bailoutpalette": {
        "height": 1,
        "width": 7,
        "colors": [
          -5000269,
          -7848904,
          -16382713,
          -11176623,
          -5390609,
          -11181507,
          -7569832
        ]
      },
      "lakepalette": {
        "height": 1,
        "width": 6,
        "colors": [
          -16777216,
          -16777216,
          -16777216,
          -16777216,
          -16777216,
          -16777216
        ]
      }
    }
  }
}
Zitieren
#11
Und ein Bild noch von gestern :-) FractView halt ;-)

[Bild: mini]
Zitieren
#12
Und nochmals FractView.
[Bild: mini]
Zitieren
#13
Da ich keine Glasträume zerstören möchte, kommt dieses MB3D-Bild in diesen Thread. ;-)

Ein Quaternion modifiziert mit _Celtic:
[Bild: mini]
Zitieren
#14
Und wieder mal FractView: Celtic

[Bild: mini]

Code:
{
  "scale": [
    1.2028704744951317E-4,
    1.1996435093863463E-4,
    -1.1996435093863463E-4,
    1.2028704744951317E-4,
    0.2781681440895573,
    -0.27816918024240606
  ],
  "source": [
    "\/\/ Default Preset",
    "\/\/ This is a good start for all kinds of fractals",
    "\/\/ including newton sets, nova fractals and others.",
    "var x int, y int, color int;",
    "",
    "",
    "extern maxdepth int = 120;",
    "",
    "\/\/ some further arguments",
    "extern juliaset bool = false;",
    "extern juliapoint cplx = -0.8:0.16;",
    "",
    "\/\/ c: coordinates, breakcondition: a function whether we should stop, ",
    "\/\/ value: a real variable to return some kind of value",
    "\/\/        used in 3d-types for the height.",
    "\/\/ returns a quat representing the color",
    "func escapetime(c, breakcondition) {",
    "\tvar i int = 0,",
    "\t\tp cplx = juliapoint if juliaset else c,",
    "\t\tzlast cplx = 0,",
    "\t\tz cplx,",
    "\t\tznext cplx = 0;",
    "",
    "\textern mandelinit expr = \"0\";",
    "",
    "    z = c if juliaset else mandelinit;",
    "",
    "\textern function expr = \"mandelbrot(z, p)\";",
    "",
    "\tvar color quat;",
    "",
    "\twhile {",
    "\t\tznext = function;",
    "\t\tnot breakcondition(i, znext, z, zlast, c, p, color)",
    "\t} do {",
    "\t\t\/\/ advance to next values",
    "\t\tzlast = z;",
    "\t\tz = znext;",
    "\t}",
    "",
    "\t\/\/ return color",
    "\tcolor",
    "}",
    "",
    "\/\/ everything that is drawn must have a get_color-function.",
    "",
    "\/\/ c = coordinates (scaled)",
    "\/\/ value is a real variable for z-information in 3D",
    "\/\/ but also otherwise convenient to separate drawing",
    "\/\/ algorithm from transfer",
    "\/\/ returns color.",
    "func get_color(c, value) {",
    "",
    "\t\/\/ if the fractal accumulates some values",
    "\t\/\/ like in traps or addends, here is a got place to do it.",
    "",
    "\tfunc breakcondition(i, znext, z, zlast, c, p, color) {",
    "\t\tfunc bailoutcolor() {",
    "\t\t\textern bailout real = 128;",
    "\t\t\textern max_power real = 2;",
    "\t\t\tvar smooth_i = smoothen(znext, bailout, max_power) ;",
    "",
    "            \/\/ the next ones are only used in 3d-fractals",
    "\t\t\textern bailoutvalue expr = \"i + smooth_i\";",
    "\t\t\tvalue = bailoutvalue ;",
    "\t\t",
    "\t\t\textern bailouttransfer expr = \"log(value + 19)\";",
    "",
    "\t\t\textern bailoutpalette palette = [",
    "\t\t\t\t\t[#006, #26c, #fff, #fa0, #303]];",
    "\t",
    "\t\t\tcolor = bailoutpalette bailouttransfer",
    "\t\t}",
    "",
    "\t\tfunc lakecolor() {",
    "\t\t\textern epsilon real = 1e-9;",
    "\t\t",
    "\t\t\t\/\/ the next ones are only used in 3d-fractals",
    "\t\t\textern lakevalue expr = \"rad znext\";",
    "\t\t\tvalue = lakevalue;",
    "",
    "\t\t\textern laketransfer expr =",
    "\t\t\t\t\"arcnorm znext : log(1 + value)\";",
    "",
    "\t\t\textern lakepalette palette = [",
    "\t\t\t\t[#000, #000, #000, #000],",
    "\t\t\t\t[#f00, #ff0, #0f8, #00f],",
    "\t\t\t\t[#f88, #ff8, #afc, #88f]];",
    "",
    "\t\t\tcolor = lakepalette laketransfer",
    "\t\t}",
    "",
    "\t\t{ lakecolor() ; true } if not next(i, maxdepth) else",
    "\t\tradrange(znext, z, bailout, epsilon, bailoutcolor(), lakecolor())",
    "\t}",
    "\t",
    "\tescapetime(c, breakcondition)",
    "}",
    "",
    "func get_color_test(c, value) {",
    "\t\/\/ this one is just here for testing light effects",
    "    \/\/ circle + donut + green bg",
    "    var rc = rad c;",
    "    ",
    "    { value = (circlefn rc + 5); int2lab #0000ff} if rc < 1 else",
    "    { value = circlefn abs (rc - 3); int2lab #ff0000 } if rc =< 4 and rc >= 2 else",
    "    { value = -10; int2lab #00ff00 }",
    "}",
    "",
    "\/\/ ******************************************",
    "\/\/ * Next are just drawing procedures. They *",
    "\/\/ * should be the same for all drawings.   *                 ",
    "\/\/ ******************************************",
    "",
    "extern supersampling bool = false;",
    "extern light bool = false;",
    "",
    "\/\/ drawpixel for 2D",
    "func drawpixel_2d(x, y) { ",
    "\tvar c cplx = map(x, y);",
    "\tvar value real;",
    "\tget_color(c, value) \/\/ value is not used",
    "}",
    "",
    "\/\/ drawpixel for 3D",
    "func drawpixel_3d(x, y) {",
    "\tvar c00 cplx = map(x, y),",
    "\t\tc10 cplx = map(x + 1, y + 0.5),",
    "\t\tc01 cplx = map(x + 0.5, y + 1);",
    "\t",
    "\tvar h00 real, h10 real, h01 real; \/\/ heights",
    "\t",
    "\t\/\/ color is already kinda super-sampled",
    "\tvar color = (get_color(c00, h00) + get_color(c10, h10) + get_color(c01, h01)) \/ 3;",
    "",
    "\t\/\/ get height out of value",
    "\tfunc height(value) {",
    "\t\textern valuetransfer expr = \"value\";",
    "\t\tvaluetransfer",
    "\t}",
    "\t",
    "\th00 = height h00; h01 = height h01; h10 = height h10;",
    "",
    "\t\/\/ get the normal vector (cross product)",
    "\tvar xp = c10 - c00, xz = h10 - h00;",
    "\tvar yp = c01 - c00, yz = h01 - h00;",
    "\t",
    "\tvar np cplx = (xp.y yz - xz yp.y) : (xz yp.x - xp.x yz);",
    "\tvar nz real = xp.x yp.y - xp.y yp.x;",
    "\t\t",
    "\t\/\/ normalize np and nz",
    "\tvar nlen = sqrt(rad2 np + sqr nz);",
    "\tnp = np \/ nlen; nz = nz \/ nlen;",
    "\t\t",
    "\t\/\/ get light direction",
    "\textern lightvector cplx = -0.667 : -0.667; \/\/ direction from which the light is coming",
    "\tdef lz = sqrt(1 - sqr re lightvector - sqr im lightvector); \/\/ this is inlined",
    "",
    "\t\/\/ Lambert's law.",
    "\tvar cos_a real = dot(lightvector, np) + lz nz;",
    "",
    "\t\/\/ diffuse reflexion with ambient factor",
    "\textern lightintensity real = 1;",
    "\textern ambientlight real = 0.5;",
    "",
    "\t\/\/ if lumen is negative it is behind, ",
    "\t\/\/ but I tweak it a bit for the sake of the looks:",
    "\t\/\/ cos_a = -1 (which is super-behind) ==> 0",
    "\t\/\/ cos_a = 0 ==> ambientlight",
    "\t\/\/ cos_a = 1 ==> lightintensity",
    "",
    "\t\/\/ for a mathematically correct look use the following:",
    "\t\/\/ if cos_a < 0 then cos_a = 0;",
    "\t\/\/ color.a = color.a * (ambientlight + lightintensity lumen);",
    "\t",
    "\tdef d = lightintensity \/ 2; \/\/ will be inlined later",
    "",
    "\t\/\/ Change L in Lab-Color",
    "\tcolor.a = color.a (((d - ambientlight) cos_a + d) cos_a + ambientlight);",
    "",
    "\t\/\/ Next, spectacular reflection. Viewer is always assumed to be in direction (0,0,1)",
    "\textern spectacularintensity real = 1;",
    "",
    "\textern shininess real = 8;",
    "",
    "\t\/\/ r = 2 n l - l; v = 0:0:1",
    "\tvar spec_refl = 2 cos_a nz - lz;",
    "\t",
    "\t\/\/ 100 because L in the Lab-Model is between 0 and 100",
    "\tif spec_refl > 0 then",
    "\t\tcolor.a = color.a + 100 * spectacularintensity * spec_refl ^ shininess;",
    "",
    "\tcolor",
    "}",
    "",
    "func do_pixel(x, y) {",
    "\t\/\/ two or three dimensions?",
    "\tdef drawpixel = drawpixel_3d if light else drawpixel_2d;",
    "\t",
    "\tfunc drawaapixel(x, y) {",
    "\t\t0.25 (",
    "\t\t\tdrawpixel(x - 0.375, y - 0.125) + ",
    "\t\t\tdrawpixel(x + 0.125, y - 0.375) + ",
    "\t\t\tdrawpixel(x + 0.375, y + 0.125) +",
    "\t\t\tdrawpixel(x - 0.125, y + 0.375)\t\t\t",
    "\t\t);",
    "\t}",
    "",
    "\t\/\/ which function to apply?",
    "\tdef fn = drawpixel if not supersampling else drawaapixel;",
    "",
    "\tcolor = lab2int fn(x, y)",
    "}",
    "",
    "\/\/ and finally call the draing procedure",
    "do_pixel(x, y)"
  ],
  "arguments": {
    "exprs": {
      "laketransfer": " log(1 - sqrt value + sqrt i value)",
      "function": "rabs sqr z + p",
      "bailouttransfer": "log(value + 9 smooth_i)"
    },
    "bools": {
      "juliaset": true,
      "light": true,
      "supersampling": true
    },
    "ints": {
      "maxdepth": 30
    },
    "reals": {
      "ambientlight": 2,
      "spectacularintensity": 11
    },
    "cplxs": {
      "juliapoint": [
        -0.7235263168228742,
        -1.3613892399341654
      ],
      "lightvector": [
        0.2781681440895573,
        -0.678169180242406
      ]
    },
    "palettes": {
      "bailoutpalette": {
        "height": 1,
        "width": 6,
        "colors": [
          -16777216,
          -5592406,
          -16777216,
          -9671572,
          -16777216,
          -16777216
        ]
      },
      "lakepalette": {
        "height": 1,
        "width": 6,
        "colors": [
          -5000269,
          -3158065,
          -9215150,
          -2102550,
          -16185079,
          -9819361
        ]
      }
    }
  }
}
Zitieren
#15
Ein sehr ähnliches Farbschema, wie beim letzten Bild. Hmpf.
Aber ich habe mich in diese Abwandlung der Mandelbrotmenge verguckt. :-) Muss es also teilen. ;-)

[Bild: mini]
Zitieren


Gehe zu:


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste