They consist of three components: yaw, pitch and roll. The turn () degrees blocks rotate sprites. The change x by and change y by blocks translate sprites. Translation is the movement of a shape across the coordinate plane. For example, the set size to () and change size by blocks dilate sprites. Each vertex has an x, a y and a z component. Let a "model" consist of an array of vertices and an array of faces. The vertices of models may be stored in a list.Ī model needs a data representation. Finally, the clipspace coordinates are projected onto the screen. Points that are not in the camera's field of vision ("clipspace") may be dropped. Then, the programmer must determine the worldspace coordinates' positions relative to the viewer by applying the opposite of the camera's transform to the points. To implement 3D, one first needs to calculate the model's vertices' positions in the map ("worldspace"). Transformations are a way to describe the movement of shapes. The model also has a "transform" consisting of its translation, rotation and scale. Three-dimensional objects may be manipulated with matrix transformations. The illusion of 3D on a flat surface, such as a computer screen, is achieved by projecting a three-dimensional point onto a two-dimensional surface. We can incorporate size and movement that causes an illusion of depth.
In real life, the Z axis exists, but in Scratch, it does not. The Z axis is a Cartesian coordinate, much like the X and Y axes, but the Z axis usually is the axis for depth.