galacticglum / mathanim

A tool for creating stylized maths presentations.
GNU Lesser General Public License v3.0
1 stars 0 forks source link

Use timecodes for timing #1

Open galacticglum opened 4 years ago

galacticglum commented 4 years ago

Currently, all timing is done in seconds. However, this can be imprecise when we are dealing with very precise time measurements. Instead, timecodes should be used that support hours, minutes, second, and frames.

galacticglum commented 4 years ago

To do this successfully, we need an FPS independent implementation of timecode arithmetic. This can be done by storing the computation stack of each timecode (at least only for multiplication and division; addition and subtraction arithmetic can just be expanded to the components of the timecode). While it is memory heavy, it will ensure that timing can be represented with as much precision as the user wants (from frame to hours) while also meaning that FPS must only need to be known at render time.