Tag Archives: Drawing

The Elements of Euclid in Greek and Latin

I was trying to parse my way through an edition of The Elements in Greek and Latin:

https://archive.org/details/euclidisoperaomn01eucluoft/page/x

The name of The Elements in Ancient Greek is:

Στοιχει̃a

or, when transliterated:

Stoicheĩa

.

The Ancient-Greek word, τὰ στοιχει̃α or, when transliterated ‘tà stoicheĩa,’ is a plural form of the 2nd-declension neuter verb, τὸ στοιχει̃ον genitive: του̃ στοιχείου or, when transliterated: ‘tò stoicheĩon,’ genitive: ‘toũ stoicheíou.’

The Ancient-Greek word, ‘tò stoicheĩon,’ can mean ‘an element in a set.’

Figure 1: The elements of this set are alpha, beta, gamma and delta.

The Ancient-Greek word, ‘tò stoicheĩon,’ is formed from the Ancient-Greek masculine noun, ὁ στοι̃χος genitive: του̃ στοίχου or, when transliterated, ‘ho stoĩchos,’ genitive: ‘toũ stoíchou,’ which means ‘steps,’ or ‘a flight of stairs;’ and the Ancient-Greek 2nd-declension neuter nominal suffix, ‘-eĩon,’ genitive: ‘-eíou’ which denotes ‘a means (of),’ ‘an instrument of;’ etc.

Figure 2: a ‘stoĩchos’ or ‘series of steps.’

The term, ‘stoĩchos,’ according to Wiktionary, may be traced back to the indo-european word:

*steigʰ

, which means:

‘climb.’

Hence, etymologically, the Ancient-Greek term, ‘stoicheĩa,’ can be said to mean: ‘the means of climbing up;’ ‘the means of stepping up;’ ‘the means of ascent;’ etc.

This is highly instructive, as, in truth, Elements is a book that is a Jacob’s ladder, of sorts, by which one can ascend, element by element, into the heavens of mathematical knowledge.

Figure 3: With The Elements of Euclid, we advance in our mathematical knowledge element by element. Each element is, conceptually, like a rung, heaving us upwards to Mathematical prowess; to an implicit knowledge of Euclidean Geometry.

Triple Quotes in Python.

(Click the below link for a Microsoft Word version of this blog-post)

three_quotes_blind_mice_ii

(Click the below link for a pdf version of this blog-post)

three_quotes_blind_mice

triple_single_quote_marks

Figure 1:  Triple quotes are a peculiarity of Python’s.

 

Triple quotes are peculiar to the syntax of the Python programming language.

Multi-line Comments:

One use for them is to enable multi-line comments:

biographical_comment

Figure 2:  In this short program that calculates Voltage, I use triple quotes so as to make a multi-line biographical comment concerning Count Alessandro Volta.

In many programming languages, such as C, we can make similar multi-line comments by enclosing these comments within:

/* */

as in:

/* Your multi-line comment goes here. */

Multi-line Strings:

Triple quotes can also be employed so as to print multi-line strings.

three_blind_mice

Figure 3:  I drew the above image with gel pens; felt-tip pens; and pencils.   In the following example, we are going to use triple quotes so as to print the nursery rhyme, Three Blind Mice, as a multi-line String.

Let us say that we have a piece of text that we wish to print to screen:

three_blind_mice_screenshot

Figure 4:  This is the piece of text that we wish to print to screen.

One way, that we might imagine of doing this, would be to simply copy the text and then to paste it inside a:

print(“”)

statement:

three_blind_mice_string_wont_work

Figure 5:  We do not even need to run this program to see that it will not work, but we shall:

f5_three_blind_mice_screenshot

Figure 6:  This is what occurs when we try to run this defective program.

Another option would be to enter in the text manually, and to apply the correct formatting ourselves:our_formatting_3_blind_mice

Figure 7:  This works.  It took a lot of effort on our part, though.

our_formatting_3_blind_mice_output

Figure 8:  The result of the program depicted in Figure 7’s being run.

We can actually print the above String within single quotes by using the:

\n

sequence:

three_blind_mice_escape_n

Figure 9:  We can print Three Blind Mice as a String within a single print() statement by using the \n sequence.

n_sequence_blind_mice_output

