The visible diameter is always smaller than the actual diameter, for a sphere (because of the curvature, like we both noticed before), so it makes sense for the multiplication factor to be less than 1. What can indeed be larger than both of these is the projection (especially when the camera is close), but that is handled by Three.js via .project() so no need to worry on that front.
Can you make your drawing skills speak again? (sorry I haven’t understood the 3 points alignment thing)
But if there is a solution (other than projecting all vertices) I’d like to try harder, hopefully with your precious help which is really amazing. Thank you Yin and makc3d for this thread, it’s so instructive (to me at least and to others I hope)!
a plane that contains the camera, the sphere center, and the scene origin (orbit controls target, actually) is the one where you need to look for points A and B (it would look like a line on the screen because the camera is in it)
That might be because of your last two operations in the h and h_apparent computations. Performing such things on the vector3s instead of the plain .y component of the initial vector3 doesn’t seem like the right choice, and getting the .length() neither. In other words, you’re looking for scalar values here, and the only component of interest is the projected Y one…
There is always a solution. Projecting all vertices would probably work as well, but depending on their number (and the number of segments in the shape), it can be a bit intensive, and logically it’s overkill to do that when all you need are just 2 points. A slightly related approach (with a different objective than yours, mainly to center and fit an cube on the screen) is illustrated in the fiddle from this post.
That indeed looks strange, not entirely sure what would be the cause. I’ll try to rewrite this in a fiddle and see what can be done about it. By the way, you want the little A and B spheres to be in the screen space or in 3D space?
My ultimate goal and why I’m looking for that “projected height” of the bounding sphere is because in fine, I want to draw a 2d circle (so yes screen space) that always encloses my bounding sphere.
More precisely, and to be more concrete what I’m working on is this:
Currently in the video you can see the red-circles have a fixed (screen-)size, but I’d like each 2D red-circle to have the exact same size as the offscreen bird’s 3D bounding sphere, it follows.
Now, if the bounding sphere is distorted (due to the perspective of the camera) and has a shape of a “potato”, I’d like my 2d red-circle to have the size to enclose that “potato”.
→ And since this sphere could be distorted (what I didn’t consider first), it makes me realize, that I’m not specially looking for the projected height specifically, but rather more for the maximum screen-projected width OR height of a such distorted sphere (to draw the enclosing circle of that distorted sphere).