We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm in need of some help for my project. I'm a student and I'm learning code just for this short project.
I have created a typeface made of ellipses on a grid, when weight is placed on the scale the ellipse become bigger and the type, therefore bolder. What I'm wanting to do, is be able to "type" with my coded letters. Is there a really obvious way to do this? Such as importing and placing separate code files (each separate letter). Any tutorials I could be pointed towards would be of great help.
Answers
here is a solution
It first develops the full Alphabet at start up, each letter as a point cloud (taken from the letters A..Z in the current font
f
). It then displays all letters.Then you can (with shift!) hit A, B, C ... Z to test it.
also try
showAllLetters()
(shows all letters initially)Data structure
each letter has lots of points, each letter is a point cloud. The points are stored in an array of PVector.
All arrays of PVector (the Alphabet) are stored in an ArrayList named
list
.The formula
gets you the array of PVector for key A ... Z from the ArrayList
list
.This might be confusing because it's an array within an ArrayList, but it's easy to handle. If you want I can rewrite it, using a class Letter.
Best, Chrisir ;-)
[code just completely re-written (yet without a class)....]
the resolution is not very high to keep things fast.
instead of making the alphabet data from scratch, I guess you can store them one time (with another sketch) and then just load it (with your kitchen scale sketch).
There is a library that can also make point clouds for letters:
http://www.generative-gestaltung.de/P_3_2_1_02
I found a old version with textual data of each letter of the alphabet (it's from the forum)
it's called letterData1
Best download entire package as zip, unzip on your hard drive and then turn to the unpacked folder letterData1.
Download:
https://github.com/Kango/Processing-snippets
Huge thank you, Chrisir.
I'll see what I can create and will be sure to post back onto here with the final result.
Cheers!
;-)
see his other thread
https://forum.processing.org/two/discussion/26260/how-do-you-allow-for-mousey-to-still-change-the-height-of-an-ellipse-when-inside-a-keyreleased#latest