Figure 10:  The result of the program depicted in Figure 9’s being run.

But that program that the computer refused to interpret:

three_blind_mice_string_wont_work

Figure 11:  We tried to print out a multi-line string by only using single quotes.  As we can observe from the syntax-highlighting, the program is defective and cannot be interpreted.

f5_three_blind_mice_screenshot

Figure 12:  To restate: the computer refuses to interpret this program.

There is a way of fixing the program that will not run in Figures 11 and 12 without too much ado: by simply adding two more quotation marks at each end:

triple_quotes_single_print_statement

Figure 13:  Now our print() statement contains triple quotation marks at each end.

Having added the triple quotes, our program will now be interpreted without any difficulty:

result_triple_quotes_output

Figure 14:  What the previous debugged program outputs.  We debugged the program that would not be interpreted by replacing single quotes with double quotes.

The Logical permutations of an Inclusive-Or Gate Realised in JavaScript:

java_script_logo

Figure 1: The JavaScript Logo. I drew this with pencils.

boole_or_gate_schematic

Figure 2:  The schematic symbol for an Inclusive-Or Gate.

The logical permutations of an Inclusive Or Gate are as follows:

0 ∨ 0 = 0

0 ∨ 1 = 1

1 ∨ 0 = 1

1 ∨ 1 = 1

The above can be read, in English, as follows:

Zero disjunction zero equals zero.

Zero disjunction one equals one.

One disjunction zero equals one.

One disjunction one equals one.

Alternatively:

Zero OR zero equals zero.

Zero OR one equals one.

One OR zero equals one.

One OR one equals one.

We can realise the above Boolean Logic in Digital circuitry, as follows:

Or_gate_logical_output_all_false

Figure 3:  An Inclusive-Or Gate.  This represents the Boolean Equation, 0 ∨ 0 = 0Or_gate_logical_output_y_true

Figure 4:  This Inclusive-Or gate represents the Boolean Equation, 0 ∨ 1 = 1

Figure 5:  This Inclusive-Or gate represents the Boolean Equation, 1 ∨ 0 = 1

 

Or_gate_logical_output_both_true

Figure 6:  This Inclusive-Or gate represents the Boolean Equation, 1 ∨ 1 = 1

It is possible to translate Boolean Equations into Conventional-Arithmetic Equations, and to obtain the same logical result:

x ∨ yxy – ( ( x ) * ( y ) )

0 ∨ 0 = 0 + 0 – ( ( 0 ) * ( 0 ) )  = 0

0 ∨ 1 = 0 + 1 – ( ( 0 ) * ( 1 ) )  = 1

1 ∨ 0 = 1 + 0 – ( ( 1 ) * ( 0 ) )  = 1

1 ∨ 1 = 1 + 1 – ( ( 1 ) * ( 1 ) )  = 1

It is possible to use the above logical translations so as to create buttons in JavaScript that calculate the logical permutations of an Inclusive-Or gate.

boolean_inclusive_or_code_final

Figure 7:  In the above HTML-5 file, we declare four functions.  Each function describes a logical permutation of the Inclusive-Or Gate.

boolean_inclusive_or_output_0

Figure 8:  What the JavaScript and HTML-5 code outputs.  We have created 4 buttons.  Each button calculates a logical permutation of the Inclusive-Or gate and displays the result in a dialog box.

about_to_click_last

Figure 9:  We are about to click the button that calculates the Boolean Equation, 1 ∨ 1 =

logical_permutation_1_or_1

Figure 10:  The logical result of the Boolean Equation, 1 ∨ 1 = , i.e. 1, is printed to screen in a dialog box.

web_app

Figure 11:  A screenshot of a web-application that I programmed, using the code depicted above.  Click the following link: Inclusive-Or Web-application , so as to try this web-application out for yourself!

Must Do is a Great Master.

The title of this piece comes from a Monaghan-ism that has a parallel in non-localised English.

As part of our Networking-and-Systems Apprenticeship, we have to draw Network Topologies.  I am watching a Microsoft MVA video series on how to do this:

Video 1:  A Microsoft Video Playlist on Networking Fundamentals.

The chaps at Microsoft recommend some of their proprietary software for the task: Microsoft Visio.

