In order for Hexy to understand how to write, he had to be taught the alphabet. There are many ways to skin a cat and I figured that the easiest way to record the required letter paths was for me to write up some Matlab code. Pretty straightforward stuff, just lets the user click through the points that define a letter, which is then written to a text file as a Python if-elif statement.
NB I'm aware that this isn't an open-source offering (Matlab is a commercial product), but I'm no good with Python GUIs. If someone would like to port this, please be my guest
Once the if-elif statement has been generated, just needed to be packaged with my full robot IK code and made to step through a string, letter by letter.
# scale factor for letters
sf = 25
# loop through each letter of string
for c in userName:
print "Next letter: ", c
# call letterPath function
letterRoute = letterPath(c)
# move Hexy along paths
for i in range(len(letterRoute)):
# shuffle to right one letter space
The fully modified PoMoCo can be downloaded from my GitHub repo. It's not especially efficient with the code or packaged in a sensible manner, but it does muddle by to demonstrate the required functionality.
So here it is. Hexy writing his first words:
Now I know that a good metric for the simplicity of a programming language is the ease at which you can make a Hello World program. In the case of Hexy, I've got to admit it's fairly tricky. It's taken me two months to get to this stage and even so, Hexy as a console output method isn't great. Don't get me wrong, it's not as hard as Malbolge, but this really doesn't feel like Hexy's calling.
If you'd like your very own signed postcard by Hexy, please get in touch!