{
  "Uuid": "76b3244d-68b2-4151-85a4-418dfccae863",
  "IsCustomNode": false,
  "Description": "",
  "Name": "20261113-FridayThe13th-Fable5.2",
  "ElementResolver": {
    "ResolutionMap": {}
  },
  "Inputs": [],
  "Outputs": [],
  "Nodes": [
    {
      "ConcreteType": "PythonNodeModels.PythonNode, PythonNodeModels",
      "Code": "import clr\nimport math\nimport random\n\nclr.AddReference('ProtoGeometry')\nfrom Autodesk.DesignScript.Geometry import Point, Vector, Cuboid, Cylinder, Cone, Sphere, Polygon\n\nG = 0.5          # top of ground slab (slab spans Z 0..G)\n_tmp = []        # helper points to dispose at the end\n\n\ndef pt(x, y, z):\n    p = Point.ByCoordinates(float(x), float(y), float(z))\n    _tmp.append(p)\n    return p\n\n\ndef box(x0, y0, z0, x1, y1, z1):\n    return Cuboid.ByCorners(pt(min(x0, x1), min(y0, y1), min(z0, z1)),\n                            pt(max(x0, x1), max(y0, y1), max(z0, z1)))\n\n\ndef cyl(a, b, r):\n    return Cylinder.ByPointsRadius(pt(*a), pt(*b), float(r))\n\n\ndef cone(a, b, r0, r1=0.0):\n    if r1 > 0.0:\n        return Cone.ByPointsRadii(pt(*a), pt(*b), float(r0), float(r1))\n    return Cone.ByPointsRadius(pt(*a), pt(*b), float(r0))\n\n\ndef sph(c, r):\n    return Sphere.ByCenterPointRadius(pt(*c), float(r))\n\n\ndef dispose(o):\n    try:\n        if o is not None and hasattr(o, \"Dispose\"):\n            o.Dispose()\n    except Exception:\n        pass\n\n\n# 1. Ground + lake -----------------------------------------------------------\nLX, LY, LR = 10.0, 8.0, 12.0\nground = [box(-30, -30, 0, 30, 30, G), cyl((LX, LY, G), (LX, LY, G + 0.08), LR)]\n\n# 2. Cabin -------------------------------------------------------------------\ncabin = [\n    box(-20, -15, G, -10, -7, 4.5),                 # walls\n    box(-15.8, -7.0, G, -14.2, -6.85, 3.0),         # door\n    box(-18.8, -7.0, 2.0, -17.2, -6.9, 3.2),        # window\n    box(-12.8, -7.0, 2.0, -11.2, -6.9, 3.2),        # window\n    box(-16.4, -6.85, G, -13.6, -5.9, 0.8),         # porch step\n    box(-12.6, -13.6, 4.5, -11.4, -12.4, 8.6),      # chimney\n]\ntry:\n    prof = Polygon.ByPoints([pt(-20.6, -15.7, 4.5), pt(-20.6, -6.3, 4.5), pt(-20.6, -11.0, 7.6)])\n    xdir = Vector.XAxis()\n    cabin.append(prof.ExtrudeAsSolid(xdir, 11.2))\n    dispose(prof)\n    dispose(xdir)\nexcept Exception:\n    for i in range(6):                               # stepped-roof fallback\n        w = 4.7 * (1.0 - i / 6.0)\n        cabin.append(box(-20.6, -11 - w, 4.5 + i * 0.52, -9.4, -11 + w, 4.5 + (i + 1) * 0.52))\n\n# 3. Pine trees --------------------------------------------------------------\nrng = random.Random(13)\ntrees = []\nplaced = []\n\n\ndef blocked(x, y):\n    if math.hypot(x - LX, y - LY) < LR + 2.5:\n        return True                                  # lake\n    if -23 < x < -7 and -18 < y < -3:\n        return True                                  # cabin\n    if math.hypot(x + 6, y + 2) < 6:\n        return True                                  # campfire\n    if 11 < x < 29 and -29 < y < -11:\n        return True                                  # graveyard\n    if y > 22 and -13 < x < 7:\n        return True                                  # giant 13\n    if -7 < x < 8 and 5 < y < 11:\n        return True                                  # dock\n    if math.hypot(x + 24, y - 10) < 4:\n        return True                                  # dead tree\n    return any(math.hypot(x - a, y - b) < 3.2 for a, b in placed)\n\n\ntries = 0\nwhile len(placed) < 24 and tries < 600:\n    tries += 1\n    x, y = rng.uniform(-27, 27), rng.uniform(-27, 27)\n    if blocked(x, y):\n        continue\n    placed.append((x, y))\n    h = rng.uniform(6.0, 11.0)\n    s = h / 8.0\n    trees.append(cyl((x, y, G), (x, y, G + 0.3 * h), 0.3 * s))\n    for k in range(3):\n        zb = G + h * (0.2 + 0.25 * k)\n        trees.append(cone((x, y, zb), (x, y, zb + 0.45 * h), s * (1.9 - 0.45 * k)))\n\n# 4. Dead tree ---------------------------------------------------------------\ndead = [\n    cone((-24, 10, G), (-24, 10, G + 9), 0.6, 0.15),\n    cone((-24, 10, G + 4.0), (-20.8, 10.6, G + 7.0), 0.25, 0.06),\n    cone((-24, 10, G + 5.0), (-26.6, 8.6, G + 8.2), 0.22, 0.05),\n    cone((-24, 10, G + 6.2), (-23.2, 12.6, G + 9.0), 0.18, 0.05),\n    cone((-21.8, 10.4, G + 6.0), (-20.6, 9.2, G + 7.6), 0.1, 0.03),\n]\n\n# 5. Graveyard ---------------------------------------------------------------\ngraves = []\nidx = 0\nfor gx in (14, 18, 22, 26):\n    for gy in (-24, -19, -14):\n        graves.append(box(gx - 0.8, gy - 2.8, G, gx + 0.8, gy - 0.5, G + 0.15))   # mound\n        if idx % 3 == 1:                                                          # cross\n            graves.append(box(gx - 0.15, gy - 0.15, G, gx + 0.15, gy + 0.15, G + 2.2))\n            graves.append(box(gx - 0.7, gy - 0.15, G + 1.4, gx + 0.7, gy + 0.15, G + 1.7))\n        else:                                                                     # tombstone\n            graves.append(box(gx - 0.7, gy - 0.2, G, gx + 0.7, gy + 0.2, G + 1.4))\n            graves.append(cyl((gx, gy - 0.2, G + 1.4), (gx, gy + 0.2, G + 1.4), 0.7))\n        idx += 1\n# arm reaching out of a grave\ngraves.append(cyl((18, -20.6, G), (18.2, -20.4, G + 1.1), 0.12))\ngraves.append(sph((18.2, -20.4, G + 1.2), 0.18))\n\n# 6. Giant blood-dripping \"13\" -----------------------------------------------\ny0, y1, ym = 26.0, 27.2, 26.6\nthirteen = [\n    box(-9, y0, G, -7, y1, G + 12), box(-11, y0, G, -5, y1, G + 1.5),\n    box(-11, y0, G + 9, -9, y1, G + 10.5),\n    box(3.5, y0, G, 5, y1, G + 12), box(-2, y0, G + 10.5, 5, y1, G + 12),\n    box(0, y0, G + 5.25, 5, y1, G + 6.75), box(-2, y0, G, 5, y1, G + 1.5),\n]\nfor dx, zt, ln in ((-10, 9.0, 1.6), (-1.2, 10.5, 2.2), (0.6, 10.5, 1.2), (2.4, 10.5, 1.8),\n                   (0.8, 5.25, 1.5), (2.5, 5.25, 2.3)):\n    thirteen.append(cone((dx, ym, G + zt), (dx, ym, G + zt - ln), 0.3))\n\n# 7. Giant hockey mask floating over the lake --------------------------------\nCX, CY, CZ = 14.0, 12.0, 10.0\nmask = []\ntry:\n    s0 = Sphere.ByCenterPointRadius(pt(0, 0, 0), 1.0)\n    s1 = s0.Scale(3.0, 0.8, 3.8)\n    m = s1.Translate(CX, CY, CZ)\n    dispose(s0)\n    dispose(s1)\n    cutters = [box(CX - 4, CY, CZ - 5, CX + 4, CY + 2, CZ + 5)]\n    for ex in (-1.1, 1.1):\n        cutters.append(cyl((CX + ex, CY - 2, CZ + 0.7), (CX + ex, CY + 2, CZ + 0.7), 0.55))\n    for hx, hz in ((0, -1.2), (-0.7, -1.6), (0.7, -1.6), (0, -2.2), (-0.6, -2.7), (0.6, -2.7)):\n        cutters.append(cyl((CX + hx, CY - 2, CZ + hz), (CX + hx, CY + 2, CZ + hz), 0.16))\n    for c in cutters:\n        m2 = m.Difference(c)\n        dispose(m)\n        dispose(c)\n        m = m2\n    mask.append(m)\nexcept Exception:\n    mask = [cyl((CX, CY, CZ), (CX, CY - 0.5, CZ), 3.2)]\n    for ex in (-1.1, 1.1):\n        mask.append(cyl((CX + ex, CY - 0.7, CZ + 0.7), (CX + ex, CY, CZ + 0.7), 0.55))\nmask.append(cone((CX, CY - 0.72, CZ + 3.1), (CX, CY - 0.72, CZ + 1.7), 0.3))     # red chevron\n\n# 8. Dock + Jason ------------------------------------------------------------\ndock = [box(-4, 7, 1.1, 6, 9, 1.3)]\nfor px in (-3, 0, 3, 5.8):\n    for py in (7.1, 8.9):\n        dock.append(cyl((px, py, G), (px, py, 1.7), 0.13))\nD = 1.3\ndock.extend([\n    box(4.8, 7.55, D, 5.2, 7.95, D + 1.6), box(4.8, 8.05, D, 5.2, 8.45, D + 1.6),   # legs\n    box(4.7, 7.45, D + 1.6, 5.3, 8.55, D + 3.2),                                    # torso\n    sph((5, 8, D + 3.65), 0.42),                                                    # head\n    cyl((4.7, 8, D + 3.65), (4.52, 8, D + 3.65), 0.36),                             # mask\n    cyl((5, 7.3, D + 3.1), (5, 7.15, D + 1.7), 0.16),                               # arm down\n    cyl((5, 8.7, D + 3.1), (4.6, 9.2, D + 4.1), 0.16),                              # arm raised\n    cyl((4.6, 9.2, D + 4.0), (4.6, 9.2, D + 4.5), 0.08),                            # handle\n    box(4.57, 9.08, D + 4.5, 4.63, 9.36, D + 6.3),                                  # machete blade\n])\n\n# 9. Campfire ----------------------------------------------------------------\nFX, FY = -6.0, -2.0\nfire = []\nfor i in range(8):\n    a = i * math.pi / 4.0\n    fire.append(sph((FX + 1.3 * math.cos(a), FY + 1.3 * math.sin(a), G + 0.2), 0.3))\nfor i in range(4):\n    a = i * math.pi / 2.0 + 0.4\n    fire.append(cyl((FX + 0.9 * math.cos(a), FY + 0.9 * math.sin(a), G + 0.1), (FX, FY, G + 1.2), 0.12))\nfire.append(cone((FX, FY, G + 0.2), (FX, FY, G + 2.6), 0.6))\nfire.append(cone((FX + 0.3, FY - 0.2, G + 0.2), (FX + 0.5, FY - 0.3, G + 1.7), 0.35))\nfire.append(cone((FX - 0.3, FY + 0.2, G + 0.2), (FX - 0.5, FY + 0.4, G + 1.9), 0.35))\nfire.append(cyl((FX - 3.2, FY - 1.5, G + 0.35), (FX - 3.2, FY + 1.5, G + 0.35), 0.35))   # log seat\nfire.append(cyl((FX - 1.5, FY + 3.2, G + 0.35), (FX + 1.5, FY + 3.2, G + 0.35), 0.35))   # log seat\n\n# 10. Moon + bats ------------------------------------------------------------\nsky = [sph((-18, 24, 27), 3.5)]\nfor bx, by, bz in ((-12, 20, 22), (-22, 16, 19), (-6, 22, 25), (2, 14, 18), (-15, 8, 16), (20, 20, 21)):\n    sky.append(sph((bx, by, bz), 0.3))\n    sky.append(cone((bx, by, bz), (bx + 1.5, by, bz + 0.4), 0.35))\n    sky.append(cone((bx, by, bz), (bx - 1.5, by, bz + 0.4), 0.35))\n\ngroups = [ground, cabin, trees, dead, graves, thirteen, mask, dock, fire, sky]\n\n# Guarantee everything is at Z >= 0 ------------------------------------------\nmin_z = 0.0\ntry:\n    for grp in groups:\n        for s in grp:\n            bb = s.BoundingBox\n            z = bb.MinPoint.Z\n            if z < min_z:\n                min_z = z\nexcept Exception:\n    min_z = 0.0   # geometry is constructed above Z=0 by design\nif min_z < -1e-6:\n    lifted = []\n    for grp in groups:\n        new_grp = [s.Translate(0.0, 0.0, -min_z) for s in grp]\n        for s in grp:\n            dispose(s)\n        lifted.append(new_grp)\n    groups = lifted\n\nfor t in _tmp:\n    dispose(t)\n\nOUT = groups\n",
      "Engine": "PythonNet3",
      "VariableInputPorts": true,
      "Id": "343d2f57025a4436936f8b1f92e905f9",
      "NodeType": "PythonScriptNode",
      "Inputs": [],
      "Outputs": [
        {
          "Id": "152d5521db904b01981bf7958672fb6d",
          "Name": "OUT",
          "Description": "Result of the python script",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        }
      ],
      "Replication": "Disabled",
      "Description": "Runs an embedded Python script."
    },
    {
      "ConcreteType": "PythonNodeModels.PythonNode, PythonNodeModels",
      "Code": "import clr\n\ntry:\n    clr.AddReference('GeometryColor')\n    from Modifiers import GeometryColor\nexcept Exception as ex:\n    raise ImportError(\"Could not load Modifiers.GeometryColor from GeometryColor.dll: {}\".format(ex))\n\ntry:\n    clr.AddReference('DSCoreNodes')\n    from DSCore import Color\nexcept Exception as ex:\n    raise ImportError(\"Could not load DSCore.Color from DSCoreNodes.dll: {}\".format(ex))\n\n\n# ----------------------------------------------------------------------------\n# Helpers\n# ----------------------------------------------------------------------------\ndef is_seq(x):\n    if x is None or isinstance(x, (str, bytes)):\n        return False\n    if isinstance(x, (list, tuple)):\n        return True\n    if hasattr(x, 'ContextCoordinateSystem') or hasattr(x, 'BoundingBox'):\n        return False                      # a geometry object, not a collection\n    return hasattr(x, '__iter__')\n\n\ndef flatten(x, depth=0):\n    if depth > 20:\n        raise ValueError(\"Input nesting is deeper than 20 levels; cannot flatten.\")\n    if x is None:\n        return []\n    if is_seq(x):\n        out = []\n        for item in list(x):\n            out.extend(flatten(item, depth + 1))\n        return out\n    return [x]\n\n\ndef kind(o):\n    try:\n        return str(o.GetType().Name)\n    except Exception:\n        return type(o).__name__\n\n\n_color_cache = {}\n\n\ndef col(rgb):\n    key = tuple(int(max(0, min(255, c))) for c in rgb)\n    if key not in _color_cache:\n        _color_cache[key] = Color.ByARGB(255, key[0], key[1], key[2])\n    return _color_cache[key]\n\n\n# ----------------------------------------------------------------------------\n# Palette\n# ----------------------------------------------------------------------------\nGREY = (150, 150, 150)\nGRASS = (28, 58, 34)\nLAKE = (18, 38, 92)\nWALL = (112, 72, 42)\nDOOR = (48, 28, 14)\nWINDOW = (255, 215, 95)\nSTEP = (92, 62, 36)\nCHIMNEY = (120, 52, 42)\nROOF = (58, 24, 20)\nTRUNK = (85, 55, 30)\nPINES = [(18, 68, 34), (24, 84, 40), (34, 100, 50)]\nDEADWOOD = (72, 62, 54)\nSOIL = (62, 42, 26)\nSTONE = (152, 152, 158)\nZOMBIE = (140, 172, 120)\nBLOOD = (150, 0, 0)\nDRIP = (225, 10, 10)\nMASK_WHITE = (236, 230, 214)\nBLACK = (15, 15, 18)\nRED = (200, 20, 20)\nDECK = (122, 86, 50)\nPOST = (88, 60, 34)\nPANTS = (38, 40, 52)\nJACKET = (70, 80, 50)\nSKIN = (200, 170, 140)\nHANDLE = (40, 26, 16)\nSTEEL = (200, 206, 216)\nFIRE_STONE = (110, 110, 116)\nFIRE_LOG = (80, 50, 26)\nFLAME_A = (255, 120, 0)\nFLAME_B = (255, 205, 30)\nFLAME_C = (255, 55, 0)\nSEAT = (102, 66, 36)\nMOON = (246, 240, 200)\nBAT = (22, 20, 26)\n\n\n# ----------------------------------------------------------------------------\n# Color rules per group (gi = group index, i = item index, n = item count)\n# ----------------------------------------------------------------------------\ndef pick(gi, i, n, o):\n    k = kind(o)\n    if gi == 0:                                   # ground + lake\n        return GRASS if i == 0 else LAKE\n    if gi == 1:                                   # cabin\n        table = [WALL, DOOR, WINDOW, WINDOW, STEP, CHIMNEY]\n        return table[i] if i < len(table) else ROOF\n    if gi == 2:                                   # pine trees (trunk + 3 cones)\n        if k == 'Cylinder':\n            return TRUNK\n        if k == 'Cone':\n            return PINES[(i % 4 - 1) % 3]\n        return TRUNK if i % 4 == 0 else PINES[(i % 4 - 1) % 3]\n    if gi == 3:                                   # dead tree\n        return DEADWOOD\n    if gi == 4:                                   # graveyard\n        if i >= n - 2:\n            return ZOMBIE                         # arm reaching out\n        return SOIL if i % 3 == 0 else STONE\n    if gi == 5:                                   # giant 13\n        if k == 'Cone':\n            return DRIP\n        return BLOOD if (i < 7 or k == 'Cuboid') else DRIP\n    if gi == 6:                                   # hockey mask\n        if n > 1 and i == n - 1:\n            return RED                            # chevron\n        return MASK_WHITE if i == 0 else BLACK\n    if gi == 7:                                   # dock + Jason\n        if i == 0:\n            return DECK\n        if i <= 8:\n            return POST\n        table = {9: PANTS, 10: PANTS, 11: JACKET, 12: SKIN, 13: MASK_WHITE,\n                 14: JACKET, 15: JACKET, 16: HANDLE, 17: STEEL}\n        return table.get(i, GREY)\n    if gi == 8:                                   # campfire\n        if i < 8:\n            return FIRE_STONE\n        if i < 12:\n            return FIRE_LOG\n        table = {12: FLAME_A, 13: FLAME_B, 14: FLAME_C}\n        return table.get(i, SEAT)\n    if gi == 9:                                   # moon + bats\n        return MOON if i == 0 else BAT\n    return GREY\n\n\n# ----------------------------------------------------------------------------\n# Main\n# ----------------------------------------------------------------------------\nscene = IN[0] if (IN is not None and len(IN) > 0) else None\n\nif scene is None:\n    groups = []\nelif is_seq(scene):\n    top = list(scene)\n    if any(is_seq(g) for g in top):\n        groups = [(gi, flatten(g)) for gi, g in enumerate(top)]\n    else:\n        groups = [(-1, flatten(top))]             # flat list: neutral coloring\nelse:\n    groups = [(-1, [scene])]\n\nresult = []\nfor gi, items in groups:\n    n = len(items)\n    colored = []\n    for i, o in enumerate(items):\n        if o is None:\n            continue\n        try:\n            colored.append(GeometryColor.ByGeometryColor(o, col(pick(gi, i, n, o))))\n        except Exception as ex:\n            raise RuntimeError(\n                \"Failed to color item {} ({}) in group {}: {}\".format(i, kind(o), gi, ex))\n    result.append(colored)\n\nOUT = result\n",
      "Engine": "PythonNet3",
      "VariableInputPorts": true,
      "Id": "9062ff81ebb243b58b10248873a1b5fc",
      "NodeType": "PythonScriptNode",
      "Inputs": [
        {
          "Id": "edf380a2ef8a4ecfb0689fa7fd5334db",
          "Name": "IN[0]",
          "Description": "Input #0",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        }
      ],
      "Outputs": [
        {
          "Id": "e783134ede5d421588eab2fb0acb43e5",
          "Name": "OUT",
          "Description": "Result of the python script",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        }
      ],
      "Replication": "Disabled",
      "Description": "Runs an embedded Python script."
    }
  ],
  "Connectors": [
    {
      "Start": "152d5521db904b01981bf7958672fb6d",
      "End": "edf380a2ef8a4ecfb0689fa7fd5334db",
      "Id": "0170b70ef5bf4699a916818a5f143a11",
      "IsHidden": "False"
    }
  ],
  "Dependencies": [],
  "NodeLibraryDependencies": [],
  "EnableLegacyPolyCurveBehavior": false,
  "Thumbnail": "",
  "GraphDocumentationURL": null,
  "ExtensionWorkspaceData": [
    {
      "ExtensionGuid": "5b1f6c8e-7f2a-4d4e-9c1b-726f746f7201",
      "Name": "DynamoNext",
      "Version": "1.0",
      "Data": {
        "dynamonext": "{\"grafts\":{\"343d2f57025a4436936f8b1f92e905f9\":{\"prompt\":\"Create another really cool friday the 13th scene with 3d geometry. All geometry up in z\",\"model\":\"claude-fable-5-2\",\"codeHash\":\"059258037fda02e4b3b01a8310d54b3c12544bd2d0eadd072508d43ab71cdd63\",\"host\":\"Sandbox\",\"hostVersion\":\"4.2.1.5887\",\"dynamoVersion\":\"4.2.1.5887\",\"createdAt\":\"2026-11-13T16:41:35.519Z\",\"pythonEngine\":\"PythonNet3\",\"mode\":\"loop\",\"dryRun\":{\"status\":\"succeeded\",\"diff\":{\"created\":0,\"modified\":0,\"deleted\":0}},\"acceptedAt\":\"2026-11-13T16:42:20.531Z\"},\"9062ff81ebb243b58b10248873a1b5fc\":{\"prompt\":\"redo this with color geometry\\nimport clr\\nimport math\\nimport random\\n\\nclr.AddReference('ProtoGeometry')\\nfrom Autodesk.DesignScript.Geometry import Point, Vector, Cuboid, Cylinder, Cone, Sphere, Polygon\\n\\nG = 0.5          # top of ground slab (slab spans Z 0..G)\\n_tmp = []        # helper points to dispose at the end\\n\\n\\ndef pt(x, y, z):\\n    p = Point.ByCoordinates(float(x), float(y), float(z))\\n    _tmp.append(p)\\n    return p\\n\\n\\ndef box(x0, y0, z0, x1, y1, z1):\\n    return Cuboid.ByCorners(pt(min(x0, x1), min(y0, y1), min(z0, z1)),\\n                            pt(max(x0, x1), max(y0, y1), max(z0, z1)))\\n\\n\\ndef cyl(a, b, r):\\n    return Cylinder.ByPointsRadius(pt(*a), pt(*b), float(r))\\n\\n\\ndef cone(a, b, r0, r1=0.0):\\n    if r1 > 0.0:\\n        return Cone.ByPointsRadii(pt(*a), pt(*b), float(r0), float(r1))\\n    return Cone.ByPointsRadius(pt(*a), pt(*b), float(r0))\\n\\n\\ndef sph(c, r):\\n    return Sphere.ByCenterPointRadius(pt(*c), float(r))\\n\\n\\ndef dispose(o):\\n    try:\\n        if o is not None and hasattr(o, \\\"Dispose\\\"):\\n            o.Dispose()\\n    except Exception:\\n        pass\\n\\n\\n# 1. Ground + lake -----------------------------------------------------------\\nLX, LY, LR = 10.0, 8.0, 12.0\\nground = [box(-30, -30, 0, 30, 30, G), cyl((LX, LY, G), (LX, LY, G + 0.08), LR)]\\n\\n# 2. Cabin -------------------------------------------------------------------\\ncabin = [\\n    box(-20, -15, G, -10, -7, 4.5),                 # walls\\n    box(-15.8, -7.0, G, -14.2, -6.85, 3.0),         # door\\n    box(-18.8, -7.0, 2.0, -17.2, -6.9, 3.2),        # window\\n    box(-12.8, -7.0, 2.0, -11.2, -6.9, 3.2),        # window\\n    box(-16.4, -6.85, G, -13.6, -5.9, 0.8),         # porch step\\n    box(-12.6, -13.6, 4.5, -11.4, -12.4, 8.6),      # chimney\\n]\\ntry:\\n    prof = Polygon.ByPoints([pt(-20.6, -15.7, 4.5), pt(-20.6, -6.3, 4.5), pt(-20.6, -11.0, 7.6)])\\n    xdir = Vector.XAxis()\\n    cabin.append(prof.ExtrudeAsSolid(xdir, 11.2))\\n    dispose(prof)\\n    dispose(xdir)\\nexcept Exception:\\n    for i in range(6):                               # stepped-roof fallback\\n        w = 4.7 * (1.0 - i / 6.0)\\n        cabin.append(box(-20.6, -11 - w, 4.5 + i * 0.52, -9.4, -11 + w, 4.5 + (i + 1) * 0.52))\\n\\n# 3. Pine trees --------------------------------------------------------------\\nrng = random.Random(13)\\ntrees = []\\nplaced = []\\n\\n\\ndef blocked(x, y):\\n    if math.hypot(x - LX, y - LY) < LR + 2.5:\\n        return True                                  # lake\\n    if -23 < x < -7 and -18 < y < -3:\\n        return True                                  # cabin\\n    if math.hypot(x + 6, y + 2) < 6:\\n        return True                                  # campfire\\n    if 11 < x < 29 and -29 < y < -11:\\n        return True                                  # graveyard\\n    if y > 22 and -13 < x < 7:\\n        return True                                  # giant 13\\n    if -7 < x < 8 and 5 < y < 11:\\n        return True                                  # dock\\n    if math.hypot(x + 24, y - 10) < 4:\\n        return True                                  # dead tree\\n    return any(math.hypot(x - a, y - b) < 3.2 for a, b in placed)\\n\\n\\ntries = 0\\nwhile len(placed) < 24 and tries < 600:\\n    tries += 1\\n    x, y = rng.uniform(-27, 27), rng.uniform(-27, 27)\\n    if blocked(x, y):\\n        continue\\n    placed.append((x, y))\\n    h = rng.uniform(6.0, 11.0)\\n    s = h / 8.0\\n    trees.append(cyl((x, y, G), (x, y, G + 0.3 * h), 0.3 * s))\\n    for k in range(3):\\n        zb = G + h * (0.2 + 0.25 * k)\\n        trees.append(cone((x, y, zb), (x, y, zb + 0.45 * h), s * (1.9 - 0.45 * k)))\\n\\n# 4. Dead tree ---------------------------------------------------------------\\ndead = [\\n    cone((-24, 10, G), (-24, 10, G + 9), 0.6, 0.15),\\n    cone((-24, 10, G + 4.0), (-20.8, 10.6, G + 7.0), 0.25, 0.06),\\n    cone((-24, 10, G + 5.0), (-26.6, 8.6, G + 8.2), 0.22, 0.05),\\n    cone((-24, 10, G + 6.2), (-23.2, 12.6, G + 9.0), 0.18, 0.05),\\n    cone((-21.8, 10.4, G + 6.0), (-20.6, 9.2, G + 7.6), 0.1, 0.03),\\n]\\n\\n# 5. Graveyard ---------------------------------------------------------------\\ngraves = []\\nidx = 0\\nfor gx in (14, 18, 22, 26):\\n    for gy in (-24, -19, -14):\\n        graves.append(box(gx - 0.8, gy - 2.8, G, gx + 0.8, gy - 0.5, G + 0.15))   # mound\\n        if idx % 3 == 1:                                                          # cross\\n            graves.append(box(gx - 0.15, gy - 0.15, G, gx + 0.15, gy + 0.15, G + 2.2))\\n            graves.append(box(gx - 0.7, gy - 0.15, G + 1.4, gx + 0.7, gy + 0.15, G + 1.7))\\n        else:                                                                     # tombstone\\n            graves.append(box(gx - 0.7, gy - 0.2, G, gx + 0.7, gy + 0.2, G + 1.4))\\n            graves.append(cyl((gx, gy - 0.2, G + 1.4), (gx, gy + 0.2, G + 1.4), 0.7))\\n        idx += 1\\n# arm reaching out of a grave\\ngraves.append(cyl((18, -20.6, G), (18.2, -20.4, G + 1.1), 0.12))\\ngraves.append(sph((18.2, -20.4, G + 1.2), 0.18))\\n\\n# 6. Giant blood-dripping \\\"13\\\" -----------------------------------------------\\ny0, y1, ym = 26.0, 27.2, 26.6\\nthirteen = [\\n    box(-9, y0, G, -7, y1, G + 12), box(-11, y0, G, -5, y1, G + 1.5),\\n    box(-11, y0, G + 9, -9, y1, G + 10.5),\\n    box(3.5, y0, G, 5, y1, G + 12), box(-2, y0, G + 10.5, 5, y1, G + 12),\\n    box(0, y0, G + 5.25, 5, y1, G + 6.75), box(-2, y0, G, 5, y1, G + 1.5),\\n]\\nfor dx, zt, ln in ((-10, 9.0, 1.6), (-1.2, 10.5, 2.2), (0.6, 10.5, 1.2), (2.4, 10.5, 1.8),\\n                   (0.8, 5.25, 1.5), (2.5, 5.25, 2.3)):\\n    thirteen.append(cone((dx, ym, G + zt), (dx, ym, G + zt - ln), 0.3))\\n\\n# 7. Giant hockey mask floating over the lake --------------------------------\\nCX, CY, CZ = 14.0, 12.0, 10.0\\nmask = []\\ntry:\\n    s0 = Sphere.ByCenterPointRadius(pt(0, 0, 0), 1.0)\\n    s1 = s0.Scale(3.0, 0.8, 3.8)\\n    m = s1.Translate(CX, CY, CZ)\\n    dispose(s0)\\n    dispose(s1)\\n    cutters = [box(CX - 4, CY, CZ - 5, CX + 4, CY + 2, CZ + 5)]\\n    for ex in (-1.1, 1.1):\\n        cutters.append(cyl((CX + ex, CY - 2, CZ + 0.7), (CX + ex, CY + 2, CZ + 0.7), 0.55))\\n    for hx, hz in ((0, -1.2), (-0.7, -1.6), (0.7, -1.6), (0, -2.2), (-0.6, -2.7), (0.6, -2.7)):\\n        cutters.append(cyl((CX + hx, CY - 2, CZ + hz), (CX + hx, CY + 2, CZ + hz), 0.16))\\n    for c in cutters:\\n        m2 = m.Difference(c)\\n        dispose(m)\\n        dispose(c)\\n        m = m2\\n    mask.append(m)\\nexcept Exception:\\n    mask = [cyl((CX, CY, CZ), (CX, CY - 0.5, CZ), 3.2)]\\n    for ex in (-1.1, 1.1):\\n        mask.append(cyl((CX + ex, CY - 0.7, CZ + 0.7), (CX + ex, CY, CZ + 0.7), 0.55))\\nmask.append(cone((CX, CY - 0.72, CZ + 3.1), (CX, CY - 0.72, CZ + 1.7), 0.3))     # red chevron\\n\\n# 8. Dock + Jason ------------------------------------------------------------\\ndock = [box(-4, 7, 1.1, 6, 9, 1.3)]\\nfor px in (-3, 0, 3, 5.8):\\n    for py in (7.1, 8.9):\\n        dock.append(cyl((px, py, G), (px, py, 1.7), 0.13))\\nD = 1.3\\ndock.extend([\\n    box(4.8, 7.55, D, 5.2, 7.95, D + 1.6), box(4.8, 8.05, D, 5.2, 8.45, D + 1.6),   # legs\\n    box(4.7, 7.45, D + 1.6, 5.3, 8.55, D + 3.2),                                    # torso\\n    sph((5, 8, D + 3.65), 0.42),                                                    # head\\n    cyl((4.7, 8, D + 3.65), (4.52, 8, D + 3.65), 0.36),                             # mask\\n    cyl((5, 7.3, D + 3.1), (5, 7.15, D + 1.7), 0.16),                               # arm down\\n    cyl((5, 8.7, D + 3.1), (4.6, 9.2, D + 4.1), 0.16),                              # arm raised\\n    cyl((4.6, 9.2, D + 4.0), (4.6, 9.2, D + 4.5), 0.08),                            # handle\\n    box(4.57, 9.08, D + 4.5, 4.63, 9.36, D + 6.3),                                  # machete blade\\n])\\n\\n# 9. Campfire ----------------------------------------------------------------\\nFX, FY = -6.0, -2.0\\nfire = []\\nfor i in range(8):\\n    a = i * math.pi / 4.0\\n    fire.append(sph((FX + 1.3 * math.cos(a), FY + 1.3 * math.sin(a), G + 0.2), 0.3))\\nfor i in range(4):\\n    a = i * math.pi / 2.0 + 0.4\\n    fire.append(cyl((FX + 0.9 * math.cos(a), FY + 0.9 * math.sin(a), G + 0.1), (FX, FY, G + 1.2), 0.12))\\nfire.append(cone((FX, FY, G + 0.2), (FX, FY, G + 2.6), 0.6))\\nfire.append(cone((FX + 0.3, FY - 0.2, G + 0.2), (FX + 0.5, FY - 0.3, G + 1.7), 0.35))\\nfire.append(cone((FX - 0.3, FY + 0.2, G + 0.2), (FX - 0.5, FY + 0.4, G + 1.9), 0.35))\\nfire.append(cyl((FX - 3.2, FY - 1.5, G + 0.35), (FX - 3.2, FY + 1.5, G + 0.35), 0.35))   # log seat\\nfire.append(cyl((FX - 1.5, FY + 3.2, G + 0.35), (FX + 1.5, FY + 3.2, G + 0.35), 0.35))   # log seat\\n\\n# 10. Moon + bats ------------------------------------------------------------\\nsky = [sph((-18, 24, 27), 3.5)]\\nfor bx, by, bz in ((-12, 20, 22), (-22, 16, 19), (-6, 22, 25), (2, 14, 18), (-15, 8, 16), (20, 20, 21)):\\n    sky.append(sph((bx, by, bz), 0.3))\\n    sky.append(cone((bx, by, bz), (bx + 1.5, by, bz + 0.4), 0.35))\\n    sky.append(cone((bx, by, bz), (bx - 1.5, by, bz + 0.4), 0.35))\\n\\ngroups = [ground, cabin, trees, dead, graves, thirteen, mask, dock, fire, sky]\\n\\n# Guarantee everything is at Z >= 0 ------------------------------------------\\nmin_z = 0.0\\ntry:\\n    for grp in groups:\\n        for s in grp:\\n            bb = s.BoundingBox\\n            z = bb.MinPoint.Z\\n            if z < min_z:\\n                min_z = z\\nexcept Exception:\\n    min_z = 0.0   # geometry is constructed above Z=0 by design\\nif min_z < -1e-6:\\n    lifted = []\\n    for grp in groups:\\n        new_grp = [s.Translate(0.0, 0.0, -min_z) for s in grp]\\n        for s in grp:\\n            dispose(s)\\n        lifted.append(new_grp)\\n    groups = lifted\\n\\nfor t in _tmp:\\n    dispose(t)\\n\\nOUT = groups\",\"model\":\"claude-fable-5-2\",\"codeHash\":\"95aa8200629e12479ca5309c1d0d804018313dcbfa33e57490aae95e0b3f1177\",\"host\":\"Sandbox\",\"hostVersion\":\"4.2.1.5887\",\"dynamoVersion\":\"4.2.1.5887\",\"createdAt\":\"2026-11-13T16:46:44.453Z\",\"pythonEngine\":\"PythonNet3\",\"mode\":\"loop\",\"dryRun\":{\"status\":\"succeeded\",\"diff\":{\"created\":0,\"modified\":0,\"deleted\":0}},\"acceptedAt\":\"2026-11-13T16:46:47.964Z\"}},\"preview\":{\"camera\":{\"position\":[6.297,-62.211,15.967],\"target\":[-1.428,5.202,-6.889]}}}"
      }
    },
    {
      "ExtensionGuid": "28992e1d-abb9-417f-8b1b-05e053bee670",
      "Name": "Properties",
      "Version": "4.4",
      "Data": {}
    }
  ],
  "Author": "",
  "Linting": {
    "activeLinter": "None",
    "activeLinterId": "7b75fb44-43fd-4631-a878-29f4d5d8399a",
    "warningCount": 0,
    "errorCount": 0
  },
  "Bindings": [],
  "View": {
    "Dynamo": {
      "ScaleFactor": 1.0,
      "HasRunWithoutCrash": true,
      "IsVisibleInDynamoLibrary": true,
      "Version": "4.4.0.6801",
      "RunType": "Manual",
      "RunPeriod": "1000"
    },
    "Camera": {
      "Name": "_Background Preview",
      "EyeX": -9.614339828491211,
      "EyeY": 2.369194746017456,
      "EyeZ": 7.0628533363342285,
      "LookX": 4.595162391662598,
      "LookY": -0.19966864585876465,
      "LookZ": -12.167581558227539,
      "UpX": -0.07043693959712982,
      "UpY": 0.9799247980117798,
      "UpZ": 0.1865106225013733
    },
    "ConnectorPins": [],
    "NodeViews": [
      {
        "Id": "343d2f57025a4436936f8b1f92e905f9",
        "Name": "Friday The 13th Scene",
        "IsSetAsInput": false,
        "IsSetAsOutput": false,
        "Excluded": false,
        "ShowGeometry": false,
        "X": -121.0,
        "Y": 762.0
      },
      {
        "Id": "9062ff81ebb243b58b10248873a1b5fc",
        "Name": "Color Friday 13th Scene",
        "IsSetAsInput": false,
        "IsSetAsOutput": false,
        "Excluded": false,
        "ShowGeometry": true,
        "X": 301.0,
        "Y": 762.0
      }
    ],
    "Annotations": [],
    "X": 116.55731010485533,
    "Y": 67.45214705142087,
    "Zoom": 0.9100638039314388
  }
}