 Alright, well thanks everybody for coming. This is joint work with Jacob Roos who's here in the audience over there and I'd like to talk to you after the session for all of the kind of open questions that remain because this is still very much research work. So first I'd like to talk a little bit about why do we even need a newsflime? Why is this an interesting problem to solve? And it really comes, this is mostly motivated by font design but I think that this line has application in other 2D illustration and perhaps other tasks like CAD and you know, self-driving vehicles as well and it really comes to limitations of busy curves. They're very expressive, it's a very powerful primitive for creating illustrations but it's not easy to learn, it's not intuitive by control and particularly within the context of making fonts and variable fonts that interpolation is a problem, that you can have two endpoints, you can have two masters that are smooth but then when you do the interpolation between them the the resulting set of curves is not continuous, is not smooth and forms a kink and this is something you can see in this example that if you have a interpolation between a condensed and extended you know, this is the kind of case that can happen. So there are many many interpolating splines in the literature and I'll talk about some of those a little bit. I think especially within the context of making fonts the best known interpolating spline is the hobby spline which is used in MetaFont. It's also used in Apple iWork you know keynote to do pen-based drawing so it has applications other than just fonts and it has some really nice properties. Mathematically it's very very solid work and in particular the solver always finds a solution to the spline. It never like runs away or fails to converge but there are things to not like about it so much that when you push it hard you get kind of ugly shapes and it has the splitting behavior which hopefully this will work and I'll be able to to demonstrate it. This is a online implementation by Edmund Weiss and so you know you place points down and what an interpolating spline means is that the spline goes through the points there are no off-curve points that you know control the curve. It's all on-curve points and then when you move it you can see this kind of global behavior that moving this point affects the entire curve but then when you start to push it you get these ugly shapes you get these curvature maxima that are not near the control points you if you have a curvature maximum you really want it to be on the control point because it's salient to the curve and then if you keep pushing it it's going to flip and when you're just sketching when you're in an interactive application that behavior is kind of unexpected it's it's not a pleasant experience it doesn't I feel like it doesn't help the creative process to have this kind of flipping behavior where it's sort of changing phase from from one thing to another. So you know I think the hobby spline is very interesting but I feel like it is still perhaps not the ideal spline. So another spline in the literature is the spiral spline which I did 2007 and this is based on the Euler spiral spline like when I came up with it I hadn't you know done a full literature search and then I found it but this KERGLA project is from the Norwegian Shipbuilding Institute or whatever and that they were looking for like traditionally with the shipbuilding you use a wooden spline you bend a flexible strip and you constrain it to where it needs to go and then you draw the smooth line there and they were looking for the kind of computer equivalent of that and they they came up with this spiral using the Euler spiral as the primitive curve and it works pretty well. The font in Consolata was designed entirely using this spline as the drawing tool it's also been implemented in font forge and Xcave and I'm sure there's other source graphics projects that use it in one form or another and the smooth the spline has very smooth curvature you can it's almost defined by having really smooth curvature of being very close to a circular arc if the points are you know arranged in a circular arc. There are also drawbacks there are disadvantages and anybody who has played with a spiral spline if you move the points around it sometimes completely fails and makes these wild you know the original version makes patterns that look like a particle accelerator a physics experiment and I think there are other things about the spiral spline that you know the user interface there's never been a version of the spiral spline that has a really clean nice natural feeling user interface I think some of that is because the user interface work hasn't been done and some of it is that there are properties of the spline itself that make it difficult to develop a good user experience on top of it. So I'll give you a quick demo of this also and so now you can see these kind of very circle-like shapes and then when you do the same thing where you push it that this is actually the solver in this yeah so you see the same flipping behavior as the hobby spline and then yeah there you go that the solver is completely failing to solve the constraints this is really written in terms of constraints and so the red is saying well I'm not solving it but I'm going to give you my closest approximation and again if you're in a really kind of creative sketching you just want to make a lot of shapes and you're looking at the solver that's like jittering and you know throwing all these things at you that's also a really bad experience and I think this is one of the reasons why this virus plane has never achieved a kind of really good amount of usage. So a couple of years ago Adobe published a paper on what they call kappa curves and this is related somehow to the curvature tool that shifts in Adobe Illustrator although I should caution that what's in the paper is one thing and what's in Adobe Illustrator is another thing and to understand the relationship between those two is very difficult because that has that has never been documented there is no explanation of what's actually in Adobe Illustrator so when I criticize the kappa curve tool I will be very clear that I'm criticizing the version that's in the paper and this is a very interesting spline it solves the numerical robustness problem there is always a solution and always a unique solution and more than that it has this property that every time you move a control point by a small amount it only changes the resulting curve by a small amount so there's a sort of a robustness to this which is very deep now everything in splines is a trade-off and so you don't get curvature smoothness as smooth as an Euler spiral spline and instead you get these cusps and I'll I'm talking about here I'll show you and a little bit and then as I say the version in the paper is entirely based on quadratic disier parabola segments and that has a lot of serious disadvantages you can't make a true s shape it doesn't go perfectly through an inflection point and it doesn't make a circle so when you approximate a circle it's like lumpy and you can really you compare it you can say this is really not good enough to do font drawing the version the version in the paper so you know I the the spiral work was part of my PhD and I think that one of the more valuable contributions to take from the PhD even if you don't like the spline that it presented is this analytical framework that I call two parameter splines and the idea is that you have a curve family that is described by two parameters and so that's the angle on the left side of the curve and the angle on the right side of the curve and and then you take these segments and you rotate and scale them into place so that they form the curve so that the curvature is continuous the tangent and the curvature is continuous across each control point and in fact that defines the spline if you say take this per family and solve the tangents at the the at each control point so that the curvature of the resulting spline is continuous that is the definition of a spline and it's interesting that that solving that doing that kind of numerical solution really only depends on the curvature the shape in the middle can do anything it's like it likes it's only using the curvature of the end points to define the behavior of the spline so this is a framework within this framework of two parameters you can have different curves and those different curves have different behavior and different appearance and in this particular case the the green is adobe apocurs the red is a oiler spiral and the blue is the new spline that I'm proposing and this is showing you a two-dimensional parameter space and you don't have to understand this this is just you know illustrating this concept of a parameter space and then being able to instantiate it with different curves and when you take this framework this one I think unifying framework and you instantiate it with different curves you get splines with quite different and quite interesting properties so one possibility is if you instantiate this curve with what's called the elastica which represents the bending of idealized thin strips and that gives you the minimum energy curves spline which is optimum with respect to this particular energy metric but has a lot of other properties that are not very good so there isn't there are attempts to like fix that to still use something based on this elastica concept this bending energy concept and so there's a scale invariant version which you know is closer to a circle and so on and so forth that was actually the first version used in the Norwegian shipbuilding project before they found the oiler spiral there is the oiler spiral in this family there's a variance of the oiler spiral like the log aesthetic trying to kind of tune and tweak there's the circle spline and then one of the interesting things is this wasn't in the paper but when I read the paper I realized that Adobe Capacurves actually fall into this two parameter framework that you can say that this segment that's defined by two parabolas is a curve that you can drop into this framework and you get a spline and then the hubby spline almost falls into this framework because the curvature is is an approximate it's not an exact curvature it's an approximate curvature so it has the flavor of being in the two parameter family about quite exactly being in there so you get different properties when you use a different curve you get different properties so the elastica you get minimum energy there's many of them have this roundness property which means if you place points around a circle you get a circular arc locality is this property about moving a point somewhere in the middle and how far does it ripple out and the circle spline has a very good locality property where it does not ripple out and then some of the splines but not all of them have this unique solution property where there is always one solution to the spline and therefore it is more robust and so the Capacurves and the hubby spline have this property actually the circle spline as well but certainly the oiler spiral and some of these others do not have that property so there's other properties we can talk about there's a list of them in the thesis you can you can go through that but I think the kind of a the takeaway lesson here is you know I searched for the one true spline that would do everything perfectly and within this two-parameter framework it's clear that does not exist instead it is a trade-off space where you decide what properties do I want and then when you know that then you have you can choose a spline you can choose a curve family that will give you the spline you want so the properties I want today are the robustness of the adobe Capacurves and maybe not all of but most of the smoothness of the spiral or oiler spiral spline and is this possible can I combine these can I get both of these properties in the same spline and I think this is the this is the kind of central research question that I'm addressing and the answer is yes assuming it loads I don't think I've solved the problem of flaking network there we go the grid there's a grid on there but the beamer is not showing okay I can see I was hoping I was going to do like a live coding of drawing a letter that with this this angle see me afterwards I'll happily draw a shape but now you get a sense of the way that this is performing especially when you push it that it's not doing that flipping and it's you know it's robust that a small change to the control point is a small change to the spline but we are getting those cuffs we're getting those regions of high curvature which certainly the oiler spiral spline the spiral spline does not do so it has behavior that is more like the Capacurve in that way but I but has smoothness that is certainly significantly better than the paper um so again this is an online demo and please feel free to play with it and I will talk about some other aspects of this design so the the project that I did in December which is what you saw is not is not perfect this move this is not as good as it can be and I spent a lot of time and here Jacob and I were trying to collaborate on this to find a mathematical expression that would capture this trade-off of smoothness and robustness and never quite figured out how to do that and so I said let's treat this as a design problem let's treat this the way that a font designer would do it where you have a parameter space just make a lot of masters and interpolate and so with symmetries and so on you don't need very many masters like I think 49 is actually the number that I want and just to keep things simple and to keep things efficient each master is defined in terms of two cubic bezies and so the idea is that you can use this tool and then so here you can again see the two parameter have one parameter of the angle on the left side one parameter of the angle on the right side and this is interpolating through that space the curve at the bottom is a curvature flag and then if I don't like it if I think it's a little bit you know it should be smoother then I can go into the bezies and edit those and hopefully achieve like a smoother you know closer to a linear curvature relationship so the idea is to use this tool to define the spline and tune like you can tweak it you can make it do what you like and when you're done you do save and you get this JSON file which is you know mostly just a lot of numbers and then you this part is not done yet but the idea is you take that and you plug it into the spline and and then you get to see how does it perform how does it behave and one idea of having this tool available is to encourage experimentation do different people want to in different ways or will there be a consensus yes this particular point in the trade-off space between smoothness and robustness and whatever other properties is actually what we all want to use to draw another problem that Spyro solves is straight to curve transitions but you want to go from a straight line to a curved line but you don't want to just attach a circular arc because that will be very rough and so Spyro use this concept of one-way constraints which solve the problem very nicely but the UX was very difficult that you had to control like which direction does it go and it was not a very natural user experience at all so that was an unsatisfying aspect to that and in the new spline I have a different approach which is using these tangent constraints you go on to the point you say I want to point this direction and if it points the same direction as in the joining line then you still have that smooth straight to curve transition where the curvature ramps up slowly from from zero and then the same user interface element is also useful for setting the tangents at extreme up which is very important for Fox you don't want it to bubble slightly past the point you know if that's the baseline alignment zone and Spyro did not have a mechanism for this so you had to kind of fill it by hand so I think that this one mechanism is useful for both of these features so this is still research in progress it's not done this will be I hope the main drawing tool in the upcoming Runebender font editor you saw a very early preview yesterday that was still busy based but this is a next step is to integrate this line there's more work that needs to be done on implementation the solver is like 99% robust let's get that last 1% re-implement it this is the prototype is in JavaScript I want to do it in Rastore maybe see which might help some other open-source projects the tangent constraints are not perfect they need to be fine tuned I want this answer to this question of is there one tuning or many we need to do real user interface work how do you draw naturally how do you enable a creative flow because I feel like that really has not been done with these lines the work is all under permissive license I was seeking patents they're all in the public and then I want to thank Google for funding this work that will that will be able to work on full-time thanks very much