Computer Science Diagrams in 5 Easy Steps

on Reading Time: 4 minutes

This article is different from usual blog posts. However, it’s an essential topic often overlooked. There are online cloud service providers who let you create diagrams using in-built templates. But for research, I have found these solutions are not sufficient to create Computer Science diagrams. So I decided to give Adobe Illustrator (AI) a try and I was baffled by the results. Most of the diagrams on my website are created using AI. I’ll also show real life examples where I have used these tools.

AI gives the freedom to draw and have fine grained control over visualizations. In this article, I will explain five steps to get you quickly started on Adobe Illustrator. The version of AI is 2020 (24.2.1).

1. Grids

Here's the home screen when you open AI.

1.1 Create New Document

The picture explains how to create a new document in Adobe Illustrator. Web templates are 800 x 600 px.

1.2 Enable Grid View

On the Properties pane on your right, there's a separate section for
Ruler & Grids. Using these three options, you can turn on / off the
ruler, grid and transparency grid. 
Grid is important to align shapes and gives an idea of how items
should be placed.
enable grid in Adobe Illustrator.

1.3 Create Rectangle using Tool

On the left pane, you can see selection tools along with Rectangle
Tool. Select the Rectangle Tool and move the cursor to the drawing
area. Click and drag to draw the square.
The image describes selecting the rectangle tool from the left hand side pane in Adobe Illustrator. The tool can be used in Computer Science diagrams.
If you click once you will get a prompt like below. enter the desired
dimensions for height and width.
Set height and width of rectangle in Adobe Illustrator.

1.4 Split the Square into Grid using Path

Object -> Path-> Split into Grid
Select path from menu to choose grid creation menu.
Enter number of rows and columns to split the grid.
enter number of rows and columns to split the square in to a grid. Useful in Computer Science diagrams

1.5 Final Grid

Now you have the final grid. Here are some examples where a grid can be used.

  1. Blog: https://malithjayaweera.com/2020/07/blocked-matrix-multiplication/
    Diagram: https://malithjayaweera.com/wp-content/uploads/2020/07/matrix-storage.jpg
Final grid in Adobe Illustrator that can be used to create matrices in Computer Science diagrams.

2. Arrow Notations

Adobe Illustrator provides beautiful arrow styles.

Navigate to 
Arrows -> Pattern Arrows -> Select the Pattern Arrow
Pattern arrows in Adobe Illustrator that can be used in Computer Science diagrams.

Here are some examples where I used the arrow style.

  1. Blog: This article
    https://malithjayaweera.com/wp-content/uploads/2020/07/rectange-tool.png
  2. Blog: https://malithjayaweera.com/2020/05/create-makefile/
    https://malithjayaweera.com/wp-content/uploads/2020/05/makefile_tutorial_1.jpg

3. Typography

Sometimes you need monospaced typography to give the feeling of code. The typography of Adobe Illustrator “Code Save Regular” is a life saver.

typography that can be used in Computer Science diagrams.

Here are some examples where I used the Code Save Regular typography.

  1. Blog: https://malithjayaweera.com/2020/05/create-makefile/
  2. Blog: https://malithjayaweera.com/2020/07/blocked-matrix-multiplication/

4. Shaded Colors (Gradient)

AI provides a rich set of gradient colors and it’s easier than it looks.

start with a square from step 1)
select fill color (the color which the object is filled with)
and the stroke color (the color which the object border is
colored with).
Gradient shaded colors
If you double click the color option on the left tools pane, you will
also get access to an advanced color palette. The fill color is 
the full box and stroke color is the outlined box just below 
it.
Color section in Adobe Illustrator
Click on gradient option in the tools pane.
Gradient tool in Adobe Illustrator. The tool can be used in Computer Science diagrams.
Double click the color box in the gradient tool box.
Gradient color picker
Now click on the opposite sides of the color slide bar in the
gradient tool to choose two colors.
Edit the gradient colors
Here's an example of two colors that I chose.
Color selection in gradient tool that can be used in Computer Science diagrams.
Use the gradient slider to fine tune the mixture of colors.
Gradient slider on gradient tool that can be used in Computer Science visualizations

Here are some examples where I used the Code Save Regular typography.

  1. Blog: https://malithjayaweera.com/2020/07/blocked-matrix-multiplication/
    Matrices: https://malithjayaweera.com/wp-content/uploads/2020/07/matrix-storage.jpg

5. Type on a Path

To explain the connections in your diagrams, text on paths are extremely useful.

Click on the type on the path tool by right clicking on text 
button in left selection pane. 
Type on path tool
But first we need to create an offset around our square object.
Offset path selector
Set the offset to be 10px using the dialog box.
Offset value selector
Now click on "type on path tool" and select the outer border of
the square object. You will see the text appear as follows.
Type on a path example

Here’s the final result.

Type text example in in Computer Science diagrams

and that’s it. Let me know in the comments section if these tips were helpful to get a quick start with Adobe Illustrator to create beautiful Computer Science diagrams / illustrations.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments