Assigning Letters to shapes in grasshopper

Hi Everyone,

I’m looking for some help in assigning letters to shapes on grasshopper, (defined by the semaphore alphabet).

The end goal would be for a user to type in phrase or sentance, which could then be converted to the semaphore alphabet and generate unique shapes. (this part of the definition I’ve already got sorted!)

You can see in the uploaded definition that Im currently manulally inputting the sentances, but just to clarify I’m aiming to have a panel that people could type into, which then converts our alphabet into the vectors shown and proceeds through the rest of the definition,

Best Wishes,
Semaphore alphabet (9.2 KB)
Creating shapes from language.3dm (7.2 MB)

I see absolutely nothing whatsoever in this code that matches your description. No sentences, no interpretation of text to semaphore shapes - by which I assume you mean flags like these?

It looks to me like you need 29 of the 31 semaphore shapes listed in this diagram, with a mechanism to preface letters vs. numbers appropriately?

It could be interesting but doing 100% of the work is not appealing at all.

Hi Joseph,

Thanks for your quick reply, sorry I think i’ve managed to be a little confusing!

Rather than the ACTUAL flags of the semaphore alphabet, I have drawn out all of these vectors in a more simplified manor as shown in the picture below.

I have absolutly no idea if any of this is possible, and am still quite new to grasshopper, and a complete novice in coding.
I would appreciate any help or suggestions that anyone has, and am not asking anyone to do 100% of the work, (I appologise if it came accross that way) Just an Arch student looking for a little helping hand! :slight_smile:

Best Wishes,

Your image in this post does not match the code you posted earlier, which looks like this:

The ‘Curve’ parameter appears to contain (or refer to?) 13 curve shapes that resemble semaphores. It looks like they are not internalized but I don’t see them in the Rhino file either?

After making all the Rhino layers visible, I found 27 semaphore shapes on ‘Layer 01’ in red and duplicated on ‘Layer 02’ and ‘Layer 04’ in gray and once more in a different plane orientation on ‘Layer 03’. All are in a completely different location and a vastly different scale than the alphabet you refer to on ‘Layer 06’. And I discovered this phrase on layer zero:

There are no “vectors” anywhere in sight. The shapes are defined as curves.

Oh yeah, it’s possible. The problem needs to be presented much more clearly, though. Like a list of all 27 shapes in Grasshopper instead of only 13 found in the ‘Curve’ parameter, in alphabetical sequence. If you want to handle numbers, you need 29 semaphores, not 27. “Vector” has a specific meaning in Grasshopper; if that’s what you really mean(?), the problem/solution is very different than working with the curve shapes from the Rhino file.

Honestly, all the details involved in making this work are more than I want to get into. I must leave it at that.

Hi Again :slight_smile:

It is the same code, i just popped in the pannels to try and better illustrate what I was trying to achieve (thought this was easier than trying to explain through text again)

The current “curve” parameter is currently set to the 13 curves that spell ‘silent sound’ - or ‘Peckitt street’, I cant quite remember which one its set to currently, but this really doesn’t matter) - this is what I ment when I said

“Im currently manulally inputting the sentances” - litterally copying the curves of each letter from my alphabet of curves, to make the phrase/sentance, which I could then manually assign in rhino to create the form.

Oh gosh completly disregard any of the other rhino layers! Completly forgot they were there and theyre not relevent now, sorry about that!

Hopefully I’ve now used the right term as Curves instead of vectors! I was thinking vectors in the sense of Photoshop / CAD, but thanks for clearing that up, I definately mean closed curves!

I’m not looking to work with numbers or the space, just the 26 letters currently drawn.

I appreciate the time you have taken to look into this, and would be very grateful if you were able to point me in a direction to link curves to letters so I can do some further research for myself.

Best Wishes,

You can’t spell “silent sound” without the space character…

They may be far more relevant than you think if at least one of them corresponds to all 26 letters of the alphabet plus the space character?

Rhino/Grasshopper are CAD tools and vectors could very well be used here to create the shapes as curves or surfaces. It could be the easiest approach to take because it’s scalable and each semaphore can be represented by two integers between 0 and 7, corresponding to eight positions for each of the two “flags”.

Like this: (13.7 KB)

These two vectors can be used to create shapes like your examples. They can be referenced based on parsing a string of text and they can be positioned at sequential points to make words instead of always at the same point.

Not difficult but perhaps a stretch for your current skill level at Grasshopper? (18.0 KB)


This version replaces the vectors with ‘Line SDL’, uses the Clipper plugin ‘PolyOffset’ to convert the vector/lines into shapes (closed planar curves), then jumps through a bunch of hoops for spacing them evenly (yellow group). (22.3 KB)

I’m getting more and more conflicted lately about doing this much work for anyone without getting paid. If it helps people learn GH, that’s great, I guess… But does it really? Or is it just doing someone’s homework for them?

I agree you do a lot for this community Joseph, and I hope you get the credit, recognition & appreciation you deserve - at a minimum. I’m certainly grateful for your input and often look up your posts because i find them to be very helpful in my journey of learning GH. This community is better place with contributors like yourself.

Thank you. Not really seeking “credit, recognition & appreciation”, though that is nice. Just concerned that so many university students show up here to get a vision/project implemented by someone without really knowing what choices were made or how it works. Cheers.

1 Like

Hi Joseph,

Wow thank you for all of these different examples! I’ll work my wat through them to see if I can extract something that will allow me to map the characters to the curves I have produced.

The other rhino layers were something that I exported for a seperate model, and not part of this experiment at all, but thanks again for investigating and trying to help :slight_smile:

This is quite an interesting example, rather than making words themselves, I am looking at mapping the curves onto a sphere and then lofting them together to create a form which responds to the semaphore letters, the concept is to create spaciality out of sound (hence why the space is not needed - as there is an absance of sound in a pause)

Gathering examples like this definately does help people learn, and forums like this are especially useful as they can draw on the knowledge of people like yourself which are clearly far more expirienced. I have been using g/h for a couple of years now and have a grasp on the basics which I try to use to help in the forums where I can. It’s really rewarding to see different solutions to creative problems.

With a masters student like myself, it is deffinatly more about understanding the process and tools that have been used within the examples so that I can both progress my own work and continue to help others both online and within the studio, architecture students are already heavily financially challenged (within the UK at least) and paying for additional tutorials or advice is simply not feasable. I hope that the community can continue to provide great support for everyone in learning to use both grasshopper and its plug ins to make use of its full potential.

Should I discover a way to map these existing curves to the alphabet I will of course upload the solution here to assist anyone else that is looking to do this, and other ideas on this process of creating a relationship between the curves and alphabet are always welome :smiley:

That part is trivial compared to translating arbitrary text into semaphore shapes. It can be done by modifying the yellow group in my last post.