I looked up Microsoft Visio on their online store, and, to my horror, it cost in excess of €700.  It amazes me that triple-A videogames can employ hundreds of developers that can work years of man-hours between them, and, yet, they can retail their software at €60-€70.  How come non-gaming software can sometimes retail at the €1000+ mark?

So, I am not spending money – that I do not have – on this.  Eventually, I would like to set up a development company using the Microsoft Bizspark program, and, I think, Microsoft will give me all of their software for free, upon the proviso that I develop for their platform.

So I looked for a coding solution.

I took a low-quality raster screenshot of the server icon featured in their video:

captured_from_youtube_server

Figure 1: A low quality raster-screenshot of a server icon.

I then began to manually describe this Server Icon in SVG[1] code:

svg_code_capture_network_icon

Figure 2:  A manually programmed svg file that I produced.

Below is a capture of the high-quality vector image that the code produced:

server_capture_network_icon

Figure 3:  A capture of what the simple svg file, above, produces.

Sometimes, lacking the proper resources necessary to – ordinarily – complete a task, forces one to seek more creative solutions.

As in the adage:

Necessity is the Mother of Invention

Indeed, it is necessity – and not plenty – that it the mother of invention and innovation.


[1] Scalable Vector Graphics.

I Have 7 Cats: Formatting Numbers in Python


Link To Pdf:

Below is a Link to a pdf version of this web post:

Formatting Numbers in Python


 

Formatting Numbers in Python.

Figure 1: I have 7 cats.

The table below shows us different ways that we may format a number in Python. In this instance, I have chosen the number, 7.

Syntax:

Output:

print(“I have {0:d} cats”.format(7,6,5,4)) I have 7 cats
print(“I have {0:3d} cats”.format(7,6,5,4)) I have 7 cats
print(“I have {0:03d} cats”.format(7,6,5,4)) I have 007 cats
print(“I have {0:f} cats”.format(7,6,5,4)) I have 7.000000 cats
print(“I have {0:.2f} cats”.format(7,6,5,4)) I have 7.00 cats

I will take every entry of the above table, individually, and shall explain what is going on.

  1. print (“I have {0:d} cats”.format(7,6,5,4))


    Figure 2: The contents of the chain parenthesis analysed.

In the above command, we specify, to python, that we wish to format the zeroth1 number-element in the listed sequence:

(7,6,5,4)

.

This is what the:

0

part of:

{0:d}

is for.

In this instance the zeroth number-element in the listed sequence is:

7

.

Therefore, it will be the number, 7, that will be formatted and printed by Python.

We use a

d

in the chain parenthesis, to let Python know that we wish to format the number:

7

as an ordinary decimal number.

When we give the command:

>>> print(“I have {0:d} cats”.format(7,6,5,4))

to Python, Python outputs:

I have 7 cats

.

Below are examples of what occurs when we give formatting commands such as these to a Python Interactive Window:


Figure 3: In the above example, we, systematically, format all of the number-elements in the sequence: (7,6,5,4). We do this by altering the value of the number before the colon in the chain parenthesis.

  1. print (“I have {0:3d} cats”.format(7,6,5,4))


Figure 4: The contents of the chain parenthesis analysed.

In the above command, we specify, to python, that we wish to format the zeroth number-element in the listed sequence:

(7,6,5,4)

.

This is what the

0

part of:

{0:3d}

is for.

In this instance the zeroth number-element in the listed sequence is:

7

.

Therefore, it will be the number, 7, that will be formatted and printed by Python.

We use a

d

in the chain parenthesis, to let Python know that we wish to format the number:

7

as an ordinary decimal number.

The

3

character tells python that we wish the decimal number, i.e. 7, to be the third character after leading2 characters. As we do not specify what form that we wish for these leading characters to take, then:

7

will be the third character after two leading spaces.

When we give the command:

>>> print(“I have {0:3d} cats”.format(7,6,5,4))

to Python, Python outputs:

I have 7 cats

.

Below are examples of what occurs when we give formatting commands such as these to a Python Interactive Window:


Figure 5: In the above example, we, systematically, format all of the number-elements in the sequence: (7,6,5,4). We do this by altering the value of the number before the colon in the chain parenthesis.

  1. print (“I have {0:03d} cats”.format(7,6,5,4))


Figure 6: The contents of the chain parenthesis analysed.

