mrdoob/three.js — Issue #1353: Conversion Model Space to 2d
Author: skfcz
Created: 2012-02-18 23:31:21+00:00
State: open

Hello,

I'v unfortunately still a problem to understand the projection from the 3D to the 2D world.

If I have a point in 3D and want to know the equivalent in the 2D world

Using the following code:

var p = new THREE.Vector4( xs[ix], ys[iy], zs[iz]);
p = projector.projectVector(p, camera);
log.info("p' " + p.x + ", " + p.y + ", " + p.z );

The values I get from this code do not work as expected, they have the wrong value and sign.

In the example http://www.groy-groy.de/czerbst/threejsboilerplate/index5.html
you could see the normalized mouse position on the left hand,
after pressing F2 you get an console window. The switch e.g. to isometric view
and the corner points are printed to the console.

p 0.5, 1, 2 is project to p' 0.092, 0.315, 0.976 with the projectore, but it should be -0.361, 0.042.

Thanks for any hint, Carsten