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 1B
  2. Ranges and expressions 1

Ranges and expressions 4

Spreadsheet programming

PreviousRanges and expressions 3NextRanges and expressions 5

Last updated 9 months ago

Regular Polygons

Regular polygons have all their sides and angles equal. To generate such shapes we can modify the table such that the “x” and “y” coordinates are now using the cosine and sine columns, respectively. Then we resize the sequence to contain a number of rows equal to the order of the regular polygon we want to create; plus one for closing the shape by having the first and last points coincide.

In the figure above we construct a regular triangular polygon, also known as the equilateral triangle. With four unique points we can construct a square, with five a pentagon, six a hexagon etc. Had we the ability to create infinite points, we would have constructed a unit circle. This is because the equation used is:

p( t ) = [ x, y, 0 ] = [ cos( t ), sin( t ), 0 ]

where “t” is a real number, the angle, in [0, 2π] and “p” or [ x, y, 0 ] is a point, or a vector from the origin, in the XY-plane.

This is known as the “parametric form” of the circle. Quite interestingly it captures better the notion of a point traversing or rotating about a fixed point and it has a computational flavour, you input one angle and output one point. Compare this to the “implicit form” of the circle f(x,y)=x2+y2=r2f( x, y ) = x2 + y2 = r2f(x,y)=x2+y2=r2, a relationship which requires the sums of squares of a pair of numbers i.e. the coordinates of point, to be constant i.e. to a distance squared i.e. the radius of the circle.

Geometric Transformations

The next task is to introduce a sense of generalization such that we can define the circle’s radius and origin. In other words, describe every possible circle in the the XY-plane. The way to archive this is by scaling the sine and cosine values by the radius “r” and adding a constant pair of “xo” and “yo” coordinates for translating by the center of the circle, for each point.

p( t ) = [ xo, yo, 0 ] + r * [ cos( t ), sin( t ), 0 ]

or

p( t ) = [ xo + r * cos( t ), yo + r * sin( t ), 0 ]

Below, we create a radius, x-offset, y-offset columns, constant for all rows. Then using the standard mechanism of composing complex expressions and expanding, we apply the formula for the point coordinates:

= concat( fixed( G2 + F2 * D2, 5 ), ",", fixed( H2 + F2 * E2, 5 ), ",0" )

The objective of this was to show how we can conceptually approach geometric transformations via arithmetic operations. Scaling directly maps to multiplication whereas translation maps to addition. Also if you noticed, the rules of scalar number addition and multiplication, apply verbatim to 3D points and vectors.

Practice

  • Update the table above such that for each regular polygon of unit radius, instead of always starting from [1, 0, 0], the polygon is oriented such that its bottom-most edge is horizontal.

  • Experiment with creating polygons that beyond control of scale (radius) and translation (centre point) we can also rotate them by an arbitrary angle.

  • Convert the above table such that instead of defining a polygon by the radius of its circumscribed circle, aka circumradius, we will define it by its side-length.

  • Compute the length of each polygon side, from its point coordinates, using the Pythagorean Theorem i.e. the Euclidean distance, and then sum them all together. What is the number approaching as we increase the number of polygon sides i.e. expanding all rows down?

  • So far we kept the radius constant. Assign it from the “time” column to produce a spiral. Apply other transformations to the radius to produce different types of spirals e.g. arithmetic, geometric, Archimedean, Fibonacci etc.

  • An ellipse is very similar geometrically to a circle. It is defined using two radii, one for the X-axis and one for the Y-axis. We call those major and minor radius. In fact a circle is a special case of an ellipse with equal major and minor radii. Modify the table to produce ellipses instead of circles.

The circumscribed circle for a regular polygon [] passes through its vertices []. Compute the points of the inscribed circle of the same regular polygon; the circle that passes pass through the middle of each edge.

>
>
Constructing an equilateral triangle
Plotting a unit circle
Reference image with formula