{
  "nbformat": 4,
  "nbformat_minor": 5,
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "name": "python",
      "version": "3.10.0"
    },
    "colab": {
      "provenance": [],
      "name": "ICHTB Coordinate Model — Intent Tensor Theory"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "# ICHTB Coordinate Model\n",
        "### Intent Tensor Theory — Imaginary Cube Hat-Trick Box\n",
        "\n",
        "**[intent-tensor-theory.com](https://intent-tensor-theory.com)**\n",
        "\n",
        "---\n",
        "\n",
        "The ICHTB is not a cube in space — it is the **recursive geometry lattice** from which space emerges.\n",
        "\n",
        "Its six faces are not labeled by coordinates but by **recursive collapse operators**.\n",
        "The center is not the real origin **0** but the imaginary scalar anchor **i₀ ∈ ℂ** — a recursion seed\n",
        "that has no location, only potential.\n",
        "\n",
        "| Face | Axis | Color | Collapse Role |\n",
        "|------|------|-------|---------------|\n",
        "| +X | Intent Forward | Dark Red | Outward collapse drive |\n",
        "| −X | Intent Reverse | Rose | Inward reflection |\n",
        "| +Y | Emergence Up | Dark Green | Structural lock |\n",
        "| −Y | Emergence Down | Light Green | Pre-structural permission |\n",
        "| +Z | Phase Forward | Dark Blue | Temporal progression |\n",
        "| −Z | Phase Reverse | Light Blue | Memory echo |\n",
        "\n",
        "Run the cell below to generate the interactive 3D model."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {},
      "source": [
        "# ── ICHTB 3D Interactive Model ──\n",
        "# Intent Tensor Theory — intent-tensor-theory.com\n",
        "\n",
        "import numpy as np\n",
        "import plotly.graph_objects as go\n",
        "\n",
        "SZ = 4  # Half-side length of the cube\n",
        "\n",
        "# ── Face definitions: 6 collapse operator faces ──\n",
        "faces = [\n",
        "    # (+X face) Intent Forward — Dark Red\n",
        "    dict(name='+X · Intent Forward',\n",
        "         x=[SZ, SZ, SZ, SZ], y=[-SZ, SZ, SZ, -SZ], z=[-SZ, -SZ, SZ, SZ],\n",
        "         color='rgba(127, 29, 29, 0.30)'),\n",
        "    # (-X face) Intent Reverse — Rose\n",
        "    dict(name='-X · Intent Reverse',\n",
        "         x=[-SZ, -SZ, -SZ, -SZ], y=[-SZ, SZ, SZ, -SZ], z=[-SZ, -SZ, SZ, SZ],\n",
        "         color='rgba(220, 138, 120, 0.30)'),\n",
        "    # (+Y face) Emergence Up — Dark Green\n",
        "    dict(name='+Y · Emergence Up',\n",
        "         x=[-SZ, SZ, SZ, -SZ], y=[SZ, SZ, SZ, SZ], z=[-SZ, -SZ, SZ, SZ],\n",
        "         color='rgba(22, 101, 52, 0.30)'),\n",
        "    # (-Y face) Emergence Down — Light Green\n",
        "    dict(name='-Y · Pre-Structural',\n",
        "         x=[-SZ, SZ, SZ, -SZ], y=[-SZ, -SZ, -SZ, -SZ], z=[-SZ, -SZ, SZ, SZ],\n",
        "         color='rgba(134, 239, 172, 0.30)'),\n",
        "    # (+Z face) Phase Forward — Dark Blue\n",
        "    dict(name='+Z · Phase Forward',\n",
        "         x=[-SZ, SZ, SZ, -SZ], y=[-SZ, -SZ, SZ, SZ], z=[SZ, SZ, SZ, SZ],\n",
        "         color='rgba(30, 58, 95, 0.30)'),\n",
        "    # (-Z face) Phase Reverse — Light Blue\n",
        "    dict(name='-Z · Memory Echo',\n",
        "         x=[-SZ, SZ, SZ, -SZ], y=[-SZ, -SZ, SZ, SZ], z=[-SZ, -SZ, -SZ, -SZ],\n",
        "         color='rgba(125, 211, 252, 0.30)'),\n",
        "]\n",
        "\n",
        "fig = go.Figure()\n",
        "\n",
        "# ── Draw each face as a filled mesh ──\n",
        "for f in faces:\n",
        "    fig.add_trace(go.Mesh3d(\n",
        "        x=f['x'], y=f['y'], z=f['z'],\n",
        "        i=[0, 0], j=[1, 2], k=[2, 3],\n",
        "        color=f['color'], opacity=0.35,\n",
        "        name=f['name'], showlegend=True,\n",
        "        flatshading=True,\n",
        "    ))\n",
        "\n",
        "# ── Cube boundary edges ──\n",
        "edges = []\n",
        "for s1 in [-SZ, SZ]:\n",
        "    for s2 in [-SZ, SZ]:\n",
        "        # Edges along X\n",
        "        edges.append(dict(x=[-SZ, SZ, None], y=[s1, s1, None], z=[s2, s2, None]))\n",
        "        # Edges along Y\n",
        "        edges.append(dict(x=[s1, s1, None], y=[-SZ, SZ, None], z=[s2, s2, None]))\n",
        "        # Edges along Z\n",
        "        edges.append(dict(x=[s1, s1, None], y=[s2, s2, None], z=[-SZ, SZ, None]))\n",
        "\n",
        "ex, ey, ez = [], [], []\n",
        "for e in edges:\n",
        "    ex += e['x']; ey += e['y']; ez += e['z']\n",
        "\n",
        "fig.add_trace(go.Scatter3d(\n",
        "    x=ex, y=ey, z=ez, mode='lines',\n",
        "    line=dict(color='#4f46e5', width=2),\n",
        "    name='Boundary', showlegend=True,\n",
        "))\n",
        "\n",
        "# ── Lattice grid ──\n",
        "lx, ly, lz = [], [], []\n",
        "rng = range(-SZ, SZ + 1)\n",
        "for a in rng:\n",
        "    for b in rng:\n",
        "        lx += [-SZ, SZ, None]; ly += [a, a, None]; lz += [b, b, None]\n",
        "        lx += [a, a, None]; ly += [-SZ, SZ, None]; lz += [b, b, None]\n",
        "        lx += [a, a, None]; ly += [b, b, None]; lz += [-SZ, SZ, None]\n",
        "\n",
        "fig.add_trace(go.Scatter3d(\n",
        "    x=lx, y=ly, z=lz, mode='lines',\n",
        "    line=dict(color='#94a3b8', width=0.5),\n",
        "    name='Lattice', showlegend=True, visible=True,\n",
        "))\n",
        "\n",
        "# ── Lattice nodes ──\n",
        "nx, ny, nz = [], [], []\n",
        "for x in rng:\n",
        "    for y in rng:\n",
        "        for z in rng:\n",
        "            nx.append(x); ny.append(y); nz.append(z)\n",
        "\n",
        "fig.add_trace(go.Scatter3d(\n",
        "    x=nx, y=ny, z=nz, mode='markers',\n",
        "    marker=dict(size=1.5, color='#94a3b8'),\n",
        "    name='Nodes', showlegend=True, visible='legendonly',\n",
        "))\n",
        "\n",
        "# ── Coordinate axes from origin ──\n",
        "axis_defs = [\n",
        "    dict(p=[SZ + 1, 0, 0], label='+X', color='#7f1d1d'),\n",
        "    dict(p=[-(SZ + 1), 0, 0], label='-X', color='#dc8a78'),\n",
        "    dict(p=[0, SZ + 1, 0], label='+Y', color='#166534'),\n",
        "    dict(p=[0, -(SZ + 1), 0], label='-Y', color='#86efac'),\n",
        "    dict(p=[0, 0, SZ + 1], label='+Z', color='#1e3a5f'),\n",
        "    dict(p=[0, 0, -(SZ + 1)], label='-Z', color='#7dd3fc'),\n",
        "]\n",
        "\n",
        "for a in axis_defs:\n",
        "    fig.add_trace(go.Scatter3d(\n",
        "        x=[0, a['p'][0]], y=[0, a['p'][1]], z=[0, a['p'][2]],\n",
        "        mode='lines+text',\n",
        "        line=dict(color='#b45309', width=3),\n",
        "        text=['', a['label']], textposition='top center',\n",
        "        textfont=dict(color=a['color'], size=14, family='Arial Black'),\n",
        "        showlegend=False,\n",
        "    ))\n",
        "\n",
        "# ── i₀ origin marker ──\n",
        "fig.add_trace(go.Scatter3d(\n",
        "    x=[0], y=[0], z=[0], mode='markers+text',\n",
        "    marker=dict(size=8, color='#b45309', symbol='diamond'),\n",
        "    text=['i₀'], textposition='bottom center',\n",
        "    textfont=dict(color='#b45309', size=16, family='Arial Black'),\n",
        "    name='i₀ Origin', showlegend=True,\n",
        "))\n",
        "\n",
        "# ── Layout ──\n",
        "fig.update_layout(\n",
        "    title=dict(\n",
        "        text='ICHTB — Imaginary Cube Hat-Trick Box',\n",
        "        font=dict(size=20, family='Georgia, serif'),\n",
        "        x=0.5,\n",
        "    ),\n",
        "    scene=dict(\n",
        "        xaxis=dict(title='X', range=[-SZ-2, SZ+2], backgroundcolor='#f2f1ef',\n",
        "                   gridcolor='#d1d5db', zerolinecolor='#b45309'),\n",
        "        yaxis=dict(title='Y', range=[-SZ-2, SZ+2], backgroundcolor='#f2f1ef',\n",
        "                   gridcolor='#d1d5db', zerolinecolor='#b45309'),\n",
        "        zaxis=dict(title='Z', range=[-SZ-2, SZ+2], backgroundcolor='#f2f1ef',\n",
        "                   gridcolor='#d1d5db', zerolinecolor='#b45309'),\n",
        "        bgcolor='#f2f1ef',\n",
        "        camera=dict(eye=dict(x=1.6, y=1.2, z=1.6)),\n",
        "        aspectmode='cube',\n",
        "    ),\n",
        "    paper_bgcolor='#f8f7f5',\n",
        "    plot_bgcolor='#f2f1ef',\n",
        "    legend=dict(\n",
        "        bgcolor='rgba(248,247,245,0.9)',\n",
        "        bordercolor='#4f46e5',\n",
        "        borderwidth=1,\n",
        "        font=dict(size=11),\n",
        "    ),\n",
        "    margin=dict(l=0, r=0, t=50, b=0),\n",
        "    width=900, height=700,\n",
        ")\n",
        "\n",
        "fig.show()"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "---\n",
        "\n",
        "## How to Read the Model\n",
        "\n",
        "**Drag** to rotate. **Scroll** to zoom. Click legend items to toggle layers.\n",
        "\n",
        "### The Origin: i₀\n",
        "\n",
        "The amber diamond at center is **i₀** — the imaginary scalar anchor. It is not a point in space.\n",
        "It is the recursion seed from which all six collapse directions emerge.\n",
        "\n",
        "### The Faces\n",
        "\n",
        "Each face is a **collapse operator boundary**:\n",
        "\n",
        "- **±X (Red axis)** — Intent polarity. +X drives collapse outward; −X reflects inward.\n",
        "- **±Y (Green axis)** — Emergence polarity. +Y locks structure; −Y holds pre-structural permission.\n",
        "- **±Z (Blue axis)** — Phase polarity. +Z progresses time; −Z echoes memory.\n",
        "\n",
        "### The Lattice\n",
        "\n",
        "The interior grid is the **recursive field substrate** — the discrete points where\n",
        "collapse can stabilize. Each node is a potential lock site. The lattice is not space;\n",
        "it is the **permission structure** from which space emerges.\n",
        "\n",
        "### Hat Counting\n",
        "\n",
        "Navigation within the ICHTB uses **hat heights** — discrete integer coordinates\n",
        "measured from face surfaces. A position like **(2, 3, 1)** means:\n",
        "2 hats from the X-face, 3 from the Y-face, 1 from the Z-face.\n",
        "This is not Cartesian geometry — it is a **measurement protocol** that preserves\n",
        "the discrete structure of recursive collapse.\n",
        "\n",
        "---\n",
        "\n",
        "### The Collapse Genesis Stack\n",
        "\n",
        "$$\\Phi \\rightarrow \\nabla\\Phi \\rightarrow \\nabla^2\\Phi \\rightarrow \\rho_q$$\n",
        "\n",
        "| Symbol | Role |\n",
        "|--------|------|\n",
        "| **Φ** | Scalar intent — latent permission |\n",
        "| **∇Φ** | Collapse gradient — direction of recursive flow |\n",
        "| **∇²Φ** | Curvature lock — where shells stabilize |\n",
        "| **ρ_q** | Emergent charge/mass — what the universe remembers |\n",
        "\n",
        "---\n",
        "\n",
        "*By Armstrong Knight / Sensei Intent Tensor*  \n",
        "*[intent-tensor-theory.com](https://intent-tensor-theory.com)*"
      ]
    }
  ]
}