{"nodes": {"Viewer Draw": {"location": [-41.229339599609375, 145.15884399414062], "height": 100.0, "color": [1.0, 0.30000001192092896, 0.0], "use_custom_color": true, "width": 140.0, "bl_idname": "ViewerNode2", "params": {}, "label": "", "hide": false}, "Scripted Node Lite": {"location": [-487.15740966796875, 119.06287384033203], "height": 100.0, "color": [0.0, 0.800000011920929, 0.949999988079071], "use_custom_color": true, "width": 140.0, "snlite_ui": [], "bl_idname": "SvScriptNodeLite", "params": {"int_list": [0, 0, 300, 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, "float_list": [1.0, 3.0, 0.0, 0.12999999523162842, 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], "script_name": "archimedes_spiral.py", "injected_state": 0, "script_str": "\"\"\"\nin arc         s  d=1.0   n=2\nin separation  s  d=3.0   n=2\nin num_points  s  d=300   n=2\nin scale       s  d=0.13  n=2\nout verts      v\n\"\"\"\n\nimport math\n\ndef spiral_points(scale, arc=1, separation=1):\n    \"\"\"\n    lifted directly from: \n    http://stackoverflow.com/a/27528612/1243487 \n    by user: liborm\n\n    generate points on an Archimedes' spiral\n    with `arc` giving the length of arc between two points\n    and `separation` giving the distance between consecutive \n    turnings\n    - approximate arc length with circle arc at given distance\n    - use a spiral equation r = b * phi\n    \"\"\"\n    def p2c(r, phi):\n        \"\"\"polar to cartesian\n        \"\"\"\n        return (scale * r * math.cos(phi), scale * r * math.sin(phi), 0)\n\n    # yield a point at origin\n    # not using the origin may give better results\n    yield (0, 0, 0) \n\n    # initialize the next point in the required distance\n    r = arc\n    b = separation / (2 * math.pi)\n    # find the first phi to satisfy distance of `arc` to the second point\n    phi = float(r) / b\n    while True:\n        yield p2c(r, phi)\n        # advance the variables\n        # calculate phi that will give desired arc length at current radius\n        # (approximating with circle)\n        phi += float(arc) / r\n        r = b * phi\n\n\npoint_gen = spiral_points(scale, arc, separation)\n\nverts = [[]]\npoint = verts[0].append\nfor i in range(num_points):\n    point(next(point_gen))\n"}, "label": "", "hide": false}, "UV Connection": {"location": [-261.2293395996094, 166.9054718017578], "height": 100.0, "width": 140.0, "bl_idname": "LineConnectNodeMK2", "params": {"polygons": "Edges", "slice_check": 0}, "label": "", "hide": false}}, "update_lists": [["Scripted Node Lite", 0, "UV Connection", 0], ["UV Connection", 0, "Viewer Draw", 0], ["UV Connection", 1, "Viewer Draw", 1]], "framed_nodes": {}, "groups": {}, "export_version": "0.072"}
