-2

I have a basic question regarding coordinate system in Three.js. I have a spherical geometry of radius 500 and a camera placed at (0,0,0). I am using raycasting to find the intersection on the spherical surface. I can see in the intersect object that the distance is always 500 , but the z coordinate in point variable is not constant. As per my understanding z-coordinate represents the depth and since the camera is at origin the z-coordinate should also be 500. Any help or link would be highly appreciated.

TA-
  • 63
  • 5
  • This is really hard to read. Can you put the code to jsfiddle? – Pawel Aug 18 '16 at 11:30
  • Think about this: A sphere of radius 500 means that all points on the sphere are 500 distance units away from it. That doesn't mean all z coordinates will be 500 though. From your depth argument, think about a semicircle in front of you. Some parts are closer and some are further, i.e. the depth changes – Rush2112 Aug 18 '16 at 13:09

1 Answers1

1

Look at the image - both of a and b has the same length (suppose 500 in your case). But clearly, the intersection points have different z coordinate.

enter image description here

Rasheduzzaman Sourov
  • 1,375
  • 2
  • 15
  • 36