Skip to content
TypeScript
4.3 KB
Raw Blame
/**
 * Banner — Olympus Research alpine identity applied to theseus.
 * Monochrome: near-black field, a geometric snow-capped massif in silver, a faint
 * starfield (spatial), "OLYMPUS RESEARCH" tracked above, big "THESEUS" below, the
 * tagline, and the four brand principles as a faint footer strip. Self-contained SVG.
 * Run: node scripts/design-olympus.mjs  → assets/theseus-banner.svg
 */
import { mkdirSync, writeFileSync } from "node:fs";

const W = 1200;
const H = 360;

function rng(seed) {
  let a = seed >>> 0;
  return () => {
    a = (a + 0x6d2b79f5) | 0;
    let t = Math.imul(a ^ (a >>> 15), 1 | a);
    t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;
    return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
  };
}

// Olympus 팔레트(brand.ts THEME 와 동기)
const C = {
  bg0: "#0a0b0d",
  bg1: "#070708",
  glow: "#16181c",
  snowTop: "#eef0f2",
  snowBot: "#aeb4bb",
  snow: "#ffffff",
  shadow: "#6b7178",
  star: "#cdd2d8",
  olympus: "#8b929b",
  title: "#eef0f2",
  tag: "#9aa0a8",
  princ: "#5e636b",
};

// 봉우리 능선(좌→우, 가장 높은 정상은 중앙). 절제된 다중 능선. base=196.
const RIDGE = [
  [360, 196],
  [398, 130],
  [418, 150],
  [448, 106],
  [472, 134],
  [502, 86],
  [528, 116],
  [560, 66],
  [600, 110],
  [636, 80],
  [666, 120],
  [702, 96],
  [736, 138],
  [762, 118],
  [792, 154],
  [818, 136],
  [840, 196],
];

function massif() {
  const top = RIDGE.map(([x, y]) => `${x},${y}`).join(" ");
  return `<polygon points="${top}" fill="url(#silver)"/>`;
}

// 정상 설원(가장 높은 세 봉우리에 작은 흰 삼각).
function snowcaps() {
  const caps = [
    [560, 66, 18],
    [502, 86, 13],
    [636, 80, 14],
  ];
  return caps
    .map(([x, y, w]) => `<polygon points="${x},${y} ${x - w},${y + w * 1.5} ${x + w},${y + w * 1.5}" fill="${C.snow}" opacity="0.92"/>`)
    .join("");
}

// 중앙 정상에서 내려오는 능선 그림자(입체감).
function spine() {
  return `<path d="M560,66 L594,196 M560,66 L526,196" stroke="${C.shadow}" stroke-width="1.4" opacity="0.5" fill="none"/>`;
}

function stars(seed) {
  const r = rng(seed);
  const out = [];
  for (let i = 0; i < 70; i++) {
    const x = Math.round(r() * W);
    const y = Math.round(r() * 210);
    const rad = (r() * 1.1 + 0.3).toFixed(2);
    const op = (r() * 0.5 + 0.1).toFixed(2);
    out.push(`<circle cx="${x}" cy="${y}" r="${rad}" fill="${C.star}" opacity="${op}"/>`);
  }
  return out.join("");
}

const xesc = (s) => String(s).replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");

function letterTracked(text, x, y, size, fill, spacing, weight = 700) {
  return `<text x="${x}" y="${y}" font-family="ui-sans-serif,Helvetica,Arial,sans-serif" font-size="${size}" font-weight="${weight}" letter-spacing="${spacing}" text-anchor="middle" fill="${fill}">${xesc(text)}</text>`;
}

const PRINCIPLES = [
  "ALPINE INSPIRATION",
  "FOCUS & PURPOSE",
  "TECHNICAL EDGE",
  "VERSATILITY",
];

function principlesStrip() {
  const line = PRINCIPLES.join("     ·     ");
  return letterTracked(line, W / 2, 326, 9, C.princ, 2, 500);
}

function build() {
  return `<svg xmlns="http://www.w3.org/2000/svg" width="${W}" height="${H}" viewBox="0 0 ${W} ${H}" role="img" aria-label="theseus — Olympus Research">
<defs>
<linearGradient id="bg" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="${C.bg0}"/><stop offset="1" stop-color="${C.bg1}"/>
</linearGradient>
<radialGradient id="glow" cx="0.5" cy="0.62" r="0.5">
<stop offset="0" stop-color="${C.glow}"/><stop offset="1" stop-color="${C.bg0}" stop-opacity="0"/>
</radialGradient>
<linearGradient id="silver" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="${C.snowTop}"/><stop offset="1" stop-color="${C.snowBot}"/>
</linearGradient>
</defs>
<rect width="${W}" height="${H}" fill="url(#bg)"/>
<rect width="${W}" height="${H}" fill="url(#glow)"/>
${stars(7)}
<g>${massif()}${spine()}${snowcaps()}</g>
${letterTracked("OLYMPUS RESEARCH", W / 2, 30, 12, C.olympus, 8, 600)}
${letterTracked("THESEUS", W / 2, 256, 44, C.title, 14, 700)}
${letterTracked("compare  model × agent × harness  on your own tasks", W / 2, 288, 12, C.tag, 3, 500)}
${principlesStrip()}
</svg>`;
}

mkdirSync("assets", { recursive: true });
writeFileSync("assets/theseus-banner.svg", build());
console.log("wrote assets/theseus-banner.svg");