Abstract
The design of most 2D graphics frameworks has been guided by what the computer can draw efficiently, instead of by how graphics can best be expressed and composed. As a result, such frameworks restrict expressivity by providing a limited set of shape primitives, a limited set of textures and only affine transformations. For example, non-affine transformations can only be added by invasive modification or complex tricks rather than by simple composition. More general frameworks exist, but they make it harder to describe and analyze shapes. We present a new declarative approach to resolution-independent 2D graphics that generalizes and simplifies the functionality of traditional frameworks, while preserving their efficiency. As a real-world example, we show the implementation of a form of focus+context lenses that gives better image quality and better performance than the state-of-the-art solution at a fraction of the code. Our approach can serve as a versatile foundation for the creation of advanced graphics and higher level frameworks.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Klint, P., Lisser, B., van der Ploeg, A.: Towards a one-stop-shop for analysis, transformation and visualization of software. In: Sloane, A., Aßmann, U. (eds.) SLE 2011. LNCS, vol. 6940, pp. 1–18. Springer, Heidelberg (2012)
Karczmarczuk, J.: Functional approach to texture generation. In: Adsul, B., Ramakrishnan, C.R. (eds.) PADL 2002. LNCS, vol. 2257, pp. 225–242. Springer, Heidelberg (2002)
Hoffmann, C.M.: Implicit curves and surfaces in CAGD. IEEE Computer Graphics and Applications 13, 79–88 (1993)
Sederberg, T.W., Anderson, D.C., Goldman, R.N.: Implicit representation of parametric curves and surfaces. Computer Vision, Graphics, and Image Processing 28(1), 72–84 (1984)
Dokken, T., Thomassen, J.: Overview of approximate implicitization. In: Topics in Algebraic Geometry and Geometric modelling. AMS series on Contemporary Mathematics CONM 334, vol. 28(1), pp. 169–184 (2003)
Elliott, C.: Functional image synthesis. In: Proceedings of Bridges (2001)
Finne, S., Jones, S.P.: Pictures: A simple structured graphics model. In: Glasgow Functional Programming Workshop, Ullapool (1995)
Matlage, K., Gill, A.: ChalkBoard: Mapping functions to polygons. In: Morazán, M.T., Scholz, S.-B. (eds.) IFL 2009. LNCS, vol. 6041, pp. 55–71. Springer, Heidelberg (2010)
Elliott, C.: Programming graphics processors functionally. In: Proceedings of the 2004 ACM SIGPLAN Workshop on Haskell 2004, pp. 45–56. ACM, New York (2004)
Karczmarczuk, J.: Geometric modelling in functional style. In: Proceedings of the III Latino-American Workshop on Functional Programming, CLAPF 1999, pp. 8–9 (1999)
Casciola, G., Morigi, S.: Reparametrization of NURBS curves. International Journal of Shape Modeling 2, 103–116 (1996)
Ma, Y.L., Hewitt, W.T.: Point inversion and projection for NURBS curves and surfaces: control polygon approach. Comput. Aided Geom. Des. 20(2), 79–99 (2003)
Schneider, P.J.: An algorithm for automatically fitting digitized curves. In: Glassner, A.S. (ed.) Graphics gems, pp. 612–626. Academic Press Professional, Inc., San Diego (1990)
Elliott, C.: Beautiful differentiation. In: International Conference on Functional Programming, ICFP (2009)
Carpendale, M.S.T., Montagnese, C.: A framework for unifying presentation space. In: Proceedings of the 14th Annual ACM Symposium on User Interface Software and Technology, UIST 2001, pp. 61–70. ACM, New York (2001)
Pietriga, E., Bau, O., Appert, C.: Representation-independent in-place magnification with Sigma lenses. IEEE Transactions on Visualization and Computer Graphics 16, 455–467 (2010)
Pietriga, E.: A Toolkit for Addressing HCI Issues in Visual Language Environments. In: IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC), pp. 145–152 (2005)
Ragan-Kelley, J., Adams, A., Paris, S., Levoy, M., Amarasinghe, S., Durand, F.: Decoupling algorithms from schedules for easy optimization of image processing pipelines. ACM Transactions on Graphics 31(4), 32 (2012)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Klint, P., van der Ploeg, A. (2013). A Library for Declarative Resolution-Independent 2D Graphics. In: Sagonas, K. (eds) Practical Aspects of Declarative Languages. PADL 2013. Lecture Notes in Computer Science, vol 7752. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-45284-0_1
Download citation
DOI: https://doi.org/10.1007/978-3-642-45284-0_1
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-45283-3
Online ISBN: 978-3-642-45284-0
eBook Packages: Computer ScienceComputer Science (R0)