The transformation of data for display in a 3D visualization involves a sequence of steps that convert data points and graphical objects from their initial form into a 2D image on your screen. These transformations are typically represented by mathematical matrices.
Based on the provided reference, the general steps are: Modelling Transformation. Viewing Transformation. Projection Transformation. Modeling Transformation.
While the reference lists Modelling Transformation twice, the core pipeline in 3D graphics and visualization typically involves three main types of transformations applied sequentially to render a 3D scene:
- Modelling Transformation: Positions and orientates individual objects (representing data) in a virtual 3D world.
- Viewing Transformation: Orients and positions the viewer or camera in the 3D world.
- Projection Transformation: Converts the 3D view volume into a 2D plane suitable for display.
Let's explore each of these steps in more detail.
Modelling Transformation
This is the first transformation applied to individual objects. Its purpose is to place and orient each graphical element (like a point, bar, surface, etc.) within the global coordinate system of your virtual 3D scene.
- Purpose: Defines the size, position, and orientation of an object relative to its own origin and within the larger 3D world.
- Operations: Includes translation (moving the object), rotation (spinning the object), and scaling (resizing the object).
- Practical Insight: In data visualization, this is where you'd position scatter plot points based on their x, y, z data values, scale bars according to magnitude, or rotate a geographical map to a specific angle.
- Example: If you have a 3D scatter plot, each data point's (x, y, z) values might directly map to a modelling transformation that translates a small sphere or cube to that specific location in the 3D world.
Viewing Transformation
Once all objects are placed in the 3D world using modelling transformations, the next step defines where the viewer (or camera) is located and which way they are looking. This transformation changes the coordinate system from "world space" (where objects are placed) to "view space" or "camera space" (from the perspective of the camera).
- Purpose: Positions and orientates the virtual camera within the 3D world. This determines what is visible from the viewer's perspective.
- Operations: Typically involves translating the world so the camera is at the origin and rotating the world so the camera is looking down a specific axis (e.g., the negative Z-axis).
- Practical Insight: This is how you navigate a 3D visualization – panning, zooming, and orbiting the camera view.
- Example: If you 'zoom out' or 'orbit' around a 3D bar chart, you are applying a viewing transformation that changes the camera's position and orientation relative to the bar chart objects.
Projection Transformation
The final major step is converting the 3D representation from view space into a 2D image that can be displayed on a screen. This transformation maps points in 3D space onto a 2D plane.
- Purpose: Flattens the 3D view onto a 2D projection plane (like your computer screen).
- Types:
- Perspective Projection: Creates a sense of depth by making objects further away appear smaller. This mimics how we see the real world and is common for realistic 3D scenes.
- Orthographic Projection: Projects points parallel to each other, meaning objects appear the same size regardless of their distance. This is often used for technical drawings or when accurate measurements are needed without distortion from perspective (e.g., in some scientific visualizations or architectural plans).
- Practical Insight: Choosing the projection type significantly impacts how the user perceives the depth and spatial relationships in your visualization.
- Example: In a perspective view of a 3D line graph, lines further away from the camera will appear shorter and closer together than lines of the same length that are closer. In an orthographic view, parallel lines will remain parallel on screen, regardless of their depth.
The entire sequence of transformations, often combined into a single matrix for efficiency, takes the original object data through these stages to produce the final 2D image pixels displayed to the user.
Here's a summary of the core transformations:
Transformation | Purpose | Input Space | Output Space | Effect |
---|---|---|---|---|
Modelling | Position/Orient Objects | Object Space | World Space | Moves, rotates, scales individual objects. |
Viewing | Position/Orient Viewer/Camera | World Space | View Space | Changes coordinates relative to camera. |
Projection | Convert 3D to 2D for Display | View Space | Clip Space | Defines viewing volume and flattens to a plane. |
Following the projection transformation, further steps like perspective division, mapping to screen coordinates (Viewport Transformation), and rendering occur to display the final image. The repetition of "Modelling Transformation" in the reference's list likely refers to its application as the initial step in the overall transformation pipeline.