In the above command, we specify, to python, that we wish to format the zeroth number-element in the listed sequence:

(7,6,5,4)

.

This is what the

0

part of:

{0:03d}

is for.

In this instance the zeroth number-element in the listed sequence is:

7

.

Therefore, it will be the number, 7, that will be formatted and printed by Python.

We use a

d

in the chain parenthesis, to let Python know that we wish to format the number:

7

as an ordinary decimal number.

The

3

character tells python that we wish the decimal number, i.e. 7, to be the third character after leading characters3.

The:

0

prior to the:

3

and following the:

:

in:

{0:03d}

signifies the leading character:

zero

.

Therefore:

7

will be the third character after two leading zeros.

When we give the command:

>>> print(“I have {0:03d} cats”.format(7,6,5,4))

to Python, Python outputs:

I have 007 cats

.

Below are examples of what occurs when we give formatting commands such as these to a Python Interactive Window:


Figure 7: In the above example, we, systematically, format all of the number-elements in the sequence: (7,6,5,4). We do this by altering the value of the number before the colon in the chain parenthesis.

  1. print (“I have {0:f} cats”.format(7,6,5,4))


Figure 8: The contents of the chain parenthesis analysed.

In the above command, we specify, to python, that we wish to format the zeroth number-element in the listed sequence:

(7,6,5,4)

.

This is what the

0

part of:

{0:f}

is for.

In this instance the zeroth number-element in the listed sequence is:

7

.

Therefore, it will be the number, 7, that will be formatted and printed by Python.

We use an:

f

in the chain parenthesis, to let Python know that we wish to format the number:

7

as a floating-point number4.

When we give the command:

>>> print(“I have {0:f} cats”.format(7,6,5,4))

to Python, Python outputs:

I have 7.000000 cats

.

As we can see, the number,

7,

its being a float is followed by a decimal point and six trailing zeros.

Below are examples of what occurs when we give formatting commands such as these to a Python Interactive Window:


Figure 9: In the above example, we, systematically, format all of the number-elements in the sequence: (7,6,5,4). We do this by altering the value of the number before the colon in the chain parenthesis.

  1. print (“I have {0:.2f} cats”.format(7,6,5,4))


Figure 10: The contents of the chain parenthesis analysed.

In the above command, we specify, to python, that we wish to format the zeroth number-element in the listed sequence:

(7,6,5,4)

.

This is what the

0

part of:

{0:.2f}

is for.

In this instance the zeroth number-element in the listed sequence is:

7

.

Therefore, it will be the number, 7, that will be formatted and printed by Python.

We use a

f

in the chain parenthesis, to let Python know that we wish to format the number:

7

as a float.

The

.2

characters tell python that we wish the floating-point number, i.e. 7, to be followed, after a decimal point, by two trailing characters, in this instance, zeros.

When we give the command:

>>> print(“I have {0:.2f} cats”.format(7,6,5,4))

to Python, Python outputs:

I have 7.00 cats

.

As we can see, from the above example, the number:

7

, is now followed by a decimal point and two trailing zeros, as per our command.

Below are examples of what occurs when we give formatting commands such as these to a Python Interactive Window:


Figure 11: In the above example, we, systematically, format all of the number-elements in the sequence: (7,6,5,4). We do this by altering the value of the number before the colon in the chain parenthesis.


Figure 12: In this instance, the characters that trail after the decimal point are significant, i.e. not zero. Python rounds up 7.76543 to 7.77.


1 In programing, it is conventional to begin counting beginning at 0, not beginning at 1. Therefore, zeroth, or 0th, is an ordinal number. Hence: Zeroth, First, second … Hence: 0th, 1st, 2nd …

2 In Mathematics, the two zeros that precede the number, 7, in a number such as: 007 , are termed ‘leading zeros.’ In Mathematics, the two zeros that follow a number such as: 0.700 , are termed ‘trailing zeros.’

3 In Mathematics, the two zeros that precede the number, 7, in a number such as: 007 , are termed ‘leading zeros.’ In Mathematics, the two zeros that follow a number such as: 0.700 , are termed ‘trailing zeros.’

4 In programming, this is generally termed: ‘float.’

 

More than One Way to Draw a Cat.

I was watching the musical, Cats, by Andrew Lloyd Webber on Youtube.  Crazy Maniacal nonsense, but it works as a musical.  The tunes are very catchy.

