{
  "schemaVersion": 1,
  "id": "boy-surface",
  "version": "1.0.0",
  "status": "published",
  "kind": "object",
  "title": "Boy's Surface",
  "summary": "The three-lobed, self-crossing Boy's surface turning in studio light under an iridescent, oil-slick skin. Loops perfectly.",
  "description": "Boy's surface, the strange self-crossing sheet that is the projective plane immersed in ordinary space, drawn from the Bryant–Kusner formula and turning slowly in the studio light. Its skin is iridescent, shifting colour like an oil film or soap bubble as it turns; a fine net of curves runs along it; a clear-coated sheen catches the softboxes. Choose the finish (iridescent, chrome, pearl or dark), whether the net of curves shows, the fineness of the mesh, how many turns it makes about each axis, the backdrop and whether the camera drifts.",
  "role": "Object (3D, three.js): a mathematical sculpture for maths, science, design and futuristic content.",
  "collections": [
    "chrome-glass",
    "hypnotic-loops",
    "product-reveals"
  ],
  "tags": [
    "boy's surface",
    "topology",
    "mathematics",
    "iridescent",
    "minimal surface",
    "sculpture",
    "projective plane",
    "geometry",
    "loop",
    "3d"
  ],
  "synonyms": [
    "mathematical surface",
    "topological sculpture",
    "self-intersecting surface",
    "immersed projective plane",
    "maths art",
    "iridescent shape"
  ],
  "useCases": [
    "A maths, topology or science explainer",
    "A futuristic or design-studio title scene",
    "An abstract showpiece for a brand"
  ],
  "featured": null,
  "publishedAt": "2026-10-05",
  "implementation": {
    "target": "three",
    "runtime": "browser",
    "language": "javascript",
    "module": "esm",
    "entry": "src/boy-surface.js",
    "exports": [
      {
        "name": "createBoySurface",
        "signature": "createBoySurface({ finish?, lines?, detail?, turnsX?, turnsY? }) => { group, setProgress(progress), dispose() }",
        "description": "The surface (about 2 across) and its net of curves as a group; add it with an environment map and a light."
      },
      {
        "name": "boyPoint",
        "signature": "boyPoint(r, theta) => [x, y, z]",
        "description": "A point of Boy's surface for w = r·e^(iθ) in the unit disc."
      },
      {
        "name": "FINISHES",
        "signature": "FINISHES: { iridescent, chrome, pearl, dark }",
        "description": "Material settings."
      }
    ],
    "reusable": [
      "src/boy-surface.js"
    ],
    "demo": "demo.js",
    "harness": "index.html"
  },
  "dependencies": [
    {
      "id": "three",
      "version": "0.185.1",
      "reason": "Renderer, geometry and shader materials."
    },
    {
      "id": "chrome-material",
      "version": "1.1.0",
      "scope": "demo",
      "reason": "Studio environment light, backdrop and contact shadow."
    },
    {
      "id": "apw-runtime",
      "version": "1.0.0",
      "scope": "demo",
      "reason": "Demo harness."
    }
  ],
  "params": [
    {
      "key": "finish",
      "label": "Finish",
      "type": "select",
      "default": "iridescent",
      "options": [
        {
          "value": "iridescent",
          "label": "Iridescent"
        },
        {
          "value": "chrome",
          "label": "Chrome"
        },
        {
          "value": "pearl",
          "label": "Pearl"
        },
        {
          "value": "dark",
          "label": "Dark oil slick"
        }
      ]
    },
    {
      "key": "lines",
      "label": "Net of curves",
      "type": "boolean",
      "default": true
    },
    {
      "key": "detail",
      "label": "Detail",
      "type": "number",
      "min": 0.6,
      "max": 1.4,
      "step": 0.1,
      "default": 1
    },
    {
      "key": "turnsX",
      "label": "Turns about x",
      "type": "integer",
      "min": 0,
      "max": 3,
      "step": 1,
      "default": 1
    },
    {
      "key": "turnsY",
      "label": "Turns about y",
      "type": "integer",
      "min": 0,
      "max": 3,
      "step": 1,
      "default": 2
    },
    {
      "key": "background",
      "label": "Backdrop",
      "type": "color",
      "default": "#1a2030"
    },
    {
      "key": "orbit",
      "label": "Camera drift",
      "type": "boolean",
      "default": true
    }
  ],
  "presets": [
    {
      "id": "default",
      "label": "Iridescent, with curves",
      "params": {}
    },
    {
      "id": "chrome",
      "label": "Chrome, bare",
      "params": {
        "finish": "chrome",
        "lines": false,
        "background": "#222833"
      }
    },
    {
      "id": "pearl",
      "label": "Pearl",
      "params": {
        "finish": "pearl",
        "background": "#2a2530"
      }
    },
    {
      "id": "dark",
      "label": "Dark oil slick, slow",
      "params": {
        "finish": "dark",
        "turnsX": 0,
        "turnsY": 1,
        "background": "#101018"
      }
    }
  ],
  "output": {
    "width": 1080,
    "height": 1080,
    "fps": 30,
    "durationSeconds": 16,
    "posterSeconds": 3,
    "alpha": false,
    "motion": "procedural",
    "loop": {
      "seamless": true,
      "cycleSeconds": 16,
      "method": "The surface turns a whole number of times about x and y per loop and the camera drift is a sine of the loop, so the last frame meets the first."
    },
    "seed": null
  },
  "composition": {
    "inputs": "Time within the loop; the finish, net of curves, detail, turns, backdrop and camera drift.",
    "outputs": "A full frame rendered in 3D with soft shadows and a studio environment.",
    "coordinates": "The surface is centred on the origin, about 2 across before scaling; the demo scales it by 1.45.",
    "lighting": "A warm key light with a shadow map and the studio environment on the clear-coated, thin-film surface.",
    "timing": "setProgress(progress) sets the rotation; frames render in any order.",
    "compatibleWith": [
      "chrome-material",
      "orbit-camera",
      "kinetic-title",
      "number-reveal"
    ],
    "notes": [
      "The mesh is a 90 × 240 grid over the unit disc in the Bryant–Kusner parametrisation (w^6 + √5·w^3 − 1 in the denominator), its normals averaged where the rim meets itself; the net of curves is 8 circles and 24 spokes of the disc."
    ]
  },
  "reuse": [
    "Maths or topology explainer: Iridescent, with curves.",
    "Design-studio showpiece: Chrome, bare.",
    "Luxury abstract loop: Pearl."
  ],
  "integration": {
    "newProject": "Create a WebGLRenderer with shadows and a studio environment (see chrome-material), add createBoySurface().group and call boy.setProgress(progress) each frame.",
    "existingProject": "Copy src/boy-surface.js; add boy.group to your scene with an environment map and a light."
  },
  "performance": {
    "notes": "One mesh of about 22 000 vertices and a few thousand line segments, one shadow map. A few milliseconds a frame on an integrated Intel GPU.",
    "limits": "Software WebGL renders in about a second a frame."
  },
  "limitations": [
    "The surface crosses itself, so its inside and outside are both visible; the iridescence is the standard thin-film model, not a simulation.",
    "The mesh near the centre of the disc (the surface's tip) is slightly coarse."
  ],
  "license": {
    "spdx": "MIT",
    "notice": "Copyright (c) 2026 AI Pixel Wizard. Released under the MIT License. See LICENSE in this folder.",
    "thirdParty": []
  },
  "provenance": "Adapted from the owner's threejs-sketches/geometry-math/boy-surface (MIT) and rebuilt for AI Pixel Wizard in October 2026 as an original object: the Bryant–Kusner parametrisation evaluated on a welded grid, an iridescent clear-coated skin and whole-turn rotation for an exact loop.",
  "changelog": [
    {
      "version": "1.0.0",
      "date": "2026-10-05",
      "notes": "Initial release."
    }
  ]
}
