Skip to content

Dynamic Properties

Björn Aheimer edited this page Oct 23, 2024 · 2 revisions

The state of a polygon consists of its dynamic properties, i.e. its attributes that may change in every timestep of the physics simulation. We define a polygon's position $\vec{x} \in \R^{2}$ as the coordinates of its center of mass (centroid). Its rotation angle around its centroid $\theta \in \R$ is given in radians. The coordinates of the vertices are stored as body space vertices $\vec{v_i} \in \R^{2}$ in relation to the centroid. To obtain world space coordinates $\vec{p_i}$ of the vertices, rotation and translation are applied to the body space vertices. As the world space vertices are queried often, it has proven beneficial for performance to store the list of world space coordinates of the vertices as a polygon attribute that is recalculated whenever it is moved. Furthermore, polygons have a linear momentum $\vec{P} \in \R^{2}$ and an angular momentum $L \in \R$.

$\rightarrow$ Learn about the movement equations here.

Clone this wiki locally