10.014 CTD
  • Overview
  • Schedule
  • Administrative
    • Accessing Rhino remotely
    • Rhino for Mac
  • ASSIGNMENTS
    • Dates and rubrics
    • Generative design
      • Generative design
    • Parametric design
      • Parametric design
    • Simulated design
      • Simulated design
      • Simulated design
  • SESSION 1B
    • Computer Aided Design
    • Ranges and expressions 1
      • Ranges and expressions 2
      • Ranges and expressions 3
      • Ranges and expressions 4
      • Ranges and expressions 5
      • Ranges and expressions 6
  • SESSION 2A
    • Visual programming 1
      • Visual programming 2
      • Visual programming 3
      • Visual programming 4
    • Associative modelling 1
      • Associative modelling 2
      • Associative modelling 3
  • SESSION 2B
    • Logical Patterns 1
      • Logical patterns 2
      • Logical patterns 3
  • SESSION 3A
    • Spatial geometry 1
      • Spatial geometry 2
      • Spatial geometry 3
      • Spatial geometry 4
      • Spatial geometry 5
      • Spatial geometry 6
      • Spatial geometry 7
    • Curve geometry 1
      • Curve geometry 2
      • Curve geometry 3
      • Curve geometry 4
  • SESSION 3B
    • Surface geometry
    • Parametric modelling 1
      • Parametric modelling 2
      • Parametric modelling 3
      • Parametric modelling 4
  • SESSION 4A
    • Information nesting 1
      • Information nesting 2
      • Information nesting 3
    • Data landscapes 1
      • Data landscapes 2
      • Data Landscapes 3
      • Data landscapes 4
  • SESSION 4B
    • Mesh geometry 1
      • Mesh geometry 2
      • Mesh geometry 3
  • SESSION 5A
    • Space and time 1
      • Space and time 2
    • Modelling entities 1
      • Modelling entities 2
      • Modelling entities 3
  • SESSION 5B
    • Multibody dynamics 1
      • Multibody dynamics 2
    • Material elasticity 1
      • Material elasticity 2
      • Material elasticity 3
  • SESSION 6A
    • Form-finding 1
      • Form-finding 2
      • Form-finding 3
      • Form-finding 4
  • SESSION 6B
    • AI Image generation 1
      • AI Image generation 2
      • AI Image generation 3
  • APPENDIX
    • Spirograph 1
      • Spirograph 2
    • Curves
    • Swarm Intelligence 1
      • Swarm Intelligence 2
    • Hybrid programming 1
      • Hybrid programming 2
Powered by GitBook
On this page
  1. SESSION 3A
  2. Spatial geometry 1

Spatial geometry 2

PreviousSpatial geometry 1NextSpatial geometry 3

Last updated 8 months ago

Basic Arithmetic

Basic arithmetic operations such as addition, subtraction, multiplication and division are quite straight forward for points and vectors as they follow the same rules as single numbers. We just apply them coordinate-wise. What is important to familiarize here however is the geometric interpretation of those operations.

Translation

Semantically, addition and subtraction captures the concept of translation: adding a point and a vector has the sense of moving the point to a new location.

A vector represents a displacement or translation having a particular direction and a magnitude. It tells us how to go from ppp to qqq i.e. p+u=qp + u = q p+u=q or equivalently we use u=q–p u = q – pu=q–p.

If p=[xp,yp,zp]p=[x_p, y_p, z_p]p=[xp​,yp​,zp​] and q=[xq,yq,zq]q=[x_q, y_q, z_q]q=[xq​,yq​,zq​] then u=[xq–xp,yq–yp,zq–zp]u=[x_q – x_p, y_q – y_p, z_q – z_p]u=[xq​–xp​,yq​–yp​,zq​–zp​]

Therefore, subtraction between two points is the way to “construct” vectors. Note that the point order is reversed i.e. the vector from PPP to QQQ is u=Q–P u = Q – Pu=Q–P we write first the target location followed by subtracting the source location.

Scaling

Multiplication and division of vectors by single numbers represent geometric scaling. Scaling vectors retains their direction but adjusts their magnitude. If u=[xu,yu,zu]u = [x_u, y_u, z_u]u=[xu​,yu​,zu​] then u∗s=[xu∗s,yu∗s,zu∗s]u * s = [x_u * s, y_u * s, z_u * s]u∗s=[xu​∗s,yu​∗s,zu​∗s], where sss is a real number.

Vector Inversion

