Visualization by Coding: Drawing Simple Shapes and Forms in Various Programming Languages

Visualization by Coding: Drawing Simple Shapes and Forms in Various Programming Languages

Anna Ursyn (University of Northern Colorado, USA) and Mehrgan Mostowfi (University of Northern Colorado, USA)
DOI: 10.4018/978-1-4666-8142-2.ch008
OnDemand PDF Download:
No Current Special Offers


The authors present image transformations that allow for checking and better understanding the graphical capacities of various languages and the place of programming in artistic production. The goal of this tutorial-style chapter is to introduce curious artists to basic programming concepts such as variables, arrays, loops, condition structures, classes, and functions through coding visualization of a simple 2-dimensional shape, a horse rider. At the same time, the goal is to make computer scientists more comfortable with the visual ways of dealing with concepts and objects to be programmed. How more complicated digital art can be produced through transformation using programming is also briefly discussed. Pointers to more advanced artistic techniques are also given. These techniques use transformations of code-driven lines to turn them into sculptures, photo silkscreens, photolithographs, knitted fractals, etc.
Chapter Preview


The gap between art and programming seems to be a pressing issue. In particular, industries where the combination of these capabilities is beneficial, such as the game development industry, are in need of a new role called a “technical artist.” We believe that exposing artists to the fundamentals of programming through a familiar concept (an artistic shape) can be a first step to bridge this code/art divide. In this chapter, we examine ways to use various programming languages in order to set up an environment for a programmer and explain routines and available shortcuts. By using the same image outcome, we intend to show options beyond the graphical capacities of various languages. The perspective taken in this chapter is based on an artist's experience, where coding is a part of artistic creation. It is aimed to explore how art and programming might complement one another and how we can enhance the aesthetic quality of electronic image production through putting these links into action. The image of a horse rider was drawn and then programmed by one of the authors (Ursyn) in Fortran, now an obsolete language. This image resulted from recording points on a grid paper after a pencil drawing, which was thus converted to a setup of points as x, y, z, or –z. It was written almost 30 years ago, and presently it was translated into several modern languages: Python, C++, and Java by the second author. Further discussion is about the role of programming for data presentation in artistic input (Ursyn, 2013) and possible approaches to creating and designing that relate to working with programs.

There is a growing need and interest for understanding code and its role, which stems from the current programming options for choosing languages, libraries, solutions, shortcuts, open sources, apps, and conditions, as well as the transparency of code in visual editors (for example, Dreamweaver, HTML, and CSS). Computing languages are embedded in 3D editors (for example Maya, Blender, and Python). The idea of translation has deeper roots than we often are willing to acknowledge. It is grounded in symbolic systems, both related to languages and to abstract messages. The history of communication can be seen connected to the Rosetta stone (a stele – a stone slab containing three scripts of the same decree: ancient Egyptian hieroglyphs, Demotic script, and Ancient Greek script) and to various efforts to transfer meaningful tales such as Beowulf, the Old English epic poem consisting of thousands of alliterative and quite complicated lines. Perhaps the current STEM to STEAM (Science, Technology, Engineering, and Math to Science, Technology, Engineering, Art, and Math) movement has hopes related to this concept.

The visual aspect in our technology-based life is based on programming. The open source becomes a token of our daily availability. The 3D printing technology is one if the fastest developing and sought after technologies. For example, a 3D printing Startup Company Lulzbot ( in Loveland, Colorado offers codes and wireframes of machine’s physical parts to anyone interested, and invites people to modify whatever they’d like according to their needs. However, there is still a gap between disciplines. The concepts of visual computing or aesthetic computing are unknown to many. There is a shortage of programming teachers, and not enough courses offered to young learners.

Key Terms in this Chapter

Sign: A conventional shape or form to explain facts, ideas, or information. A sign is a distinct thing that signifies another thing. Natural signs signify events caused by nature, while conventional signs may signal art, social interactions, fashion, food, interactions with technology, machines, and practically everything else. An icon represents a thing or refers to something by resembling or imitating it; thus a picture, a photograph, a mathematical expression, or an old-style telephone may be regarded an iconic object. Thus, an iconic object has some qualities in common with things it represents by looking, sounding, feeling, tasting, or smelling alike.

Pattern: A regular order existing in nature or in a manmade design. In nature patterns can be seen as symmetries (e.g., snowflakes), and structures having fractal dimension such as spirals, meanders, or surface waves. In computer science, design patterns serve in creating computer programs. In the arts, a pattern is an artistic or decorative design made of recurring lines or any repeated elements. We can see patterns everywhere in nature, mathematics, art, architecture, and design. A pattern makes a basis of ornaments, which are specific for different cultures. Owen Jones (1856) AU69: The in-text citation "Owen Jones (1856)" is not in the reference list. Please correct the citation, add the reference to the list, or delete the citation. made a huge collection of ornaments typical for different countries. He wrote a monographic book entitled “The Grammar of Ornament.”

Algorithm: A recipe to solve a problem, a sequence of instructions for carrying out computation. An algorithm is a procedure for solving a problem by carrying out a sequence of simpler, unambiguous steps. Such procedures are implemented as computer programs.

Semiotics: The study of meaningful use of signs, symbols, codes, and conventions that allow communication. The name ‘semiotics’ is derived from the Greek word ‘semeion’ which means “sign”. “Meaning” is always the result of social conventions, even when we think that something is natural or characteristic, and we use signs for those meanings. Therefore, culture and art is a series of sign systems. Semioticians analyze such sign systems in various cultures; linguists study language as a system of signs and some even examine film as a system of signs. The semiotic content of visual design is important for non-verbal communication applied to practice, especially for visualizing knowledge.

Symbol: Symbols no resemble things they represent but refer to something by convention. We must learn the relationship between symbols and what they represent, such as letters, numbers, words, codes, traffic lights, and national flags. A symbol represents an abstract concept, not just a thing, and is comparable to an abstract word. Highly abstracted drawings that show no realistic graphic representation become symbols. Symbols are omnipresent in our life. Examples may include: an electric diagram, which uses abstract symbols for a light bulb, wire, connector, resistor, and switch; an apple for a teacher or a bitten apple for a Macintosh computer; a map – typical abstract graphic device; a ‘slippery when wet’ sign. Signs, icons, and symbols are collectively called signage. Icons and symbols help compress information in a visual way. Designers choose signs, symbols, and icons that are powerful and effective; for example, a designer may look for an icon showing the essence of the meaning related to scissors and common features characteristic for this product. Effective design of a complicated product may help memorize and learn how to use the product.

Knowledge Visualization: The use of visual representations to transfer knowledge between at least two persons.

Symmetry: Means the correspondence in size, form, and arrangement of parts on opposite sides of a plane, line, or point. There are several types of symmetry; for example, line or mirror symmetry, radial, cylindrical, or spherical symmetry. The halves of the bilaterally symmetrical animals, for example, butterflies, when seen along the axis, form each other’s mirror images. Most animals and people cannot be divided into two identical halves, even when they look symmetrical from external appearance. Two halves of the human brain display different abilities and ways of learning and thinking.

Complete Chapter List

Search this Book: