feat: 2D Umeyama XY + pression Z + frustums camera vers le bas
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user