To flip, reverse or invert the direction of a vector we multiply it with “-1”. For a vector u=[xu,yu,zu]u = [x_u, y_u, z_u]u=[xu​,yu​,zu​]we have u∗(−1)=[xu∗(−1),yu∗(−1),zu∗(−1)]=[−xu,−yu,−zu]=−uu * (-1) = [x_u * (-1), y_u * (-1), z_u * (-1)] = [-x_u, -y_u, -z_u] = -uu∗(−1)=[xu​∗(−1),yu​∗(−1),zu​∗(−1)]=[−xu​,−yu​,−zu​]=−u

In general any negative scaling factors have the effect of not only changing a vector’s magnitude but also flipping its direction.

Point Average

The average between points “p” and “q” represents the middle-point between them; we can express this as m=(p+q)/2m = ( p + q ) / 2m=(p+q)/2. You may verify this, in a Euclidean sense, by observing the diagonals of a parallelogram bisect one another.

With three points “a”, “b” and “c”, the average g=(a+b+c)/3g = ( a + b + c ) / 3g=(a+b+c)/3 represents the geometric centre of the triangle. For any number of points the expression (p1+p2+p3+…+pn)/n( p1 + p2 + p3 + … + pn ) / n (p1+p2+p3+…+pn)/n represents the geometric centre or centroid; in the same sense of the “mean” value among numbers.

Practice

  • Construct the centroid of a triangle and draw a circle from the centroid to any of the triangle’s points.

  • Show constructively, in the Euclidean sense, how averaging points produces the centroid. Hint: consider the points as vectors from the origin.

Points on Line

With addition and multiplication we can create linear spaces. The simplest example of this capability is to consider the expression P+u∗tP + u * t P+u∗t, where “P” is a point in space, “u” is a spatial vector and “t” is a real number.

Given “P” and “u”, the points created by varying the value of “t” define a line in space. We construct those points by first scaling the directional vector and then translating the line’s start point.

Linear Interpolation

As it is easier to work with points on screen instead of vectors, we can rearrange the above expression to define a line using two points “P” and “Q”.

Therefore if we write u=Q−Pu = Q - Pu=Q−P

then the expression P+u∗tP + u * t P+u∗t

substitutes to P+(Q–P)∗tP + ( Q – P ) * t P+(Q–P)∗t

which expands to P+Q∗t–P∗tP + Q * t – P * t P+Q∗t–P∗t

and with factoring we obtain P∗(1–t)+Q∗tP * ( 1 – t ) + Q * tP∗(1–t)+Q∗t

This form is know also as linear interpolation. When the value of “t” is kept within the [0, 1] range, i.e. it behaves like a percentage, we achieve a sense of “mixture” between the positions “P” and “Q”. We mix ( 1 – t )% of the start point and t% of the end point. We thus often call this “t” values as a “mixture ratio”, “blending factor” or “parameter along the line”.

Practice

  • What is the “t” value of the mid-point between points “p” and “q”?

  • Construct a point “d” which represents the reflection of point “q” about the point “p”. What is its “t” value?

  • What are the values for “t” that split the line segment in four equal parts?

Points in Plane

Suppose we have one point in space “O” and two non-parallel vectors “u” and “v”. The expression O+u∗s+v∗tO + u * s + v * tO+u∗s+v∗t, where “s” and “t” are real numbers, captures every possible point in the plane spanned by “[o, u, v]”. In other words, all points in the plane are linear combinations of those vectors.

Generally, we prefer to work with planes where the “basis” vectors are orthogonal to one another. This is because motions in one direction, say varying “s” or “t” one at a time does not interfere with motion in the other direction i.e. “u” expresses motions exclusively in an left/right sense, while “v” an up/down sense. We call such pairs of vector linearly independent.

We can express points in the “[o, u, v]” plane using their “local” coordinates as “[s, t]”. Consider for a moment the case of point O=[0,0,0]O = [0, 0, 0]O=[0,0,0] and vectors X=[1,0,0] X = [1, 0, 0]X=[1,0,0] and Y=[0,1,0]Y = [0, 1, 0]Y=[0,1,0]. Using the above equation we can express every point in the XY-plane as the linear combination:

p=O+X∗x+Y∗yp = O + X * x + Y * yp=O+X∗x+Y∗y.

We write such point coordinates as P=[x,y]P = [x, y]P=[x,y] but this is just a shorthand notation.

Practice

  • Construct a plane with non-orthogonal basis vectors and observe how varying the “s, t” parameters affect the “u * s + v * t” vector in a sense of skewing.

  • As we performed a few simple substitutions to transform the equation of the line into the linear interpolation form, we can perform exactly the same twice to transform the plane equation into a bi-linear interpolation scheme.

27KB
3A_1_PtsPlane.gh
Drawing
Drawing