Skip to content

Commit ee158c5

Browse files
committed
edit camera.md
1 parent 196a069 commit ee158c5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tutorials/camera.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@ The `Scene3D` class has a concept of a "projection transform" and a "view transf
1111
// points at (0, 2, 0), that is, up 2 units.
1212
scene.setLookAt([0,0,30], [0,2,0]);
1313

14-
In 3D graphics, the two most commonly used projections are the perspective projection and the orthographic projection. Both are described in detail below.
14+
In 3D graphics, two commonly used projections are the perspective projection and the orthographic projection. Both are described in detail below.
1515

1616
### Perspective Projection
1717

18-
A perspective projection gives the 3D scene a sense of depth. In this projection, closer objects look bigger than more distant objects with the same size. The `Scene3D` class's `setPerspective()` method defines a perspective projection.
18+
A perspective projection gives the 3D scene a sense of depth. In this projection, closer objects look bigger than more distant objects with the same size.
19+
20+
The perspective projection converts 3D coordinates to 4-element vectors in the form (X, Y, Z, W), also known as _clip coordinates_. Since the graphics system (outside the HTML 3D library) only deals with 3D points, it divides the X, Y, and Z components by the W component to get the 3D point's _normalized device coordinates_ and achieve the perspective effect.
21+
22+
The `Scene3D` class's `setPerspective()` and `setFrustum()` method define a perspective projection. Both methods take a clipping range, `near` and `far`: objects closer than "near" units or beyond "far" units from the camera will be clipped out. In effect, "far" can be seen as the distance to the "horizon" in the camera's view.
1923

2024
### Orthographic Projection
2125

0 commit comments

Comments
 (0)