liveBook · Manning

Orthogonality

As explained in Geometry for Programmers

Orthogonal describes vectors or directions that are perpendicular to each other.

Orthogonality describes vectors or directions that meet at a right angle. In an orthogonal pair, the dot product—the sum of coordinate-wise products—is zero. This gives geometry a practical test for perpendicularity rather than relying only on visual inspection. section 5.3.2 section 2.1.2

Orthogonality appears in several useful geometric roles:

  • Smoothly joining an arc to a line segment requires the vector from the arc center to the intersection point to be orthogonal to the segment. section 5.3.2
  • An orthonormal basis combines orthogonal directions with unit length; other bases may be nonorthogonal or non-normalized. section 2.1.2
  • The cross product produces a vector orthogonal to both input vectors, making it a normal vector for their shared plane. section 9.3.4

Constraining an arc and line segment

Represent the line segment with tangent vector (dx2, dy2) and the vector from the arc center (ax1, ay1) to the intersection (ix, iy). Enforce orthogonality with (ix − ax1)dx2 + (iy − ay1)dy2 = 0. Combined with the point and center equations, this lets SymPy solve for the unknown center, intersection, and parameter. section 5.3.2

Figure 5.21 An arc can be joined smoothly with a line segment so that we have both straight and curvy pieces in one building block.
05-21

Use the arc-and-segment figure to connect perpendicularity with the practical goal of creating a smooth geometric join. section 5.3.2

How Geometry for Programmers covers it

How deep it goes
Explains right-angle intuition, the zero dot-product condition, basis implications, and a solved arc-line construction.
Examples
Demonstrates an arc-line join, coordinate-based dot-product equations, orthonormal coordinates, and a nonorthonormal ray-casting basis.
What it assumes
Assumes coordinate vectors and basic geometry while introducing perpendicularity, dot products, and basis terminology through examples.
What you can do after
Build smooth arc-line joins and choose or recognize orthogonal bases and normal vectors in geometric algorithms.
How it connects
Connects orthogonality with dot product, cross product, normal vectors, tangent vectors, orthonormal bases, and ray casting.

Also explained in

Compare how 4 books explain orthogonality →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Geometry for Programmers. The section links point to the parts of the book it draws on.