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 3

PreviousSpatial geometry 2NextSpatial geometry 4

Last updated 8 months ago

Point Distance

The “travel” distance between points in space is measured in the Euclidean sense.

For two points 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​]

their Euclidean distance is expressed as

(xp−xq)2+(yp−yq)2+(zp−zq)2\sqrt{ (x_p - x_q)^2 + (y_p - y_q)^2 + (z_p - z_q)^2}(xp​−xq​)2+(yp​−yq​)2+(zp​−zq​)2​

i.e. the square root of the sum of square differences between coordinates.

The idea of “distance” or a spatial “metric” is not strictly important. In fact most of classical Euclidean geometry completely forbids measuring in the sense of using a ruler. It operates in pure translation and scaling without such bogus concepts as the “square root”. The Pythagorean theorem talks about the “squares” of the sides, not the “lengths” of the sides, of an orthogonal triangle obey the famous equation.

Vector Length

A vector’s length, or magnitude, is computed directly from its x, y and z components using again the Euclidean metric. For a vector u=[xu,yu,zu]u = [x_u, y_u, z_u]u=[xu​,yu​,zu​]

its length is expressed as ∣u∣=xu2+yu2+zu2|u| = \sqrt{x_u^2 + y_u^2 + z_u^2}∣u∣=xu2​+yu2​+zu2​​

i.e. equals the square root of the sum of squares of the vector’s components.

The length of the vector has semantically the same units as a point’s coordinates or vector’s components. After all we are squaring, which takes us up to a notion of area but then we take the square root eventually back down to a linear length sense.

Normalization

A special type of scaling we perform to vectors is normalization or unitization. The aim is to extract the directional content of the vector discarding the information stored in its magnitude. Numerically the way to achieve this is by dividing the vector by its length thus causing it to become one unit in length.

We often use the symbol u^\hat{u}u^ i.e. read u-hat, to denote a normalized vector.

We can write this as u^=u/∣u∣\hat{u} = u/|u|u^=u/∣u∣

where uuu is a vector i.e. u=[ux,uy,uz]u = [u_x, u_y, u_z]u=[ux​,uy​,uz​] and the symbol ∣u∣|u|∣u∣ represents the length of the vector.

By dividing a vector’s components, which express lengths in linear units, with its magnitude, which also encompasses linear length, we remove the sense of length from a normalized vector. We may consider a normalized vector as the equivalent of a percentage in 1D. This is the sense in which a unit vector becomes pure direction.

Practice

  • Create a zero vector and use the “unitize” component. What is the result? Does it make sense? Why this can be geometrically useful thing to do?

There other types of distance functions [] but the Euclidean distance, or L2-norm, is considered the default. We also denote the distance between two points “P” and “Q” with the absolute value bars of ∣P−Q∣=∣Q−P∣|P-Q| = |Q - P|∣P−Q∣=∣Q−P∣

Manhattan-distance [] is a peculiar alternative to Euclidean distance. Try to implement it using basic components.

>
>
Drawing
Drawing
Drawing