You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/Rendering/Core/Renderer/index.js
+13-11Lines changed: 13 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -412,17 +412,19 @@ function vtkRenderer(publicAPI, model) {
412
412
413
413
// default so that the bounding sphere fits within the view fustrum
414
414
415
-
// compute the distance from the intersection of the view frustum with the
416
-
// bounding sphere. Basically in 2D draw a circle representing the bounding
417
-
// sphere in 2D then draw a horizontal line going out from the center of
418
-
// the circle. That is the camera view. Then draw a line from the camera
419
-
// position to the point where it intersects the circle. (it will be tangent
420
-
// to the circle at this point, this is important, only go to the tangent
421
-
// point, do not draw all the way to the view plane). Then draw the radius
422
-
// from the tangent point to the center of the circle. You will note that
423
-
// this forms a right triangle with one side being the radius, another being
424
-
// the target distance for the camera, then just find the target dist using
425
-
// a sin.
415
+
// Viewing the scene from the side in 2D:
416
+
// Draw a circle representing the bounding sphere containing all pixels.
417
+
// Then, draw a horizontal line going out from the center of the circle.
418
+
// The camera is somewhere on this line.
419
+
// Picture the view frustrum, moving through the circle.
420
+
// Draw a line from the intersection of the view frustrum and the bounding sphere to line the camera is on, ensuring that the line is tangent to the circle.
421
+
// Draw the radius from the tangent point to the center of the circle.
422
+
// You will note that this forms a right triangle with sides:
423
+
// - radius
424
+
// - the line formed by the intersection of the view frustrum and the bounding sphere
425
+
// - the target distance for the camera.
426
+
// We can use trigonometry to solve for that distance.
0 commit comments