feat: 2D Umeyama XY + pression Z + frustums camera vers le bas

This commit is contained in:
Floppyrj45
2026-04-24 11:59:35 +02:00
parent 7330b230b8
commit 4c01a9182a
2 changed files with 120 additions and 31 deletions

View File

@@ -56,11 +56,18 @@ function makePoints(xArr, yArr, zArr, colorFn) {
}
function makeFrustum(T_flat) {
// Wireframe camera pyramid: apex at origin, 1m×0.75m rect at z=1.5m
// Wireframe camera pyramid pointing downward (-Y): apex at origin, base 1m×0.75m at y=-1.5m
const verts = new Float32Array([
0,0,0, 0.5,0.375,1.5, 0.5,0.375,1.5, -0.5,0.375,1.5,
-0.5,0.375,1.5,-0.5,-0.375,1.5, -0.5,-0.375,1.5,0.5,-0.375,1.5,
0.5,-0.375,1.5,0,0,0, 0,0,0,0.5,0.375,1.5,
// 4 edges from apex to base corners
0,0,0, 0.5,-1.5, 0.375,
0,0,0, -0.5,-1.5, 0.375,
0,0,0, 0.5,-1.5,-0.375,
0,0,0, -0.5,-1.5,-0.375,
// 4 edges of base rectangle
0.5,-1.5, 0.375, -0.5,-1.5, 0.375,
-0.5,-1.5, 0.375, -0.5,-1.5,-0.375,
-0.5,-1.5,-0.375, 0.5,-1.5,-0.375,
0.5,-1.5,-0.375, 0.5,-1.5, 0.375,
]);
const geo = new THREE.BufferGeometry();
geo.setAttribute('position', new THREE.BufferAttribute(verts, 3));