1.4. Essential Maths
Basic Arithmetic in Computational Design
Foundational mathematical concepts essential to develop computational methods for 3D modeling and computer graphics.
Cartesian Coordinate System
Specifies each Point uniquely in a Plane by a set of numerical coordinates, which are the signed distances to the point from two fixed perpendicular oriented lines, measured in the same unit of length.
$$ d = \sqrt{x^{2}+y^{2}} $$
Pythagorean Theorem
Is a fundamental relation in Euclidean geometry among the three sides of a right triangle. It states that the area of the square whose side is the hypotenuse (the side opposite the right angle) is equal to the sum of the areas of the squares on the other two sides.
This theorem can be written as an equation relating the lengths of the sides a, b and c, often called the “Pythagorean equation”.
$$ c^{2} = a^{2}+b^{2} $$
$$ c = \sqrt{a^{2}+b^{2}} $$
Example
2D Functions
Change the values of the functions or substitute them by other equations:
$$ y = sin(x) $$
$$ y = cos (x) $$
$$ y = tan(x) $$
Degrees VS Radians
Radians are a different way to measure angles, but you may be more familiar with degrees.
Radians are a form of angle measurement. Just like there are 360° in one full rotation of a circle, there are 2π radians.
Sine | Cosine |
---|---|
sin(0) = 0 | cos(0) = 1 |
sin(90) = 1 | cos(90) = 0 |
sin(180) = 0 | cos (180) = -1 |
sin(270) = -1 | cos (270) = 0 |
sin(360) = 0 | cos (360) = 1 |
Polar Coordinate System
Is a 2D Coordinate System in which each Point on a Plane is determined by a distance from a reference point and an angle from a reference direction.
The reference point (the origin) is called the pole, and the ray from the pole in the reference direction is the polar axis. The distance from the pole is called radius, and the angle is called polar angle.
The radial coordinate is often denoted by r or ρ, and the angular coordinate by φ, θ, or t.
Angles in polar notation are generally expressed in either Degrees or Radians.
Polar to Cartesian
The polar coordinates r and θ can be converted to the Cartesian coordinates x and y by using the trigonometric functions sine and cosine:
Example
Polar mapping
Press FULL SCREEN and use the arrow keys to change the polar mapping in a circle:
RIGHT = Next pattern
LEFT = Prev pattern
UP = Next “new” pattern
DOWN = Prev “new” pattern
SPACE = Pause
Cylindrical Coordinate System
Is a 3D coordinate system that specifies point positions by the distance from a chosen reference axis, the direction from the axis relative to a chosen reference direction, and the distance from a chosen reference plane perpendicular to the axis.
Example
Cylindrical Mapping
Press FULL SCREEN and use the arrow keys to change the cylindrical mapping in a cylinder:
RIGHT = Next pattern
LEFT = Prev pattern
UP = Next “new” pattern
DOWN = Prev “new” pattern
SPACE = Pause
Spherical Coordinate System
Is a 3D coordinate system where the position of a point is specified by three numbers: the radial distance of that point from a fixed origin, its polar angle measured from a fixed zenith direction, and the azimuthal angle of its orthogonal projection on a reference plane that passes through the origin and is orthogonal to the zenith, measured from a fixed reference direction on that plane.
It can be seen as the three-dimensional version of the polar coordinate system.
Example
Spherical Mapping
Press FULL SCREEN and use the arrow keys to change the spherical mapping in a sphere:
RIGHT = Next pattern
LEFT = Prev pattern
UP = Next “new” pattern
DOWN = Prev “new” pattern
SPACE = Pause