본문으로 건너뛰기
cccskills
무료GitHub에 공개

conformal-ga

Conformal Geometric Algebra (CGA) for circles, spheres, and Möbius transformations

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(2)

  • SKILL.md6.0 KB
  • CONCOMITANT_SKILLS.md891 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

conformal-ga

CGA: Embed Euclidean space into a higher-dimensional conformal space

Version: 1.0.0
Trit: -1 (MINUS - contractive/measurement)

Overview

Conformal Geometric Algebra (CGA) extends PGA by adding two extra dimensions that encode scale and infinity. This allows representing circles and spheres as simple blades.

Algebra Signatures

AlgebraSignatureEuclidean DimTotal Dim
CGA2DCl(3,1)2D4D → 16 basis
CGA3DCl(4,1)3D5D → 32 basis
DCGA3DCl(6,2)3D (double)8D → 256 basis

Null Basis

The key insight: two null vectors encode the origin and infinity:

Algebra(4,1, () => {
  // Standard basis: e1, e2, e3 (Euclidean), e4 (+), e5 (-)
  
  // Null vectors
  var no = 0.5*(1e5 - 1e4);  // Origin (null)
  var ni = 1e4 + 1e5;         // Infinity (null)
  
  // Key property: no · ni = -1
  console.log((no << ni).s);  // -1
  
  // Point embedding: x ↦ no + x + (x²/2)ni
  var point = (x,y,z) => {
    var x2 = x*x + y*y + z*z;
    return no + x*1e1 + y*1e2 + z*1e3 + 0.5*x2*ni;
  };
});

Geometric Objects as Blades

Points (Grade 1 OPNS)

var P = point(1, 2, 3);  // Null vector
// P · P = 0 (null)

Point Pairs (Grade 2)

var A = point(0,0,0), B = point(1,0,0);
var pointPair = A ^ B;  // Wedge of two points

Circles (Grade 3)

var A = point(0,0,0), B = point(1,0,0), C = point(0,1,0);
var circle = A ^ B ^ C;  // Through three points

// Or: dual sphere intersected with plane
var sphere = dualSphere(center, radius);
var plane = dualPlane(normal, distance);
var circle2 = sphere ^ plane;

Spheres (Grade 4 OPNS / Grade 1 IPNS)

// OPNS: 4 points define a sphere
var sphere = A ^ B ^ C ^ D;

// IPNS (dual): center + radius encoding
var dualSphere = (c, r) => point(c.x, c.y, c.z) - 0.5*r*r*ni;

Planes (Grade 4 OPNS)

// OPNS: 3 points + infinity
var plane = A ^ B ^ C ^ ni;

// IPNS (dual): normal + distance
var dualPlane = (n, d) => n.x*1e1 + n.y*1e2 + n.z*1e3 + d*ni;

Conformal Transformations

All Möbius transformations are motors in CGA!

Rotation

// Same as PGA - bivector in Euclidean part
var rotor = Math.cos(angle/2) + Math.sin(angle/2)*1e12;
var rotated = rotor * object * ~rotor;

Translation

// Translator uses ni (infinity)
var translator = 1 - 0.5*distance*(direction ^ ni);
var translated = translator * object * ~translator;

Dilation (Scaling)

// Unique to CGA - uses no and ni
var dilator = Math.cosh(s/2) + Math.sinh(s/2)*(no ^ ni);
var scaled = dilator * object * ~dilator;
// Scales by e^s

Inversion (Circle/Sphere)

// Reflect in a sphere - a versor!
var inverted = sphere * point * sphere;
// Maps inside to outside

Distance and Angle Extraction

Distance Between Points

function distance(P, Q) {
  return Math.sqrt(-2 * (P << Q).s);
}

Radius of Sphere/Circle

function radius(sphere) {
  var s2 = (sphere * sphere).s;
  var sni = (sphere << ni).s;
  return Math.sqrt(Math.abs(s2)) / Math.abs(sni);
}

OPNS vs IPNS

RepresentationMeaningGrade
OPNS (Outer Product Null Space)Object = span of null vectorsHigher
IPNS (Inner Product Null Space)Object = things with zero inner productLower
// Convert between them via dualization
var ipns = !opns;  // Dual
var opns = !ipns;  // UnDual

ganja.js CGA Examples

Algebra(4,1, () => {
  var no = 0.5*(1e5-1e4), ni = 1e4+1e5;
  var point = (x,y,z) => no + x*1e1 + y*1e2 + z*1e3 + 0.5*(x*x+y*y+z*z)*ni;
  
  // Three points define a circle
  var A = point(1,0,0), B = point(0,1,0), C = point(-1,0,0);
  var circle = A ^ B ^ C;
  
  // Render it
  return this.graph([
    0xFF0000, A, B, C,
    0x00FF00, circle
  ], {conformal: true, gl: true});
});

GF(3) Role

CGA is MINUS (-1) because it primarily measures and contracts:

  • Distance computation uses inner product (contraction)
  • Sphere/circle radius extraction
  • Intersection (meet) operations

Conservation Triad

conformal-ga (-1) ⊗ pga-motor-interpolation (0) ⊗ ga-visualization (+1) = 0 ✓

Applications

  1. Computer Vision: Circle/sphere fitting
  2. Robotics: Kinematics with scaling
  3. Graphics: Ray-sphere intersection
  4. Physics: Conformal field theory

Related Algebras

NameSignatureUse Case
CGA2DCl(3,1)2D circles
CGA3DCl(4,1)3D spheres
DCGACl(6,2)Quadric surfaces
TCGACl(9,3)Cubic surfaces
QCGACl(9,6)Quartic surfaces

Commands

# ganja.js CGA demo
node -e "var A=require('ganja.js'); A(4,1,()=>{
  var no=0.5*(1e5-1e4), ni=1e4+1e5;
  var pt=(x,y,z)=>no+x*1e1+y*1e2+z*1e3+0.5*(x*x+y*y+z*z)*ni;
  console.log('Origin:', pt(0,0,0));
  console.log('ni:', ni);
})()"

# Python clifford
python3 -c "from clifford.g3c import *; print(eo, einf)"

References


Autopoietic Marginalia

The interaction IS the skill improving itself.

Every use of this skill is an opportunity for worlding:

  • MEMORY (-1): Record what was learned
  • REMEMBERING (0): Connect patterns to other skills
  • WORLDING (+1): Evolve the skill based on use

Add Interaction Exemplars here as the skill is used.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Model ElevenLabs voice synthesis as an ACSet schema with Unison ability handlers for typed voice operations. Use when integrating ElevenLabs TTS into category-theoretic pipelines, building typed voice synthesis workflows, or managing multi-voice narration with GF(3) conservation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi702026년 7월 10일 업데이트

Systematic process for analyzing and modernizing legacy applications to comply with the 12-Factor App methodology. Covers code analysis, configuration externalization, dependency management, and container/Kubernetes best practices.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi702026년 7월 10일 업데이트

13c0e3

무료

Gay MCP skill at invocation 26

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi702026년 7월 10일 업데이트

19d57d

무료

Gay MCP skill at invocation 5

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi702026년 7월 10일 업데이트

1ea91a

무료

Gay MCP skill at invocation 27

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi702026년 7월 10일 업데이트

1eab21

무료

Gay MCP skill at invocation 3

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi702026년 7월 10일 업데이트

plurigrid의 스킬 모두 보기

이 스킬의 문제 신고