3D Graphics · CAD · Simulation · Robotics

3D Geometry Fundamentals

Learn the mathematical and geometric ideas behind working with objects in three-dimensional space — from points and vectors to transformations, meshes, and collision detection.

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.

Beginner

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.

XYZOrigin (0,0,0)Three perpendicular axes
A simple 3D Cartesian coordinate system. Axis orientation can vary between software packages.
Point P = (x, y, z)

The origin is the reference point (0, 0, 0). A point's coordinates describe its location relative to a chosen coordinate system.

Beginner

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.

A primitive is a simple mathematical shape. A real manufactured component may have a much more complex surface.
Essential

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.

Vector from A to B = B − A
Distance = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²)

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.
Essential

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).

Understanding coordinate frames is essential when combining CAD components, robot joints, sensors and tracked devices. Always check which coordinate frame an API expects.
Essential

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.

T = (Δx, Δy, Δz)

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.

[ x' ] [ transformation matrix ] [ x ]
[ 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.

Essential

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.

Quaternion q = (w, x, y, z)

You do not need to memorise quaternion algebra at the beginning. First understand that quaternions represent orientation, not position.

Intermediate

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.

Intermediate

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.

Intermediate

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.

Visual geometry and collision geometry are not always the same. A detailed model can use a simpler collision representation to improve performance.
Intermediate

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.

Ray: P(t) = O + tD, where t ≥ 0

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.

Putting it together

11. Where these concepts are used

FieldTypical geometry concepts
CAD and mechanical designPrimitives, curves, surfaces, meshes, coordinate frames, transformations
RoboticsVectors, coordinate frames, rotations, transformation matrices, kinematics
Virtual and augmented reality3D transforms, tracked-device coordinates, ray casting, collision detection
Computer graphics and gamesMeshes, normals, matrices, quaternions, bounding volumes
Simulation and digital twinsGeometry models, constraints, collision shapes, spatial relationships
Computer vision3D points, camera coordinates, projections, rays and pose estimation
Knowledge check

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?

External resources

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.

Open VRED Python API v2 documentation ↗

Autodesk VRED API overview

Introduction to VRED automation, Python API fundamentals, scene and geometry workflows, VR and plug-in development.

Open Autodesk VRED API resources ↗

Varjo XR headsets

Official Varjo website covering professional VR/XR headsets, mixed reality solutions and software for simulation and training.

Visit Varjo official website ↗

PICO VR headsets

Official PICO website with its VR headset range, developer platform and software resources.

Visit PICO official website ↗

Explore PICO Business and enterprise VR ↗

Documentation and device capabilities can vary by VRED release and headset model. Check the manufacturer's current compatibility and developer documentation before starting an integration.