Skip to content

Instantly share code, notes, and snippets.

Created July 7, 2017 10:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/744c5d8e2f98866e45b58165a481845e to your computer and use it in GitHub Desktop.
Save anonymous/744c5d8e2f98866e45b58165a481845e to your computer and use it in GitHub Desktop.
to do later?
{
"export_version": "0.065",
"framed_nodes": {},
"groups": {},
"nodes": {
"Adaptive Polygons": {
"bl_idname": "AdaptivePolsNode",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
1156.9647216796875,
124.25773620605469
],
"params": {
"width_coef": 0.7599999904632568
},
"width": 140.0
},
"Centers polygons 2": {
"bl_idname": "CentersPolsNodeMK2",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
-171.88047790527344,
595.4683837890625
],
"params": {
"Separate": 1
},
"width": 140.0
},
"Circle": {
"bl_idname": "SvCircleNode",
"color": [
0.0,
0.5,
0.5
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
821.3358764648438,
-1.0856132507324219
],
"params": {
"vert_": 16
},
"width": 140.0
},
"Circle.001": {
"bl_idname": "SvCircleNode",
"color": [
0.0,
0.5,
0.5
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
1767.61572265625,
753.8043212890625
],
"params": {
"rad_": 0.07000000774860382,
"vert_": 16
},
"width": 140.0
},
"Fill Holes": {
"bl_idname": "SvFillsHoleNode",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
533.5509643554688,
322.78900146484375
],
"params": {
"sides": 9
},
"width": 140.0
},
"List Join": {
"bl_idname": "ListJoinNode",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
-84.21446228027344,
282.15875244140625
],
"params": {
"JoinLevel": 2
},
"width": 140.0
},
"List Join.001": {
"bl_idname": "ListJoinNode",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": true,
"label": "",
"location": [
1757.7855224609375,
458.7681579589844
],
"params": {
"JoinLevel": 2
},
"width": 140.0
},
"List Join.002": {
"bl_idname": "ListJoinNode",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": true,
"label": "",
"location": [
1760.2415771484375,
365.3277893066406
],
"params": {
"JoinLevel": 2
},
"width": 140.0
},
"List Split": {
"bl_idname": "SvListSplitNode",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
2380.009765625,
731.4000244140625
],
"params": {
"level": 0,
"level_unwrap": 3,
"split": 29,
"unwrap": 0
},
"width": 140.0
},
"Math": {
"bl_idname": "ScalarMathNode",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
527.078369140625,
96.71538543701172
],
"params": {
"items_": "MUL",
"y": 0.37000003457069397
},
"width": 140.0
},
"Matrix Apply": {
"bl_idname": "SvMatrixApplyJoinNode",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
2172.47705078125,
761.2711791992188
],
"params": {
"do_join": 0
},
"width": 140.0
},
"Matrix in": {
"bl_idname": "SvMatrixGenNodeMK2",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
1956.1412353515625,
549.9149169921875
],
"params": {},
"width": 140.0
},
"Plane MK2": {
"bl_idname": "SvPlaneNodeMK2",
"color": [
0.0,
0.5,
0.5
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
-417.2382507324219,
78.19261932373047
],
"params": {
"center": 1,
"numx": 5,
"numy": 5,
"stepx": 0.8199999928474426,
"stepy": 0.8199999928474426
},
"width": 140.0
},
"Plane MK2.001": {
"bl_idname": "SvPlaneNodeMK2",
"color": [
0.0,
0.5,
0.5
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
-393.1900939941406,
362.11962890625
],
"params": {
"center": 1,
"numx": 2,
"numy": 2,
"stepx": 2.7100000381469727,
"stepy": 2.7100000381469727
},
"width": 135.08795166015625
},
"Range Float": {
"bl_idname": "SvGenFloatRange",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
1322.1060791015625,
370.3446350097656
],
"params": {
"count_": 29,
"mode": "FRANGE_COUNT",
"stop_": 1.0
},
"width": 140.0
},
"Remove Doubles": {
"bl_idname": "SvRemoveDoublesNode",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
304.8023986816406,
220.3603515625
],
"params": {
"distance": 0.12099999934434891
},
"width": 140.0
},
"Scripted Node Lite": {
"bl_idname": "SvScriptNodeLite",
"color": [
0.0,
0.800000011920929,
0.949999988079071
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
49.32249069213867,
625.8564453125
],
"params": {
"float_list": [
0.0,
0.0,
1.6000001430511475,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
"inject_params": 0,
"injected_state": 0,
"int_list": [
0,
0,
0,
10,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"script_name": "random_verts_on_polygons.py",
"script_str": "\"\"\"\nin normals v .=[] .=0\nin coords v .=[] .=0\nin radius s .=0.4 .=2\nin num_tries s .=100 .=2\nout new_verts v\n\"\"\"\n\n# taken from http://stackoverflow.com/a/29354206/1243487\n# translated to python and modified for sverchok.\n\nfrom math import sqrt, cos, sin, pi as M_PI\nfrom random import uniform as rand\n\n\ndef crossp(u, v):\n w = [0, 0, 0]\n w[0] = (u[1] * v[2]) - (u[2] * v[1])\n w[1] = (u[2] * v[0]) - (u[0] * v[2])\n w[2] = (u[0] * v[1]) - (u[1] * v[0])\n return w # vec3\n\ndef dotp(u, v):\n return (u[0] * v[0]) + (u[1] * v[1]) + (u[2] * v[2]) # float\n\ndef norm2(u):\n return dotp(u, u) # float\n\ndef norm(u):\n return sqrt(norm2(u)) # float\n\ndef scale(u, s):\n return [u[0] * s, u[1] * s, u[2] * s] # vec3\n\ndef add(u, v):\n return [u[0] + v[0], u[1] + v[1], u[2] + v[2]] # vec3\n\ndef normalize(u):\n return scale(u, 1/norm(u)) # vec3\n\n\ndef random_on_plane(r, n, co):\n \"\"\"\n generates a random point on the plane ax + by + cz = d\n \"\"\"\n n = list(n)\n co = list(co)\n d = dotp(n, co)\n xorz = [1, 0, 0] if (n[0] == 0) else [0, 0, 1]\n w = crossp(n, xorz)\n\n theta = rand(0, 1) * 2 * M_PI\n k = normalize(n)\n w = add(scale(w, cos(theta)), \n scale(crossp(k, w), sin(theta)))\n\n if r == 0:\n w = scale(w, r/norm(w))\n else:\n rand_r = rand(0, 1) * r\n w = scale(w, rand_r/norm(w))\n\n if d != 0:\n t = scale(n, d / norm2(n)) # vec3\n w = add(w, t)\n\n return w\n\n\nnew_verts = []\nfor nlist, colist in zip(normals, coords):\n sublist = []\n for n, co in zip(nlist, colist):\n sublist.append([random_on_plane(radius, n, co) for _ in range(num_tries)])\n new_verts.append(sublist)\n\nnew_verts = new_verts[0]\n"
},
"snlite_ui": [],
"width": 140.0
},
"Stethoscope MK2": {
"bl_idname": "SvStethoscopeNodeMK2",
"color": [
0.5,
0.5,
1.0
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
504.7071533203125,
663.5508422851562
],
"params": {
"num_elements": 1,
"text_color": [
0.949999988079071,
0.949999988079071,
0.949999988079071
]
},
"width": 140.0
},
"Stethoscope MK2.001": {
"bl_idname": "SvStethoscopeNodeMK2",
"color": [
0.5,
0.5,
1.0
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
2652.78466796875,
552.4688720703125
],
"params": {
"num_elements": 10,
"selected_mode": "graphical",
"text_color": [
0.949999988079071,
0.949999988079071,
0.949999988079071
]
},
"width": 140.0
},
"UV Connection": {
"bl_idname": "LineConnectNodeMK2",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
1790.184326171875,
286.1861572265625
],
"params": {},
"width": 140.0
},
"UV Connection.001": {
"bl_idname": "LineConnectNodeMK2",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
2612.47705078125,
803.780029296875
],
"params": {
"cicl_check_U": 0,
"cicl_check_V": 1,
"cup_U": 0,
"cup_V": 0,
"dir_check": "V_dir",
"slice_check": 0
},
"width": 140.0
},
"Vector Interpolation mk3": {
"bl_idname": "SvInterpolationNodeMK3",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
1521.8209228515625,
336.7598876953125
],
"params": {
"is_cyclic": 1,
"mode": "SPL"
},
"width": 140.0
},
"Vector Noise MK2": {
"bl_idname": "SvNoiseNodeMK2",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
47.860931396484375,
-17.461017608642578
],
"params": {
"out_mode": "SCALAR"
},
"width": 140.0
},
"Vector Noise MK2.001": {
"bl_idname": "SvNoiseNodeMK2",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
-163.41961669921875,
-165.3025360107422
],
"params": {
"noise_type": "VORONOI_F3",
"out_mode": "VECTOR"
},
"width": 140.0
},
"Vector Rewire": {
"bl_idname": "SvVectorRewire",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
790.0538940429688,
217.50851440429688
],
"params": {
"selected_mode_from": "Scalar"
},
"width": 140.0
},
"Viewer Draw": {
"bl_idname": "ViewerNode2",
"color": [
1.0,
0.30000001192092896,
0.0
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
1121.9873046875,
381.652099609375
],
"params": {
"activate": 1,
"extended_matrix": 1,
"ngon_tessellate": 1
},
"width": 140.0
},
"Viewer Draw.001": {
"bl_idname": "ViewerNode2",
"color": [
1.0,
0.30000001192092896,
0.0
],
"height": 100.0,
"hide": true,
"label": "",
"location": [
-187.34246826171875,
359.5216064453125
],
"params": {
"activate": 0
},
"width": 140.0
},
"Viewer Draw.002": {
"bl_idname": "ViewerNode2",
"color": [
1.0,
0.30000001192092896,
0.0
],
"height": 100.0,
"hide": true,
"label": "",
"location": [
350.5284423828125,
298.0491638183594
],
"params": {
"activate": 1
},
"width": 140.0
},
"Viewer Draw.003": {
"bl_idname": "ViewerNode2",
"color": [
1.0,
0.30000001192092896,
0.0
],
"height": 100.0,
"hide": true,
"label": "",
"location": [
790.158203125,
295.59027099609375
],
"params": {
"activate": 0
},
"width": 140.0
},
"Viewer Draw.004": {
"bl_idname": "ViewerNode2",
"color": [
1.0,
0.30000001192092896,
0.0
],
"height": 100.0,
"hide": true,
"label": "",
"location": [
109.11259460449219,
-238.1287841796875
],
"params": {
"activate": 0
},
"width": 140.0
},
"Viewer Draw.005": {
"bl_idname": "ViewerNode2",
"color": [
1.0,
0.30000001192092896,
0.0
],
"height": 100.0,
"hide": true,
"label": "",
"location": [
344.95880126953125,
633.8925170898438
],
"params": {
"activate": 0
},
"width": 140.0
},
"Viewer Draw.006": {
"bl_idname": "ViewerNode2",
"color": [
1.0,
0.30000001192092896,
0.0
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
1366.2652587890625,
86.58106994628906
],
"params": {
"activate": 0,
"extended_matrix": 1,
"ngon_tessellate": 1
},
"width": 140.0
},
"Viewer Draw.007": {
"bl_idname": "ViewerNode2",
"color": [
1.0,
0.30000001192092896,
0.0
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
2101.1826171875,
278.8096618652344
],
"params": {
"activate": 1,
"display_faces": 0,
"extended_matrix": 1,
"ngon_tessellate": 1
},
"width": 140.0
},
"Viewer Draw.008": {
"bl_idname": "ViewerNode2",
"color": [
1.0,
0.30000001192092896,
0.0
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
2885.428466796875,
817.6563720703125
],
"params": {
"activate": 1,
"display_verts": 0,
"extended_matrix": 1,
"ngon_tessellate": 1
},
"width": 140.0
},
"Voronoi 2D": {
"bl_idname": "Voronoi2DNode",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
110.5907211303711,
299.64300537109375
],
"params": {
"clip": 0.0
},
"width": 140.0
}
},
"update_lists": [
[
"Plane MK2",
0,
"Vector Noise MK2",
0
],
[
"Vector Noise MK2",
0,
"Math",
0
],
[
"Plane MK2.001",
0,
"Centers polygons 2",
0
],
[
"Plane MK2.001",
2,
"Centers polygons 2",
1
],
[
"Centers polygons 2",
0,
"Scripted Node Lite",
0
],
[
"Plane MK2.001",
0,
"Scripted Node Lite",
1
],
[
"Plane MK2.001",
0,
"List Join",
0
],
[
"Scripted Node Lite",
0,
"List Join",
1
],
[
"List Join",
0,
"Voronoi 2D",
0
],
[
"Voronoi 2D",
0,
"Remove Doubles",
1
],
[
"Voronoi 2D",
1,
"Remove Doubles",
2
],
[
"Remove Doubles",
0,
"Fill Holes",
0
],
[
"Remove Doubles",
1,
"Fill Holes",
1
],
[
"Fill Holes",
0,
"Vector Rewire",
0
],
[
"Math",
0,
"Vector Rewire",
1
],
[
"Vector Rewire",
0,
"Adaptive Polygons",
0
],
[
"Fill Holes",
2,
"Adaptive Polygons",
1
],
[
"Circle",
0,
"Adaptive Polygons",
2
],
[
"Circle",
2,
"Adaptive Polygons",
3
],
[
"Adaptive Polygons",
0,
"Vector Interpolation mk3",
0
],
[
"Range Float",
0,
"Vector Interpolation mk3",
1
],
[
"Vector Interpolation mk3",
0,
"UV Connection",
0
],
[
"Vector Rewire",
0,
"Viewer Draw",
0
],
[
"Fill Holes",
2,
"Viewer Draw",
1
],
[
"Vector Interpolation mk3",
0,
"List Join.001",
0
],
[
"Vector Interpolation mk3",
1,
"List Join.002",
0
],
[
"List Join.001",
0,
"Matrix in",
0
],
[
"List Join.002",
0,
"Matrix in",
3
],
[
"Circle.001",
0,
"Matrix Apply",
0
],
[
"Circle.001",
1,
"Matrix Apply",
1
],
[
"Circle.001",
2,
"Matrix Apply",
2
],
[
"Matrix in",
0,
"Matrix Apply",
3
],
[
"Matrix Apply",
0,
"List Split",
0
],
[
"List Split",
0,
"UV Connection.001",
0
],
[
"UV Connection.001",
0,
"Viewer Draw.008",
0
],
[
"UV Connection.001",
1,
"Viewer Draw.008",
1
],
[
"Adaptive Polygons",
0,
"Viewer Draw.006",
0
],
[
"Adaptive Polygons",
1,
"Viewer Draw.006",
1
],
[
"Plane MK2",
0,
"Vector Noise MK2.001",
0
],
[
"Vector Noise MK2.001",
0,
"Viewer Draw.004",
0
],
[
"Scripted Node Lite",
0,
"Viewer Draw.005",
0
],
[
"Scripted Node Lite",
0,
"Stethoscope MK2",
0
],
[
"Plane MK2.001",
0,
"Viewer Draw.001",
0
],
[
"Plane MK2.001",
1,
"Viewer Draw.001",
1
],
[
"UV Connection",
0,
"Viewer Draw.007",
0
],
[
"UV Connection",
1,
"Viewer Draw.007",
1
],
[
"Fill Holes",
0,
"Viewer Draw.003",
0
],
[
"Fill Holes",
2,
"Viewer Draw.003",
1
],
[
"List Split",
0,
"Stethoscope MK2.001",
0
],
[
"Voronoi 2D",
0,
"Viewer Draw.002",
0
],
[
"Voronoi 2D",
1,
"Viewer Draw.002",
1
]
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment