Function Repository Resource:

GenerateBraille

Source Notebook

Generate Braille characters based on a UEB character, dot number or pixel grid

Contributed by: Antonis Aristeidou

ResourceFunction["GenerateBraille"][char]

generates a UEB Braille character corresponding to character char.

ResourceFunction["GenerateBraille"][dotNumbers]

generates a Braille character corresponding to the dotNumbers.

ResourceFunction["GenerateBraille"][pixelArray]

generates Braille characters corresponding to the pixel values of pixelArray.

ResourceFunction["GenerateBraille"][string]

translate string into uncontracted Braille.

Details

The dotNumbers can be an integer of length 1 to 8 containing integers between 1 and 8.
The pixelArray can be any 2D matrix of pixel values.
Pixel values can be 1 for ON and 0 for OFF.
A single Braille character is 2×4 pixels.
Multi-character strings are converted to uncontracted Braille.

Examples

Basic Examples (4) 

Generate a Braille character:

In[1]:=
ResourceFunction["GenerateBraille"]["w"]
Out[1]=

Generate a string of uncontracted Braille characters:

In[2]:=
ResourceFunction["GenerateBraille"]["Hello World"]
Out[2]=

Generate a Braille character from dot numbers:

In[3]:=
ResourceFunction["GenerateBraille"][126]
Out[3]=

Note the position of values of the dots for 126:

In[4]:=
Grid[{{1, 2, 3, 7}, {4, 5, 6, 8}} // Transpose]
Out[4]=

Generate a custom Braille character from a pixel grid:

In[5]:=
ResourceFunction["GenerateBraille"][
 {
  {1, 1},
  {0, 1},
  {1, 0},
  {1, 1}
  }
 ]
Out[5]=

When a row contains more than 2 pixel values, multiple characters will be generated:

In[6]:=
ResourceFunction["GenerateBraille"][
 {
  {1, 1, 1, 1},
  {1, 0, 0, 1},
  {1, 0, 0, 1},
  {1, 1, 1, 1}
  }
 ]
Out[6]=

When a pixel array contains more than 4 rows, multiple lines will be generated:

In[7]:=
ResourceFunction["GenerateBraille"][
 {
  {1, 1, 1, 1, 1, 1, 1, 1},
  {1, 0, 0, 0, 0, 0, 0, 1},
  {1, 0, 0, 0, 0, 0, 0, 1},
  {1, 0, 0, 1, 1, 0, 0, 1},
  {1, 0, 0, 1, 1, 0, 0, 1},
  {1, 0, 0, 0, 0, 0, 0, 1},
  {1, 0, 0, 0, 0, 0, 0, 1},
  {1, 1, 1, 1, 1, 1, 1, 1}
  }
 ]
Out[7]=

The pixel array does not have to conform to the Braille characters' minimum dimensions:

In[8]:=
ResourceFunction["GenerateBraille"][{{1, 1, 1, 1, 1}}]
Out[8]=

Scope (2) 

UEB or AEB grammatical rules are not implemented, so only uncontracted Braille is supported:

In[9]:=
ResourceFunction["GenerateBraille"]["100 times"]
Out[9]=

Only single character dot numbers are supported:

In[10]:=
ResourceFunction["GenerateBraille"][123456789]
Out[10]=

Publisher

Antonis Aristeidou

Requirements

Wolfram Language 12.1 (March 2020) or above

Version History

  • 1.0.0 – 12 November 2025

Related Resources

License Information