[{"data":1,"prerenderedAt":680},["ShallowReactive",2],{"docs-menu":3,"docs-page:\u002Fdocs\u002Fexamples\u002Fmetaballs":193},[4,11,108,143],{"title":5,"path":6,"stem":7,"order":8,"summary":9,"exact":10},"Documentation","\u002Fdocs","docs\u002Findex",0,"How to build drawings with Wirepaint's node graph.",true,{"title":12,"order":13,"summary":14,"path":15,"stem":16,"children":17,"page":107,"exact":10},"Guides",1,null,"\u002Fdocs\u002Fguides","docs\u002Fguides",[18,23,29,35,41,47,53,59,65,71,77,83,89,95,101],{"title":19,"path":20,"stem":21,"order":13,"summary":22,"exact":10},"Getting started","\u002Fdocs\u002Fguides\u002Fgetting-started","docs\u002Fguides\u002Fgetting-started","The Playground's areas, and what each one is for.",{"title":24,"path":25,"stem":26,"order":27,"summary":28,"exact":10},"Navigating the editor","\u002Fdocs\u002Fguides\u002Fnavigating-the-editor","docs\u002Fguides\u002Fnavigating-the-editor",2,"Panning, zooming, selecting, moving and deleting in the graph editor.",{"title":30,"path":31,"stem":32,"order":33,"summary":34,"exact":10},"Adding nodes","\u002Fdocs\u002Fguides\u002Fadding-nodes","docs\u002Fguides\u002Fadding-nodes",3,"The add-node menu, its categories and search, and suggested nodes for a dropped link.",{"title":36,"path":37,"stem":38,"order":39,"summary":40,"exact":10},"Connecting pins","\u002Fdocs\u002Fguides\u002Fconnecting-pins","docs\u002Fguides\u002Fconnecting-pins",4,"Drawing wires between pins, replacing and moving them, and which pins fit together.",{"title":42,"path":43,"stem":44,"order":45,"summary":46,"exact":10},"Context menus","\u002Fdocs\u002Fguides\u002Fcontext-menus","docs\u002Fguides\u002Fcontext-menus",5,"The right-click actions for nodes, wires and empty canvas.",{"title":48,"path":49,"stem":50,"order":51,"summary":52,"exact":10},"Property inspector","\u002Fdocs\u002Fguides\u002Fproperty-inspector","docs\u002Fguides\u002Fproperty-inspector",6,"Editing a node's inputs: numbers, switches, text, drop-down lists and object fields.",{"title":54,"path":55,"stem":56,"order":57,"summary":58,"exact":10},"Live preview","\u002Fdocs\u002Fguides\u002Flive-preview","docs\u002Fguides\u002Flive-preview",7,"The drawing's page and its size, what lies outside it, panning and zooming, and downloading the image as SVG.",{"title":60,"path":61,"stem":62,"order":63,"summary":64,"exact":10},"Errors","\u002Fdocs\u002Fguides\u002Ferrors","docs\u002Fguides\u002Ferrors",8,"How the Playground shows a node that fails, and what it means for the drawing.",{"title":66,"path":67,"stem":68,"order":69,"summary":70,"exact":10},"Subgraphs","\u002Fdocs\u002Fguides\u002Fsubgraphs","docs\u002Fguides\u002Fsubgraphs",9,"Create subgraphs, edit their bodies and signatures, and use them as functions for Map, Filter, Reduce and Repeat.",{"title":72,"path":73,"stem":74,"order":75,"summary":76,"exact":10},"Saving and opening","\u002Fdocs\u002Fguides\u002Fsaving-and-opening","docs\u002Fguides\u002Fsaving-and-opening",10,"Keep your work in a file with the File menu, and open it again later.",{"title":78,"path":79,"stem":80,"order":81,"summary":82,"exact":10},"Freezing nodes","\u002Fdocs\u002Fguides\u002Ffreezing-nodes","docs\u002Fguides\u002Ffreezing-nodes",11,"Keep a node's result as it is, whatever happens to its inputs.",{"title":84,"path":85,"stem":86,"order":87,"summary":88,"exact":10},"Text","\u002Fdocs\u002Fguides\u002Ftext","docs\u002Fguides\u002Ftext",12,"Add text to a drawing, pick its font, and place it.",{"title":90,"path":91,"stem":92,"order":93,"summary":94,"exact":10},"Effects","\u002Fdocs\u002Fguides\u002Feffects","docs\u002Fguides\u002Feffects",13,"Shadows, blur, glow, grain, wobbly outlines, color changes, opacity and blend modes on any object.",{"title":96,"path":97,"stem":98,"order":99,"summary":100,"exact":10},"Undo and redo","\u002Fdocs\u002Fguides\u002Fundo-and-redo","docs\u002Fguides\u002Fundo-and-redo",14,"Take back an edit, or put it back, with the Edit menu or Ctrl+Z.",{"title":102,"path":103,"stem":104,"order":105,"summary":106,"exact":10},"Frames","\u002Fdocs\u002Fguides\u002Fframes","docs\u002Fguides\u002Fframes",15,"Draw titled frames around nodes to organize a graph.",false,{"title":109,"order":27,"summary":14,"path":110,"stem":111,"children":112,"page":107,"exact":10},"Concepts","\u002Fdocs\u002Fconcepts","docs\u002Fconcepts",[113,118,123,128,133,138],{"title":114,"path":115,"stem":116,"order":13,"summary":117,"exact":10},"Dataflow and the Output node","\u002Fdocs\u002Fconcepts\u002Fdataflow","docs\u002Fconcepts\u002Fdataflow","How a graph is evaluated, starting from the Output node, and what that means for what you build.",{"title":119,"path":120,"stem":121,"order":27,"summary":122,"exact":10},"Pin types and colors","\u002Fdocs\u002Fconcepts\u002Fpin-types","docs\u002Fconcepts\u002Fpin-types","What a pin's type says, which wires fit, and how colors and handle shapes show it.",{"title":124,"path":125,"stem":126,"order":33,"summary":127,"exact":10},"Generic pins","\u002Fdocs\u002Fconcepts\u002Fgeneric-pins","docs\u002Fconcepts\u002Fgeneric-pins","Pins whose type is set by what you connect, such as the T of the array nodes.",{"title":129,"path":130,"stem":131,"order":39,"summary":132,"exact":10},"Units and coordinates","\u002Fdocs\u002Fconcepts\u002Funits-and-coordinates","docs\u002Fconcepts\u002Funits-and-coordinates","Page coordinates, angles in radians, local and page positions, and the ranges of t, colors and lerps.",{"title":134,"path":135,"stem":136,"order":45,"summary":137,"exact":10},"Determinism and random","\u002Fdocs\u002Fconcepts\u002Fdeterminism","docs\u002Fconcepts\u002Fdeterminism","Why a graph always draws the same thing, how the random nodes fit in, and how to reroll them with seeds.",{"title":139,"path":140,"stem":141,"order":51,"summary":142,"exact":10},"Subgraphs and functions","\u002Fdocs\u002Fconcepts\u002Fsubgraphs","docs\u002Fconcepts\u002Fsubgraphs","Functions are graphs of their own, used as nodes or passed to Map, Filter, Reduce and Repeat.",{"title":144,"order":33,"summary":14,"path":145,"stem":146,"children":147,"page":107,"exact":10},"Examples","\u002Fdocs\u002Fexamples","docs\u002Fexamples",[148,153,158,163,168,173,178,183,188],{"title":149,"path":150,"stem":151,"order":13,"summary":152,"exact":10},"Blending two circles","\u002Fdocs\u002Fexamples\u002Fblending-circles","docs\u002Fexamples\u002Fblending-circles","A row of circles that grows and changes color, from two circles and Lerp.",{"title":154,"path":155,"stem":156,"order":27,"summary":157,"exact":10},"A whirl of squares","\u002Fdocs\u002Fexamples\u002Fwhirl-of-squares","docs\u002Fexamples\u002Fwhirl-of-squares","Squares that turn and shrink one step at a time, with Rotate and Scale.",{"title":159,"path":160,"stem":161,"order":33,"summary":162,"exact":10},"A hexagram from a circle","\u002Fdocs\u002Fexamples\u002Fhexagram","docs\u002Fexamples\u002Fhexagram","Two triangles made from points sampled on a circle, with Sample, Make Polygon and Rotate.",{"title":164,"path":165,"stem":166,"order":39,"summary":167,"exact":10},"Triangles on a grid","\u002Fdocs\u002Fexamples\u002Ftriangles-on-a-grid","docs\u002Fexamples\u002Ftriangles-on-a-grid","A triangle at every point of a grid, each turned a little more, with Orthogonal Grid, Map and a function made with New function…",{"title":169,"path":170,"stem":171,"order":45,"summary":172,"exact":10},"A glowing ball in a gradient frame","\u002Fdocs\u002Fexamples\u002Fgradients","docs\u002Fexamples\u002Fgradients","A ball filled with a radial gradient inside a square with a linear gradient outline, both from the same two color stops.",{"title":174,"path":175,"stem":176,"order":51,"summary":177,"exact":10},"Voronoi tessellation","\u002Fdocs\u002Fexamples\u002Fvoronoi","docs\u002Fexamples\u002Fvoronoi","Organic cell patterns from random points, evened out with Relax Points, and drawn with gaps using Scale and Map.",{"title":179,"path":180,"stem":181,"order":57,"summary":182,"exact":10},"Paper cut-out","\u002Fdocs\u002Fexamples\u002Fpaper-cut-out","docs\u002Fexamples\u002Fpaper-cut-out","Layered paper hills and a sun with wobbly edges, grain and soft shadows, made with the Displace, Noise and Drop Shadow effect nodes.",{"title":184,"path":185,"stem":186,"order":63,"summary":187,"exact":10},"Sierpinski triangle","\u002Fdocs\u002Fexamples\u002Fsierpinski-triangle","docs\u002Fexamples\u002Fsierpinski-triangle","A triangle made of three half-size triangles, each made the same way: a subgraph that calls itself, stopped by a Switch.",{"title":189,"path":190,"stem":191,"order":69,"summary":192,"exact":10},"Metaballs and contour lines","\u002Fdocs\u002Fexamples\u002Fmetaballs","docs\u002Fexamples\u002Fmetaballs","Gooey blobs from charges on a jittered grid, ringed by contour lines, with Zip Point Scalars, Metaballs and Isolines.",{"id":194,"title":189,"body":195,"description":675,"extension":676,"meta":677,"navigation":10,"order":69,"path":190,"seo":678,"stem":191,"summary":192,"__hash__":679},"docs\u002Fdocs\u002Fexamples\u002Fmetaballs.md",{"type":196,"value":197,"toc":664},"minimark",[198,211,216,219,224,229,238,250,267,293,313,361,382,389,393,422,442,456,462,465,469,486,512,519,525,528,532,562,566,616,620],[199,200,201,202,206,207,210],"p",{},"Metaballs are blobs that melt together when they get close, like drops of\noil on water. Each blob comes from a charge: a point with a radius. In this\nexample you'll scatter charges over a jittered grid, give them random\nradii, draw the blobs with ",[203,204,205],"strong",{},"Metaballs",", and surround them with contour\nlines from ",[203,208,209],{},"Isolines",", like the rings of a topographic map.",[212,213],"example-figure",{"alt":214,"example":215},"Gray blobs, some merged and some apart, each ringed by thin contour lines","metaballs",[199,217,218],{},"You'll use: Make BoundingBox, Orthogonal Grid, Jitter, Length, Range, Zip\nPoint Scalars, Page, Metaballs, Isolines, Output.",[220,221,223],"h2",{"id":222},"steps","Steps",[225,226,228],"h3",{"id":227},"_1-make-the-charges","1. Make the charges",[199,230,231,232,237],{},"A charge is a ",[233,234,236],"a",{"href":235},"\u002Fdocs\u002Ftypes\u002Fpoint-scalar","PointScalar",": a point and a\nnumber, here the blob's radius.",[199,239,240,241,244,245,249],{},"Add a ",[203,242,243],{},"Make BoundingBox"," node (",[246,247,248],"em",{},"Objects → BoundingBox → Make\nBoundingBox",") and set:",[251,252,253,261],"ul",{},[254,255,256,260],"li",{},[257,258,259],"code",{},"topLeft",": x 150, y 150;",[254,262,263,266],{},[257,264,265],{},"bottomRight",": x 850, y 650.",[199,268,269,270,244,273,276,277,280,281,284,285,288,289,292],{},"Add an ",[203,271,272],{},"Orthogonal Grid",[246,274,275],{},"Lattice → Orthogonal Grid","), connect the\nbox's ",[257,278,279],{},"object"," to its ",[257,282,283],{},"area",", and set its ",[257,286,287],{},"x"," spacing to 175 and its ",[257,290,291],{},"y","\nspacing to 125. That's 25 points, five rows of five.",[199,294,240,295,244,298,301,302,305,306,308,309,312],{},[203,296,297],{},"Jitter",[246,299,300],{},"Math → Jitter","), connect the grid's ",[257,303,304],{},"points"," to its\n",[257,307,279],{},", and set ",[257,310,311],{},"amount"," to 45: every point moves up to 45 units in a\nrandom direction.",[199,314,315,316,244,319,322,323,280,325,328,329,244,332,335,336,280,339,308,342,345,346,349,350,352,353,280,355,357,358,360],{},"Now the radii, one per point. Add a ",[203,317,318],{},"Length",[246,320,321],{},"Array → Length",") and\nconnect the grid's ",[257,324,304],{},[257,326,327],{},"array",". Add a ",[203,330,331],{},"Range",[246,333,334],{},"Array →\nRange","), connect Length's ",[257,337,338],{},"length",[257,340,341],{},"count",[257,343,344],{},"start"," to 55\nand ",[257,347,348],{},"step"," to 0: 25 radii of 55. Add a second ",[203,351,297],{}," node, connect\nRange's ",[257,354,327],{},[257,356,279],{}," and set ",[257,359,311],{}," to 20, so the radii vary\nfrom 35 to 75.",[199,362,240,363,244,366,369,370,280,372,374,375,377,378,381],{},[203,364,365],{},"Zip Point Scalars",[246,367,368],{},"Field → Zip Point Scalars","). Connect the\nfirst Jitter's ",[257,371,279],{},[257,373,304],{}," and the second Jitter's ",[257,376,279],{}," to\nits ",[257,379,380],{},"values",".",[199,383,384],{},[385,386],"img",{"alt":387,"src":388},"The charge nodes: Make BoundingBox, Orthogonal Grid, two Jitter nodes, Length, Range and Zip Point Scalars","\u002Fdocs\u002Fexamples\u002Fmetaballs-charges.png",[225,390,392],{"id":391},"_2-draw-the-blobs","2. Draw the blobs",[199,394,240,395,244,398,401,402,244,404,407,408,411,412,415,416,280,419,421],{},[203,396,397],{},"Page",[246,399,400],{},"Core → Page",") and a ",[203,403,205],{},[246,405,406],{},"Field →\nMetaballs","). Connect Zip Point Scalars' ",[257,409,410],{},"pointScalars"," to Metaballs'\n",[257,413,414],{},"charges"," and Page's ",[257,417,418],{},"bounds",[257,420,418],{},". Then:",[251,423,424,435],{},[254,425,426,427,430,431,434],{},"set ",[257,428,429],{},"falloff"," to ",[203,432,433],{},"wyvill",", so each charge's pull stops at twice its\nradius and the blobs stay round until they meet;",[254,436,437,438,441],{},"turn ",[257,439,440],{},"smooth"," on, for curves instead of the grid's straight segments.",[199,443,444,445,448,449,452,453,381],{},"Connect Metaballs' ",[257,446,447],{},"shapes"," to the ",[203,450,451],{},"Output"," node's ",[257,454,455],{},"objects",[199,457,458],{},[385,459],{"alt":460,"src":461},"Metaballs drawing gray blobs from the charges","\u002Fdocs\u002Fexamples\u002Fmetaballs-blobs.png",[199,463,464],{},"Charges close together have merged into long blobs, lone ones stay\ncircles. Your blobs will differ: the Jitter nodes have their own random\nseeds (change them in the inspector to try other layouts).",[225,466,468],{"id":467},"_3-add-contour-lines","3. Add contour lines",[199,470,269,471,244,473,476,477,280,479,415,481,280,483,485],{},[203,472,209],{},[246,474,475],{},"Field → Isolines","). Connect the same\n",[257,478,410],{},[257,480,414],{},[257,482,418],{},[257,484,418],{},", then\nset:",[251,487,488,501],{},[254,489,490,492,493,496,497,500],{},[257,491,341],{}," 4, ",[257,494,495],{},"min"," 0.15, ",[257,498,499],{},"max"," 0.75: four levels, all below the blobs'\nlevel of 1, so the lines ring the blobs from outside;",[254,502,503,505,506,508,509,511],{},[257,504,429],{}," ",[203,507,433],{}," and ",[257,510,440],{}," on, as for Metaballs.",[199,513,514,515,518],{},"Connect Isolines' ",[257,516,517],{},"lines"," to a new slot of the Output node.",[199,520,521],{},[385,522],{"alt":523,"src":524},"The complete graph with Isolines added","\u002Fdocs\u002Fexamples\u002Fmetaballs-graph.png",[199,526,527],{},"The result is the picture at the top.",[220,529,531],{"id":530},"how-it-works","How it works",[251,533,534,544,550,556],{},[254,535,536,539,540,543],{},[203,537,538],{},"A field of charges."," Every charge spreads an influence around it that\nfades with distance; where charges are close, their influences add up.\nMetaballs outlines the region where the total reaches ",[257,541,542],{},"threshold"," (1),\nwhich for a lone charge is a circle of its radius.",[254,545,546,549],{},[203,547,548],{},"Melting together."," Between two nearby charges the influences add, so\nthe total stays above 1 across the gap and the two circles join with a\nsmooth neck.",[254,551,552,555],{},[203,553,554],{},"Contour lines."," Isolines draws the same field at other levels. Lower\nlevels lie further out, so the rings at 0.15 are the outermost; where two\nblobs are close their rings merge before the blobs do.",[254,557,558,561],{},[203,559,560],{},"Why Zip Point Scalars."," Keeping each radius with its point means the\ntwo can never get out of step, whatever happens to the list later.",[220,563,565],{"id":564},"nodes-used","Nodes used",[251,567,568,574,579,584,592,597,602,611],{},[254,569,570,573],{},[233,571,243],{"href":572},"\u002Fdocs\u002Ftypes\u002Fbounding-box",", on its type's page.",[254,575,576,381],{},[233,577,272],{"href":578},"\u002Fdocs\u002Fnodes\u002Flattice\u002Forthogonal",[254,580,581,381],{},[233,582,297],{"href":583},"\u002Fdocs\u002Fnodes\u002Fmath\u002Fjitter",[254,585,586,508,589,381],{},[233,587,318],{"href":588},"\u002Fdocs\u002Fnodes\u002Farray\u002Flength",[233,590,331],{"href":591},"\u002Fdocs\u002Fnodes\u002Farray\u002Frange",[254,593,594,381],{},[233,595,365],{"href":596},"\u002Fdocs\u002Fnodes\u002Ffield\u002Fzip-point-scalars",[254,598,599,381],{},[233,600,397],{"href":601},"\u002Fdocs\u002Fnodes\u002Fcore\u002Fpage",[254,603,604,607,608,381],{},[233,605,205],{"href":606},"\u002Fdocs\u002Fnodes\u002Ffield\u002Fmetaballs"," and\n",[233,609,209],{"href":610},"\u002Fdocs\u002Fnodes\u002Ffield\u002Fisolines",[254,612,613,381],{},[233,614,451],{"href":615},"\u002Fdocs\u002Fnodes\u002Fcore\u002Foutput",[220,617,619],{"id":618},"variations","Variations",[251,621,622,634,643,649],{},[254,623,624,627,628,630,631,633],{},[203,625,626],{},"Inverse-square."," Set both nodes' ",[257,629,429],{}," to inverse-square: every\ncharge now pulls on every other, so with this many charges the blobs\nmelt into one big puddle. Lower the radii (Range's ",[257,632,344],{},") to separate\nthem again.",[254,635,636,639,640,642],{},[203,637,638],{},"Threshold."," Raise Metaballs' ",[257,641,542],{}," to 1.5 to shrink the blobs\nand break up the merged ones, or lower it to 0.7 to merge more.",[254,644,645,648],{},[203,646,647],{},"Holes."," Give one charge a negative radius (for example a Make\nPointScalar with value −40, added to the list with Push): it pushes the\nblobs away, denting them or cutting a hole.",[254,650,651,654,655,657,658,660,661,663],{},[203,652,653],{},"Contour lines alone."," Remove Metaballs and set Isolines' ",[257,656,495],{}," to 0.2\nand ",[257,659,499],{}," to 3 with ",[257,662,341],{}," 10: the lines then also run inside the blobs,\nlike a map of hills.",{"title":665,"searchDepth":27,"depth":27,"links":666},"",[667,672,673,674],{"id":222,"depth":27,"text":223,"children":668},[669,670,671],{"id":227,"depth":33,"text":228},{"id":391,"depth":33,"text":392},{"id":467,"depth":33,"text":468},{"id":530,"depth":27,"text":531},{"id":564,"depth":27,"text":565},{"id":618,"depth":27,"text":619},"Metaballs are blobs that melt together when they get close, like drops of\noil on water. Each blob comes from a charge: a point with a radius. In this\nexample you'll scatter charges over a jittered grid, give them random\nradii, draw the blobs with Metaballs, and surround them with contour\nlines from Isolines, like the rings of a topographic map.","md",{},{"title":189,"description":675},"bAgfZ5rd2gbQ0SsMnXNdekiZ0px30jISTqqWCIbFwVI",1795082901896]