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
  • Overview
  • Modelling Entities
  • Model Setup
  • Serialization
  1. SESSION 5A

Modelling entities 1

Projectile physics

PreviousSpace and time 2NextModelling entities 2

Last updated 8 months ago

In this session we will develop the core process blocks for our physics engine. We will explore the notion of dimensionless bodies or particles, perform force analysis and motion state integration. The graph below captures the high-level composition of the simulation building blocks.

The key aspect to consider here is that while we will be using physics as our primary modelling interface, the desire is not necessarily to study physics. Physics is just a tool for modelling behaviours. We wish to create models that contain entities interacting with one another, each having its own agenda and desires and resolving constraints using the notion of minimizing effort and finding equilibrium. While initially we will be faithful to the law of physics, we will eventually start making our own laws.

Overview

The simulation is comprised of several regions including: ▊Setup Model: contains the definition of the model’s initial conditions; ▊Simulation Controller: manages data and time; ▊Visualization: displays various geometric and physical properties; ▊Physics Logic: which further break down to force analysis, state integration and constraint enforcement.

Modelling Entities

The simulation logic is based on dimensionless bodies also known as particles. When defining new computational entities we need to carefully decide what is the essential information related to the object we wish to describe. Particles at the most basic level require: Position: expressed as points in metric space units such as meters, Velocity: expressed as vectors in metric space per unit of time, such as meters per second; and Mass: expressed as scalars in mass units eg. kilograms. Those properties is what we wish to capture over time. We call this group of properties the particle’s state.

Model Setup

From a technical perspective there is nothing complicated taking place here. We just create three positions, three velocities and three masses and package them in lists using the “merge” component. Those define the particle’s states which we package with a special cluster component.

Serialization

Earlier we discusses serialization for building a ticking clock. We need to expand those concepts as we wish to propagate the particle’s states instead of a simple integer across time. The goal is to pack particle’s properties into text and later on unpack them back into positions, velocities and masses.

Packing Logic

Packing complex data into text requires establishing conventions such that we can perform conversion unambiguously and fast. We already encountered the case of spreadsheets coping data into the clipboard using the “tab” as column delimiter and “new line” as row separator; as well as the CAD application’s command line interface using “,” as point coordinate delimiter and ” ” as instruction separator.

The graph below replicates the same concept: we pack particle states by first building a table of numeric values from the position coordinates, velocity components and masses; and then convert into text by inserting special characters between the text representation of those numbers, to denote column and row separation.

We use entwine and transpose such that each row of the table contains one particle. The seven columns (3x position + 3x velocity + 1x mass) are concatenated using the “join” component with a comma “,” as delimiter. Rows are then fused using the semi-colon “;” as separator. The figure below shows the interim values produced.

Below are some examples of concatenating multiple fragments of text using various delimiters between entries.

Unpacking Logic

Unpacking represents the symmetric opposite of packing. We expect a text value and we decompose it into parts which are converted to numbers and then into complex data types such as points and vectors. The process of splitting a text string is also known as parsing and the fragments produced as tokens.

We use the “text split” component to reverse the operation of “text join”. The process is performed in reverse i.e. first we break the text into rows using the semi-colon “;” separator and then into columns using the comma “,” delimiter. To assemble the data we use the “list item” component and the requisite point and vector constructors.

Practice

The model setup defines three unit mass particles all positioned at [0, 0, 0] but with different initial velocities. While all particle velocities are in speed sense 15 m/s their angle from the horizontal varies between 30, 45 and 60 degrees. This simple scenario is inspired by the potato cannon 2D freshmore design assignment which started back in 2012 at the Dover SUTD campus [].

Experiment with packing and unpacking data using various delimiters. Note that the “new line” is captured using one or two characters including “carriage return” and “new line” [] so be careful.

Try to develop as serialization strategy such that you can import/export point data to and from spreadsheets using comma separated values [].

>
>
>
Overview of graph
Blocks colour-coded by functionality
Use of Entwine and Transpose (Flip Matrix) components
Drawing
Drawing