A 3D scene represents objects in space. Every object has a shape, a position and an orientation. Geometry provides the language and mathematical tools used to describe, move, measure and analyse those objects.
1. Understanding 3D space
In 2D, a point is described by two values: X and Y. In 3D, a third value — Z — describes depth or height, depending on the coordinate convention used by the application.
The origin is the reference point (0, 0, 0). A point's coordinates describe its location relative to a chosen coordinate system.
2. Basic 3D shapes (primitives)
Complex models are often built from, or approximated using, simple geometric forms called primitives.
Cube / cuboid
Useful for representing blocks, boxes, components and simple volumes.
Sphere
Defined by a centre and radius. Useful for rounded objects and distance-based regions.
Cylinder
Defined by a circular cross-section, radius, axis and height. Common in shafts and pipes.
Cone
A circular base narrowing towards an apex. Useful for tapered forms.
Plane
A flat, infinitely extending mathematical surface, often used as a reference or cutting surface.
Torus
A ring-shaped surface, useful for understanding curved and rotational geometry.
3. Points and vectors
A point describes a location. A vector describes a direction and a magnitude (length). Vectors are used to express movement, forces, directions and distances.
For example, if A = (1, 2, 1) and B = (4, 6, 1), the vector from A to B is (3, 4, 0), and its length is 5 units.
Common vector operations
- Addition: combine movement or direction vectors.
- Subtraction: find the direction from one point to another.
- Magnitude: calculate vector length.
- Normalisation: create a unit vector with length 1.
- Dot product: compare directions and calculate angles.
- Cross product: find a vector perpendicular to two 3D vectors.
4. Coordinate systems: local and world
A 3D application can use several coordinate frames at the same time. Two important ones are:
World coordinates
Describe an object's position and orientation relative to the overall scene or global origin.
Local coordinates
Describe points relative to an object's own origin and axes. These axes move and rotate with the object.
For example, a bolt may be positioned relative to an engine assembly (local frame), while the engine assembly is positioned in the vehicle (world frame).
5. 3D transformations
A transformation changes an object's position, orientation or size. The three basic transformations are translation, rotation and scaling.
Translation
Moves an object by an offset along X, Y and/or Z without changing its shape or orientation.
Rotation
Turns an object around an axis or a chosen pivot point.
Scaling
Changes dimensions. Uniform scaling changes all axes equally; non-uniform scaling changes them independently.
Pivot / origin
The reference point about which an object rotates or scales.
Transformation matrices
A matrix provides a compact mathematical way to combine transformations. In 3D graphics, a 4 × 4 homogeneous transformation matrix commonly represents translation, rotation and scale.
[ y' ] = [ 4 × 4 ] [ y ]
[ z' ] [ ] [ z ]
[ 1 ] [ 1 ]
The order in which transformations are applied matters. Rotating and then translating can produce a different result from translating and then rotating.
6. Rotation: Euler angles and quaternions
Euler angles
Represent orientation using three rotations, commonly named roll, pitch and yaw. They are intuitive to read, but some rotation sequences can suffer from gimbal lock.
Quaternions
Use four values to represent 3D orientation. They are widely used in animation, robotics and real-time 3D applications because they support smooth interpolation and avoid Euler-angle gimbal lock.
You do not need to memorise quaternion algebra at the beginning. First understand that quaternions represent orientation, not position.
7. Mesh geometry: vertices, edges and faces
A polygon mesh represents a 3D surface using connected geometric elements.
Vertex
A point in 3D space.
Edge
A straight connection between two vertices.
Face
A flat polygon bounded by edges, often a triangle or quadrilateral.
Mesh
A collection of vertices, edges and faces forming a surface.
CAD systems may store exact curves and surfaces (such as NURBS), while real-time graphics often convert those surfaces into polygon meshes for display and simulation.
Surface normals
A normal is a direction perpendicular to a surface at a point. Normals help graphics software calculate lighting and help geometry algorithms reason about surface orientation and contact.
8. Bounding boxes and spatial queries
A bounding box is a simple box that encloses an object. It can be used for quick spatial tests before performing more detailed geometric calculations.
- Axis-aligned bounding box (AABB): sides remain aligned with the coordinate axes.
- Oriented bounding box (OBB): the box can rotate to better fit an object.
Bounding boxes are useful for estimating object size, checking whether objects may overlap and speeding up collision queries.
9. Collision detection and contact
Collision detection determines whether two objects intersect or touch. Physics engines often use simplified collision shapes rather than the full visual model because simpler shapes can be faster to test.
Primitive collider
Uses a box, sphere, capsule or cylinder as a simplified collision shape.
Convex hull
The smallest convex shape that encloses a set of points. Useful as a simplified collider.
Triangle mesh collider
Uses mesh triangles to represent a more detailed surface. Can be more computationally expensive.
Contact point
A position reported by a collision system where two shapes touch or penetrate.
10. Ray casting and picking
A ray is an imaginary half-line defined by an origin and a direction. Ray casting checks which objects the ray intersects. It is commonly used for mouse selection, laser pointers, measurement tools and object picking in 3D scenes.
Here, O is the ray origin and D is its direction. The intersection test determines whether the ray meets a surface and, if so, where.
11. Where these concepts are used
| Field | Typical geometry concepts |
|---|---|
| CAD and mechanical design | Primitives, curves, surfaces, meshes, coordinate frames, transformations |
| Robotics | Vectors, coordinate frames, rotations, transformation matrices, kinematics |
| Virtual and augmented reality | 3D transforms, tracked-device coordinates, ray casting, collision detection |
| Computer graphics and games | Meshes, normals, matrices, quaternions, bounding volumes |
| Simulation and digital twins | Geometry models, constraints, collision shapes, spatial relationships |
| Computer vision | 3D points, camera coordinates, projections, rays and pose estimation |
12. Test your knowledge
1. Which three values normally describe a point in 3D Cartesian space?
2. What does a vector represent?
3. What is a mesh made from?
4. Why might a physics engine use a simplified collision shape?
5. What is ray casting commonly used for?
VR development resources and hardware
Explore the official documentation and manufacturer websites for popular tools and headsets used in virtual and mixed reality development.
Autodesk VRED Python API v2
Official reference for scripting VRED scenes, nodes, geometry, constraints, physics, annotations and VR interactions.
Autodesk VRED API overview
Introduction to VRED automation, Python API fundamentals, scene and geometry workflows, VR and plug-in development.
Varjo XR headsets
Official Varjo website covering professional VR/XR headsets, mixed reality solutions and software for simulation and training.
PICO VR headsets
Official PICO website with its VR headset range, developer platform and software resources.