Essential Mathematics for Computational Design
Essential Mathematics for Computational Design, by Rajaa Issa (Robert McNeel & Associates), introduces to design professionals the foundation mathematical concepts that are necessary for effective development of computational methods for 3-D modeling and computer graphics. This is not meant to be a complete and comprehensive resource, but rather an overview of the basic and most commonly used concepts.
The material is directed towards designers who have little or no background in mathematics beyond high school. All concepts are explained visually using Grasshopper ® (GH), the generative modeling environment for Rhinoceros ® (Rhino).
The content is divided into three chapters. Chapter 1 discusses vector math including vector representation, vector operation, and line and plane equations. Chapter 2 reviews matrix operations and transformations. Chapter 3 includes an in-depth review of parametric curves with special focus on NURBS curves and the concepts of continuity and curvature. It also reviews NURBS surfaces and polysurfaces.
The author would like to acknowledge the excellent and thorough technical review by Dr. Dale Lear of Robert McNeel & Associates. His valuable comments were instrumental in producing this edition. I would also like to acknowledge Ms. Margaret Becker of Robert McNeel & Associates for reviewing the technical writing and formatting the document.
Contents
- 1 Vector Mathematics
- 1.1 Vector representation
- 1.2 Vector operations
- 1.2.1 Vector scalar operation
- 1.2.2 Vector addition
- 1.2.3 Vector subtraction
- 1.2.4 Vector properties
- 1.2.5 Vector dot product
- 1.2.6 Vector dot product, lengths, and angles
- 1.2.7 Dot product properties
- 1.2.8 Vector cross product
- 1.2.9 Cross product and angle between vectors
- 1.2.10 Cross product properties
- 1.3 Vector equation of line
- 1.4 Vector equation of a plane
- 1.5 Tutorials
- 2 Matrices and Transformations
- 3 Parametric Curves and Surfaces
- 3.1 Parametric curves
- 3.2 NURBS curves
- 3.3 Curve geometric continuity
- 3.4 Curve curvature
- 3.5 Parametric surfaces
- 3.6 Surface geometric continuity
- 3.7 Surface curvature
- 3.8 NURBS surfaces
- 3.9 Polysurfaces
- 3.10 Tutorials
- 4 References
Vector Mathematics
A vector indicates a quantity, such as velocity or force, that has direction and length. Vectors in 3D coordinate systems are represented with an ordered set of three real numbers and look like:
v = <a1, a2, a3>
Vector representation
In this document, lower case bold letters will notate vectors. Vector components are also enclosed in angle brackets. Upper case letters will notate points. Point coordinates will always be enclosed by parentheses. Using a coordinate system and any set of anchor points in that system, we can represent or visualize these vectors using a line-segment representation. An arrowhead shows the vector direction. For example, if we have a vector that has a direction parallel to the x-axis of a given 3D coordinate system and a length of 5 units, we can write the vector as follows:
- v = <5, 0, 0>
To represent that vector, we need an anchor point in the coordinate system. For example, all of the arrows in the following figure are equal representations of the same vector despite the fact that they are anchored at different locations.
| Given a 3D vector v = < a1, a2, a3 >, all vector components a1, a2, a3 are real numbers. Also all line segments from a point A(x,y,z) to point B(x+a1, y+a2, z+a3) are equivalent representations of vector v. |
So, how do we define the end points of a line segment that represents a given vector? Let us define an anchor point (A) so that:
- A = (1, 2, 3)
And a vector:
- v = <5, 6, 7>
The tip point (B) of the vector is calculated by adding the corresponding components from anchor point and vector v:
- B = A + v
- B = (1+5, 2+6, 3+7)
- B = (6, 8, 10)
Position vector
One special vector representation uses the origin point (0,0,0) as the vector anchor point. The position vector v = <a1,a2,a3> is represented with a line segment between two points, the origin and B, so that:
- Origin point = (0,0,0)
- B = (a1,a2,a3)
| A position vector for a given vector v= < a1,a2,a3 > is a special line segment representation from the origin point (0,0,0) to point (a1,a2,a3). |
Vectors vs. points
Do not confuse vectors and points. They are very different concepts. Vectors, as we mentioned, represent a quantity that has direction and length, while points indicate a location. For example, the North direction is a vector, while the North Pole is a location (point). If we have a vector and a point that have the same components, such as:
- v = <3,1,0>
- P = (3,1,0)
We can draw the vector and the point as follows:
Vector length
As mentioned before, vectors have length. We will use |a| to notate the length of a given vector a. For example:
- a = <4, 3, 0>
- |a| = √(42 + 32 + 02)
- |a| = 5
In general, the length of a vector a<a1,a2,a3> is calculated as follows:
- |a| = √(a12 + a22 + a32)
Unit vector
Vector operations
Vector scalar operation
Vector addition
Vector subtraction
Vector properties
Vector dot product
Vector dot product, lengths, and angles
Dot product properties
Vector cross product
Cross product and angle between vectors
Cross product properties
Vector equation of line
Vector equation of a plane
Tutorials
Face direction
Input
Parameters
Solution
Exploded box
Input
Parameters
Solution
Tangent spheres
Input
Parameters
Solution
Matrices and Transformations
Matrix operations
Matrix multiplication
Method 1
Method 2
Identity matrix
Transformation operations
Translation (move) transformation
Rotation transformation
Scale transformation
Shear transformation
Mirror or reflection transformation
Planar Projection transformation
Tutorial
Multiple transformations
Input
Additional input
Solution
Parametric Curves and Surfaces
Parametric curves
Curve parameter
Curve domain or interval
Curve evaluation
Tangent vector to a curve
Cubic polynomial curves
Evaluating cubic Bézier curves
NURBS curves
Degree
Control points
Weights of control points
Knots
Knots are parameter values
Knot multiplicity
Fully-multiple knots
Uniform knots
Non uniform knots
Evaluation rule
Characteristics of NURBS curves
Clamped vs. periodic NURBS curves
Weights
Evaluating NURBS curves
Solution
Curve geometric continuity
Curve curvature
Parametric surfaces
Surface parameters
Surface domain
Surface evaluation
Tangent plane of a surface
Surface geometric continuity
Surface curvature
Principal curvatures
Gaussian curvature
Mean curvature
NURBS surfaces
Characteristics of NURBS surfaces
Singularity in NURBS surfaces
Trimmed NURBS surfaces
Polysurfaces
Tutorials
Continuity between curves
Input
Parameters
Solution
Surfaces with singularity
Input
Parameters
Solution
References
Edward Angel, "Interactive Computer Graphics with OpenGL,” Addison Wesley Longman, Inc., 2000.
James D Foley, Steven K Feiner, John F Hughes, "Introduction to Computer Graphics" Addison-Wesley Publishing Company, Inc., 1997.
James Stewart, "Calculus," Wadsworth, Inc., 1991.
Kenneth Hoffman, Ray Kunze, “Linear Algebra”, Prentice-Hall, Inc., 1971
Rhinoceros® help document, Robert McNeel and Associates, 2009.




