Progress Report #7 - Alain Fournier Award, and Work on Undo, Redo, Save, and Open

April 16, 2018

Here is finally the video report for the month of March!

https://www.youtube.com/watch?v=ZPvalJygz1Y

Once again, thank you so so much for your support, and especially to all new sponsors! Since October 2017, after deducting all fees, I have received from you a total of more than 1000€ (~$1200), which really helps :)

Cheers!

Boris

VIDEO TRANSCRIPT:

Alright, let's see what happened in March! I'll start by sharing some great news, then talk about the Undo, Redo, Save, and Open features, and finally I will show some drawings made with VGC Illustration.

So yeah, first of all, I have been awarded the 2017 Alain Fournier Award for best Canadian Computer Graphics PhD Dissertation. What this means is that the scientific community clearly recognizes that the work I'm doing in VGC is an important step forward in the field. I quote:

« Vector graphics is a core technology at the heart of many well-established drawing tools and other software. While vector graphics geometry can be edited with relative ease, the support for topological changes has been very limited so far. Dalstein’s beautifully illustrated dissertation raises the community’s attention to this important problem and presents insightful solutions built on top of mathematically rigorous foundations. »

This recognition should bring a lot of exposure to this project, which is great, and even more so that as a result of the award, I'm invited to give a 30min presentation of my work at the Graphics Interface conference in Toronto, on May 9.

Oh, and by the way, the PhD dissertation for which I am given the award can be freely downloaded at this link:

https://www.borisdalstein.com/research/phd/

which I am going to put down below as well. It is quite technical but you might enjoy to read the introduction chapter and history of computer graphics chapter

Ok, let's talk about VGC features now. I have been making some progress in implementing Undo, Redo, Save, and Open features, although actually, none of them are finished yet, so I still have to work more on them.

The first important decision was the file format. Like in VPaint, I decided to use XML files to save the documents. I took some time to carefully consider whether to use XML, or JSON, or maybe a custom file format like USD that they use at Pixar. But at the end of the day, I decided to stick with XML, mostly for its ability to be embedded in a HTML web page.

However the issue with XML in our use case, and the reason why I was kind of reluctant to use it, is that it's not great to represent animated data. For example in SVG, if you consider this rectangle:

<rect
   x="300"
   y="100"
   width="300"
   height="100"
   fill="rgb(255,255,0)"/>

and you'd like to animate its x and y attributes, then you need to add child elements like so:

<rect
  x="300"
   y="100"
   width="300"
   height="100"
   fill="rgb(255,255,0)">
 <animate
     attributeName="x"
     attributeType="XML"
     begin="0s"
     dur="1s"
     fill="freeze"
     from="300"
     to="350"/>
 <animate
     attributeName="y"
     attributeType="XML"
     begin="0s"
     dur="1s"
     fill="freeze"
     from="100"
     to="150"/>
</rect>

Not only this is verbose, memory inefficient, and has poor performance, but in my opinion it doesn't even make sense semantically. So this is why I decided to design a new syntax to animate attributes, which would look more like this:

<rect
   x="{0: 300; 24: 350}"
   y="{0: 100; 24: 150}"
   width="300"
   height="100"
   fill="rgb(255,255,0)"/>

In other words, attributes are animated in-place, by specifying keyframes where the attribute is defined. I'm going to leave the exact specifications of this syntax for later since I'm not going to implement animation before a few months anyway, but I just wanted to make sure that the choice of XML would not be a problem for later.

Finally, in order to implement undo and redo efficiently, I needed a good way to represent this XML document in memory. So I had to take some time to carefully read the W3C XML DOM specifications, and I have started to implement a version of these specifications, but with a few little differences. The reason for these differences is that in animation, you might have hundreds of thousands of strokes, and XML DOM wasn't really designed for real-time editing of so many XML elements, so we need to do something slightly different.

Alright, let's stop being technical and just show some drawings I made with VGC Illustration a few weeks ago! Oh and by the way, you remember that bug I mentioned in the last video about the ugly end of strokes? I finally fixed this bug, so now the strokes look good, even the end of them.

Alright, that's it for this month! Thanks you for watching, and see you next time!

Stay tuned

Found this news interesting? We can send the next ones straight to your inbox (around twice a month). Or we can simply let you know when VGC 1.0 is released. No spam guaranteed. You can unsubscribe at any time.