31 Mayıs 2016 Salı

Daily Update 5

As I mentioned earlier, I spent my time today on text rendering and importing image files. I built a small resource management system to make things easier when loading files from scripts. There are a few rough edges in the rendering, for instance, vectorized text does not interact with path operations I wrote for geometric shapes earlier. I'll fix these later to make the system more consistent.

30 Mayıs 2016 Pazartesi

Daily Update 4

I spent a lot of time today working on more higher level features for the renderer. I interfaced different types of parametrized compound curves. Implemented composed paths and some area combination functions typically found in vector graphics editors. I implemented nestable groups and geometric transformations for more complex operations. I did a lot of testing and fixed some hidden bugs mostly relating to the maths.

I again prepared a simple GIF demonstrating some features I spent the day on, showing how a relatively complicated 2D curve is parametrized by two sinusoidal components, visualized by the rotating circles. It shows how applying transformations to grouped objects can be helpful.
Parametrizing a curve.
I'll spend one or two more days on static drawing features, perhaps implement vectorized text and imported images. Then, hopefully, I'll complete this week by coding more dynamic components like parametrized motion tweens, keeping up with my schedule.


26 Mayıs 2016 Perşembe

Daily Update 3

Today was a relatively slow day: I mostly worked on details in the background. I implemented primitive error reporting for scripts, to be improved in the future for a more user-friendly interface. Altered how transformations are applied, in preparation for composite/grouped objects. I also spent time on some convenience functions for utilizing primitives in scripts.

Going with my mentor's advice, I've decided to stay more focused and push the core functionality first. So I postponed secondary tasks like GIF compression and antialiasing until the fourth week, when I'll have mostly completed animation scripting features according to my GSoC proposal.

25 Mayıs 2016 Çarşamba

Daily Update 2

Today I continued implementing scripting functionality. Tidied up the code from yesterday a bit, made some alterations in the class hierarchy for renderable objects. Added some more geometric primitives (circles, polygons) and laid the groundwork for more control over strokes and fills of each shape. I also worked on geometric transformations, but these aren't reflected to the JavaScript side yet.

24 Mayıs 2016 Salı

Daily Update 1


In the last few days I've worked on coding the skeleton of the program, and on how the JavaScript code is handled behind the scenes. I implemented line primitives, and other geometric shapes should be quite easy to add in the upcoming days. I also wrote a GIF encoder using Java's standard library, but there is still room for improvement, the GIFs produced aren't really optimized for size.

After coding the functionality, I wrote my first script, a spinning cube.

Spinning cube, generated with GIFScript [code]
Of course, the 3D math is dealt by the script itself as a demonstration, there is no built-in support for 3D at this time. But trying to code the cube, I realised that a higher level mathematics library would be very useful. I'll work on embedding a JavaScript math library (maybe math.js or "numbers") into the GIFScript environment. I also realised I'll have to add some anti-aliasing, primitive shapes tend to look ugly right now.

16 Mayıs 2016 Pazartesi

Current progress

As the coding period will start next week, I'm mostly going through documentation these days to familiarize myself with the libraries I will be using. My finals are just over, and I've spent most of my last days learning how to use Nashorn, coding small samples involving scripts along the way. I'm also reading through Java's image processing functionality.

In the upcoming days, I'm planning to start working on a prototype, to demonstrate the concept and also to discover the technical challenges involved in the project I might have missed. The goal is to complete a minimal version before this Friday, and hopefully display a few primitive GIFs myself. I imagine the project becoming more persuasive once I get some concrete product.

About GIFScript

This summer I'll be working on "GIFScript" for GSoC. GIFScript will be a tool for generating animated images from scripts, providing a way to create expressive animations by writing code, hopefully with minimal design loads. The users will use a flavoured version of JavaScript to enter the code, which will then be translated in the background into a GIF file.

The motivation behind GIFScript is that some animations are quite difficult to produce using traditional design tools with point-and-click interfaces, whereas they can be constructed relatively simply from their underlying mathematical ideas. On the other hand, these animations have unparalleled expressiveness in conveying abstract ideas, especially in more "mathematical" fields. GIFScript aims to provide technically oriented people who would need such GIFs greater expressive power, as it reduces the design process to writing code.
Demonstrating quicksort. [1]
Wikipedia, with an incredible library of fascinating technical animations was a source of inspiration for me, and I think there are quite a few worth sharing here, to prove the point.
Decomposing a function into its Fourier series. [2]
Mathematics and computer science aren't the only fields which could benefit from GIFScript. Any field of activity which can be visualized could go well with GIFScript. If designed well, GIFScript could be used to animate physical wavefunctions (which are quite interesting to watch actually), biological processes, chemical reactions or even more trivial things like animating the first few moves of a game of Go or chess.
Quantum tunneling, a particle interacts with a "wall". [3]
One planned feature I think will be useful in this aspect will be creating and sharing "modules", like libraries for GIFScript. User created modules will be packages containing visual assets (image files) and Javascript code, tailored for specific animation needs. For instance there could be a module for animating geometry on the 2D plane, one for chemical reactions and another just for scripting/animating sort algorithms.
Drawing a hypocycloid. [4]
So rapid production and practicality is key for GIFScript, all achieved while maintaining the flexibility and expressiveness required from visual designs.  Creating GIFs with the tool should be significantly easier than than they are with traditional tools to make using the tool meaningful. This part is quite challenging to get right, but I hope at the end the tool will achieve its goals with the help of the feedback I receive from potential users.

Sources:

[1] Wikipedia, en:User:RolandH, link
[2] Wikpedia, User:LucasVB, link
[3] Wikipedia, User:Yuvalr, link
[4] Sam Derbyshire at the English language Wikipedia