0. What is Monocurl?
Could you imagine such animations being the entirety of your slideshow? That was my motivation for Monocurl.
Monocurl is a desktop application that allows you to create videos and slideshow presentations using math. In particular, it is targetted towards STEM explanatory content and related fields. The core idea of Monocurl is to combine the benefits of programmatic animations with the traditional feel of a video editor. We'll explain what we mean by this in the rest of this section.
YouTube Channel. Finally, please give feedback or ask for help in our Discord Server.
The entire article series should take roughly an hour to go through, but definitely feel free to skim certain parts and come back to them when you need to. Also, there are video versions as well on our0.1 Minimal Working Example
The following code is a working example of showing a circle to the screen and having it fade out.
tree circ = Circle:
center: ORIGIN
radius: 1
tag: {}
color: default
p += Set:
vars&: circ
circ = {}
p += Fade:
meshes&: circ
time: 1
Heres how it should look like in the editor:
And the result:
0.2 (Optional) Mathematical Perspective
From a math perspective, an animation is nothing more than a mapping from the positive real numbers (time) to mesh-space (basically images). Creating an animation, then, is nothing more than finding such a function.
In fact, we can make an even stronger statment. Typically, animations can be broken up into several keyframes, and all other frames are interpolated (basically blended) from these keyframes. We'll explore how Monocurl is all about how transformations and interpolations of properties. In particular, Monocurl uses a specially designed programming language so that your job is to create the keyframes using math, and Monocurl handles the interpolation for you.
REMARK The math side of Monocurl is heavily inspired from Manim.
0.3 (Optional) Video Editor Perspective
Finally, we try to bring the benefits of a traditional video editor to Monocurl. First and foremost, having live preview and the ability to quickly scroll between different timestamps is a huge time saver.
Also, the language itself is designed so that property values are easy to read (notice the resemblance to something like After Effects?).
Finally, the structure of Monocurl is that any video is composed into a series of "slides," where you specify the animations for that particular section. This lends to an easy process of converting videos to slideshow presentations (in fact, the conversion is trivial!).
0.4 High Level Overview
At a very high level:
- Monocurl has a custom designed scripting language that makes it very easy to interpolate between different objects by recursively interpolating their attributes.
- To actually create objects that we can have on screen, we have primitive meshes and mesh operators.
- Animations are what actually drive the motion of meshes and control the flow of items on screen.
- Monocurl divides a scene into a series of slides. In each slide, a collection of animations are run.
If this doesn't make a lot of sense, that's definitely okay! We'll explore the details soon.
0.5 Reading the Lessons
We try to label different sections of the lessons so you can identify what to skim and what to pay attention to. In general, sections marked DEFINITION are the most important, followed by IMPORTANT sections. Sections marked (Optional)
or REMARK specify some language decisions, but are not that practical so feel free to skim. Sections marked give guidance on the content of a lesson.
0.6 Conclusion
That was a very rough introduction to Monocurl. We'll now explore the basics of the language, then talk about meshes, and finally spend a considerable time on the animation system. The ideas of Monocurl aren't actually that complex, however there are important details and perspectives so you are encouraged to read the lessons with care.