Contributor
Siddharth Banga

Doodle Canvas


Mentors
Noel Welsh
Organization
Scala Center
Technologies
scala, scala.js
Topics
graphics
Doodle is a Scala library for 2D graphics, animation, data visualization, and creative coding. It supports JVM-based applications, utilizing Java2D for rendering, and for web browsers through SVG support. The library operates on a principle of composition (i.e Retained mode), enabling users to craft visuals by combining various elements. Doodle supports differences between backends through its tagless final architecture. Doodle currently supports retained mode graphics. Retained mode graphics involve representing the image as a data structure, creating a hierarchy of elements where each element relates to others. While this facilitates expressing parts of the image in terms of others, it poses challenges with large numbers of elements, making alignment difficult and memory usage proportional to the number of elements. On the other hand, immediate mode graphics represent the image as a function for drawing it. This method consumes memory proportional to the algorithmic complexity (Kolmogorov complexity) of describing the image. In immediate mode, we can have a single drawing context and can be used for high volume graphics. This enhancement will allow for more interactive experiences, opening up new possibilities for creative expression and application development. Further on, we wish to add advantages of the immediate mode, while retaining the advantages of retained mode. Combining both the methods can be very crucial for the developer willing to involve both the modes in a single method.