The performance was an outdoor one in California.

How many of the audience,

I wondered to myself,

are on acid watching this?

To loosely quote the character, Otto Mann, the stoner Bus Driver from The Simpsons: one does not need L.S.D. to enjoy Cats, only to enhance it!

Something else cat related:

I am teaching myself the Extensible Markup Language, SVG.  ‘SVG’ stands for ‘Scalable Vector Graphics.’  With SVG, it is possible to script an illustration using markup language that is extremely similar in syntax to HTML 5.  The book that I am using as a study aid is SVG Essentials.

.svg_essentials_david_eisenberg

Figure 1:  SVG Essentials (2nd edition) 2014, by David Eisenberg.

The first image that one learns to code is a cat.

cat_face_runs_in_browser

Fig 2:  When coding an SVG document, the scripted SVG image is able to run in the browser if saved as a .svg extension.  Also, you can simply code the SVG as an inline part of an HTML-5 document by simply using the <svg></svg> ekement.  I called my above image of a cat, “cat_face_text.svg” and, as you can see, it runs successfully in my browser.

cat_face_png

Figure 3:  A closeup of the Cat image.  Lamentably, WordPress does not allow me to upload the SVG image directly, so I had to convert it to a .png file using Microsoft Paint.

cat_face_code_1

cat_face_code_2

cat_face_code_3

cat_face_code_4

Figures 4-7:  Above is the code needed to create the Cat SVG image.

 

The following is a link to a pdf file that contains the code depicted above in Figures 4-7.  Copy the code, and, then, paste it into Notepad.  Save the copy-and-pasted text as a .svg file extension, and the same image of a cat ought to run in your browser as well.

cat_face_pdf_code

 

The Trials of Vertical Challenge.

image

 

Figure 1: The Fruits of Laziness.  More Haste: Less Speed.

I wanted to take this light out of its socket so as to obtain better light conditions for my drawing. I knew that it was a stretch: I am 5 foot 4; but I was too lazy to employ the assistance of a chair, and this photograph is the result.

Being short is like a having a disability…O.K. perhaps that is a slight exaggeration.

How many Short People does it Take to Change a Lightbulb?

 

Figure 2: Hi, Ho, Hi, Ho! How many short people does it take to change a lightbulb?

Art is an Adventure

I have no natural aptitude for drawing. Conversely, I have been writing creatively since about the age of 8 or 9. I have a natural ability for writing. I can compose long pieces of prose in my head, and, later, put this prose to paper with absolute confidence.

With drawing and painting, this is not so, and that is what makes it exciting. I begin to draw and know not what the finished product will look like. Will the draft turn out o.k. or will it be a mess and, subsequent to its being a mess, have to be abandoned?

Indeed, I only took up drawing, of late, as I read that a blog that contained original artwork would generate more traffic than one without such artwork.

A peacock’s feather is a difficult thing to draw. I hope to draw a picture of Hera, Daughter of the Titan Kronos,(1.) wife of Zeus, and in one of her hands she should hold a peacock’s feather, a traditional symbol of her vanity.

image

Whenever I completed this drawing of a peacock’s feather I experienced a real rush of dopamine. This is the dopamine rush that one obtains from the acquisition of an unexpected reward.

I drew this peacock’s feather using a packet of colouring pencils that I purchased in Dealz for €1.49. Art can be a wonderfully cheap hobby!

(1). The Roman equivalent of ‘Kronos’ was ‘Saturnas’ or ‘Saturn.’ Kronos was considered to be ‘the Lord of Time’ by the ancient Greeks. This gives rise to such modern-English word derivations such as ‘Chronology.’ I learned most of my Greek Mythology through playing the computer-simulation games, Age of Empires, and Age of Mythology developed by Microsoft!

More Ornithology

I bought some Angry Bird Playing cards in the supermarket. I picked Angry Bird as the characters of this video-game franchise are quite easy to draw. When things get on top of me, there is no pass-time that I cherish more than watching cartoons and drawing. I have no natural aptitude at drawing, but as Gilbert Keith Chesterton once wrote:

“If something is worth doing, it is worth doing badly.”

I drew this with gel and fibre-tip pens. For the grey, I used an ordinary pencil.