Shop OBEX P1 Docs P2 Docs Learn Events
S2 Request from a customer: drawing several Chinese characters - Page 2 — Parallax Forums

S2 Request from a customer: drawing several Chinese characters

2

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-05-24 05:03
    If size matters and you choose to do outlined Chinese characters... all the issues of traditional brush strokes and using a traditional ink brush are NOT useful.

    At that point, it might be easiest if one uses font data that was created for Linux screen output... there are several outlined fonts.

    My focus is more about the content than the delivery. Rather than having something that is just created to impress one group of people at one event, I am thinking that the presentation should create something that new users will want to repeated explore and use wth friends.

    The Scribbler likely can be adapted to use a piece of chalk and write these on a sidewalk outdoors if the graphics wants to go big. I am not even sure you need a chalk holder... maybe just wrap a stick of chalk with cellophane tape and insert. (Not sure how the wear to the chalk would be dealt with.)

    Nothing builds popularity more than sharing a new toy that impresses your friends.. so the graphic demonstrations should be able to do large characters and be able to go outside to do them. At least, thats my 2 cents.
  • ercoerco Posts: 20,256
    edited 2013-05-24 05:49
    For Chinese characters and/or calligraphy where brush/pen strokes cause variations in line width, it would be neat to use a wide blade marker which would be rotated on the fly by a second servo (first servo is the pen lifter) to vary the line width while writing characters. Turning the marker 90 degrees gives a thin line.
  • bee_manbee_man Posts: 109
    edited 2013-05-24 06:22
    If size matters and you choose to do outlined Chinese characters... all the issues of traditional brush strokes and using a traditional ink brush are NOT useful.

    I have to agree, the larger the type font the better the outlined characters look. Also the time it takes for the S2 to get in position to write the characters traditionally is excessive. At least in the US we like instant gratification.


    Here is the S2_Word_Writer6 code I was using in the 2 examples. If anyone's interested in writing "China" in Chinese with their S2.

    PUB C1_double
    
    let_width :=190 * _size
    S2.move_to(0*_SIZE+LET_POS, _SIZE*70)
    pen_down
    s2.begin_path 
    S2.move_to(0*_SIZE+LET_POS, _SIZE*180)
    S2.move_to(87*_SIZE+LET_POS, _SIZE*180)
    S2.move_to(87*_SIZE+LET_POS, _SIZE*230)
    S2.move_to(105*_SIZE+LET_POS, _SIZE*230)
    S2.move_to(105*_SIZE+LET_POS, _SIZE*180)
    S2.move_to(190*_SIZE+LET_POS, _SIZE*180)
    S2.move_to(190*_SIZE+LET_POS, _SIZE*70)
    S2.move_to(172*_SIZE+LET_POS, _SIZE*70)
    S2.move_to(172*_SIZE+LET_POS, _SIZE*90)
    S2.move_to(105*_SIZE+LET_POS, _SIZE*90)
    S2.move_to(105*_SIZE+LET_POS, _SIZE*3)
    S2.move_to(87*_SIZE+LET_POS, _SIZE*3)
    S2.move_to(87*_SIZE+LET_POS, _SIZE*90)
    S2.move_to(17*_SIZE+LET_POS, _SIZE*90)
    S2.move_to(17*_SIZE+LET_POS, _SIZE*70)
    S2.move_to(0*_SIZE+LET_POS, _SIZE*70) 
    S2.end_path 
    pen_up
    S2.move_to(17*_SIZE+LET_POS, _SIZE*107)
    S2.begin_path 
    pen_down
    S2.move_to(17*_SIZE+LET_POS, _SIZE*162)
    S2.move_to(87*_SIZE+LET_POS, _SIZE*162)
    S2.move_to(87*_SIZE+LET_POS, _SIZE*107)
    S2.move_to(17*_SIZE+LET_POS, _SIZE*107)
    S2.end_path 
    pen_up
    S2.move_to(105*_SIZE+LET_POS, _SIZE*107)
    S2.begin_path 
    pen_down
    S2.move_to(105*_SIZE+LET_POS, _SIZE*162)
    S2.move_to(172*_SIZE+LET_POS, _SIZE*162)
    S2.move_to(172*_SIZE+LET_POS, _SIZE*107)
    S2.move_to(105*_SIZE+LET_POS, _SIZE*107)
    S2.end_path
    pen_up
    LET_POS := Let_pos + Let_width +  S_B_L * _size
    
    PUB C1_traditional
    
    let_width :=190 * _size
    S2.move_to(0*_SIZE+LET_POS, _SIZE*180)
    pen_down
    s2.begin_path 
    S2.move_to(0*_SIZE+LET_POS, _SIZE*70)
    S2.end_path 
    pen_up
    S2.move_to(0*_SIZE+LET_POS, _SIZE*180)
    pen_down
    s2.begin_path 
    S2.move_to(190*_SIZE+LET_POS, _SIZE*180)
    S2.move_to(190*_SIZE+LET_POS, _SIZE*70) 
    S2.end_path 
    pen_up
    S2.move_to(0*_SIZE+LET_POS, _SIZE*80)
    pen_down
    s2.begin_path 
    S2.move_to(190*_SIZE+LET_POS, _SIZE*80)
    S2.end_path 
    pen_up
    S2.move_to(95*_SIZE+LET_POS, _SIZE*230)
    pen_down
    s2.begin_path 
    S2.move_to(95*_SIZE+LET_POS, _SIZE*3)
    S2.end_path 
    pen_up
    
  • NikosGNikosG Posts: 705
    edited 2013-05-25 14:28
    I saw this thread 5 minutes ago!
    Of course I want to contribute! I’ll take a better look to understand what exactly I must do and I’ll send you feedback!
    Writing Chinese using the S2 will be really amazing !!!!!
  • NikosGNikosG Posts: 705
    edited 2013-05-26 05:56
    I’m a little bit confused about what phrase is better to create the 1rst that suggested by Ken (Post #1) or the correction that suggested by MacTuxLin (Post #19)?

    BTW, I’ll try to create the phrase “中美友谊万岁“ according MacTuxLin’s suggestion Post#19 (as he is a native Chinese writer), and I’ll try to follow the writing sequence from his video (Post#18). Following Loopy’s opinion about the significance of writing sequence!

    Although I have no idea about Chinese writing, and taking into account what I read from the native Chinese writers of this thread, I believe that an S2 robot can be an excellent educational tool and teacher’s assistant in order to teach students the “ideogrammatic” Chinese writing!!!
  • ercoerco Posts: 20,256
    edited 2013-05-26 07:53
    Nikos: I knew you'd want "in"! Great to hear that you're on the case. :)
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-05-26 08:21
    I really hope you guys don't think that Chinese characters are all straight lines... they are mostly not.

    Regarding writing 4 characters...
    Every Chinese character that is well-formed is based on an imaginary square box and all characters use the same sized square box. So if you data for each character can include a departing point of reference for the imaginary box, one can simply move to the next starting point of reference

    Another issue is that one character may use a series of brush strokes that are full sized, and the same series of strokes may be used at 25% of the full size to build a more complex character. It is not like ABC, where all of the font is just upper-case or lower-case -- the interplay of size is very involved as components zoom in and out, divided into three side-by-side sections with elongnation, or stacked atop eachother.
  • HumanoidoHumanoido Posts: 5,770
    edited 2013-05-26 11:10
    Ken Gracey wrote: »
    Wouldn't want to be one of those people who use Chinese characters that have some meaning other than what I envisioned.

    Ken, I agree. Native languages are properly written and proofread by native people. This is because native language has much between the lines, such as locality, flavor, culture, connotation, history, reference, style, prose, subtlety, current events, etc. IMO, an educated and cultured native Chinese person living in Mainland China (or where the product is sold) is needed to make determinations.

    As a footnote, when we buy products from China, and more often than not, the manual is written in broken, poor English as an afterthought. Everyone knows the feeling of frustration and our diminished product impressions when that happens. I know Parallax is above that and will take steps to ensure quality native translations of manuals and materials.

    BTW, this is a brilliant idea to place USA products into Mainland China, with a timely and vital opportunity to promote longevity of friendship between the two countries.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-05-26 12:14
    Have you noticed that Japanese products seem to have excellent English documentation.

    They do double translation, with multiple revisions.
    First they have one person in the USA translate it all into English, preferably someone that is aware of the appropriate style for a given context. Then it is sent back to Japan, and translated back into Japanese in order to determine if the translation has errors and omissions, or if it is in any way inappropriate in comparison to the original message.

    If you cannot afford double translation, keep it short. And it doesn't hurt to go with traditional phrases that are widely accepted. I don't have any difficulty with these short messages that the Scribbler is creating, though the corrected phrase (Post #19 is likely a bit smoother than the original that was proposed (Post #!). It is closer to a well-formed sentence.

    The big problem is how do you get everything about the Propeller translated into Chinese. if the translators have good knowledge of Chinese, but no knowledge of the technology, it is awkward. And then there are the programs themselves that are NOT in Chinese characters.

    The more you depend on a combined approach with some English required, the more you narrow down who will buy your product. I have a phone message machine that is entirely in Chinese, including all the documentation. It even speaks the time in Chinese. And all the keys are in Chinese. Even after owning it for 10 years and pickup messages, I somewhat dread the device.
  • GarethGareth Posts: 278
    edited 2013-05-27 15:01
    Ken Gracey wrote: »
    Any takers? Schedule is to complete this task by July 1st.

    Find me the characters in 8x8 dot matrix characters and i can do it tomorrow........seriously....... using the S2
  • W9GFOW9GFO Posts: 4,010
    edited 2013-05-27 15:13
    Gareth wrote: »
    Find me the characters in 8x8 dot matrix characters and i can do it tomorrow........seriously....... using the S2

    I don't think that many Chinese characters cant be represented in 8 x 8 pixels.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-05-27 15:18
    16 x 16 can do quite a few, but I have doubts about anything less than 32 x 32 for all 7000 plus characters, some with 33 brush strokes... maybe 64 x 64 would be best
  • GarethGareth Posts: 278
    edited 2013-05-27 15:19
    W9GFO wrote: »
    I don't think that many Chinese characters cant be represented in 8 x 8 pixels.
    Yes it seems that 16x16 is the minimum, my hope is that this is not the case...... however 16x16 is still possible with the solution i am thinking....
  • GarethGareth Posts: 278
    edited 2013-05-27 15:24
    maybe 64 x 64 would be best
    I will have to study the characters that Ken is requesting to be drawn .....maybe <16 bit "Luck" is on the S2s side.....
  • TymkrsTymkrs Posts: 539
    edited 2013-05-27 15:25
    I think it might be nice - esp if it's at some sort of demo, if you had it say multiple things in chinese like. "Hello everyone, my name is the S2 Robot. Nice to meet you. May we have a long lasting friendship" Just thinking of how I'd be impressed if I were running around some robot demo conference. If you choose to go the four idiom route, it may even behoove you to have four robots writing the phrase at the same time. so they'd start at the same time, and then end at the same time. That'd be pretty impressive.

    And sadly I can't find the correct browser encoding to read what MacTuxLin said sadly, but the original phrase does sound a bit odd (sorry Ken), though I'm sure they'd understand it. I'll see if I can ask my dad (who's much better at chinese than me :p). PS Mac, you may have to write it a bit slower in a video for the non-native writers :)
  • NikosGNikosG Posts: 705
    edited 2013-05-27 15:35
    Hello everybody,

    Today was a “Chinese” day for me. I’ve just finished the “Chinese project” and here is the result. After a small research on the Net I found the right sequence for each character of the phrase "中美友谊万岁"

    attachment.php?attachmentid=101901&d=1369693678

    Programming the S2 I tried to obey these rules (you can check the video).
    I followed the procedure with the coordinates and the excel file and here is the result:

    attachment.php?attachmentid=101902&d=1369693681

    Here is the phrase written by my S2. However characters are smaller from 30 foot because my board isn’t big enough. As you can see from the video I push my S2 back to the board in order to scribble the last character! However you can change the size into excel file (I think that 25 or 30 would be ok)
    At the end of this post you’ll find a zip file with the spin code of each character, as well as the excel file if you want to change something. I’m sure that Rich can finish the job and put all together!
    Next video is for Ken. I believe that he want something like this. (The Chinese background music is from this link)

    [video=youtube_share;8XiA1hgkaY8]


    Nikos
  • W9GFOW9GFO Posts: 4,010
    edited 2013-05-27 16:25
    Nice work! It sure didn't take you long. They look pretty good. The characters will look even nicer with a fat Sharpie.

    I wonder how hard it would be to modify Phil's driver so that the S2 would go to the next coordinate in reverse if it meant less turning. In other words, if the next coordinate is behind it, it should drive backwards to reach it. Much time would be saved and less error would accumulate.
  • HumanoidoHumanoido Posts: 5,770
    edited 2013-05-27 19:50
    NikosG
    Excellent work! You did a great job and in record time!
    Ken may want to additionally commission you for the Klingon Alphabet
    as sales are running brisk on the home world.
    (Star Trek is the number one movie the past 3 weeks here)
    klingon.jpg
    102 x 35 - 6K
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-05-27 20:53
    Nikos,

    Amazing: not only printing the strokes, but in the correct order! You've done a great service. Ken's Chinese friends will truly be impressed!

    -Phil
  • TymkrsTymkrs Posts: 539
    edited 2013-05-28 04:43
    Nice job Nikos!!
  • MacTuxLinMacTuxLin Posts: 821
    edited 2013-05-28 05:10
    Wow NikosG, that's some amazing work! Hats off to you.
    Tymkrs wrote: »
    PS Mac, you may have to write it a bit slower in a video for the non-native writers :)
    Oops sorry! So used to the writing style that forgotten to write them in strokes & not in characters. I'll do better next time :tongue:
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-05-28 05:18
    Very impressive Nikos.

    Only one item that you might want to consider.

    A. The First character is Zhong and that central line should be perfectly vertical.

    So, the final sentence should be "中美友谊万岁“.

    Please don't be offended, that first character makes a huge first impression.


    This is all Simplified Chinese, not Traditional characters.
  • MacTuxLinMacTuxLin Posts: 821
    edited 2013-05-28 06:08
    This is all Simplified Chinese, not Traditional characters.

    Erm, are these supposed to be displayed in Mainland China? If so, then Simplified Chinese is correct as they are the standard Beijing Mandarin Chinese. However, if these are to be displayed in Taiwan, then Traditional Chinese characters ought to be used.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-05-28 08:05
    Simplified versus Traditional.

    In Post #1, Ken said this is what was requested.
    But in responding to my first post (Post #7) he said something about wanting traditional stroke sequences.

    My take is he wants the Simplified characters written as if a traditional brush stroke sequence was used.
  • GarethGareth Posts: 278
    edited 2013-05-28 15:40
    Here would be another solution i am working on now (a different project i might add - this i an 8X8 bit character payload) .... at moment i am modifying it to sport a 16X UV_Bar (meaning 16X16 bit graphic character payloads)

    [video=youtube_share;kLy3QcHOnOk]
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-05-29 08:10
    @Gareth

    That is a great presentation with the UV. Does that require a special ink?

    @Nikos

    Umm, have you verified the actual brush counts and the correct direction of writting strokes. IN that reference diagram, many boxes have more than one brush stroke.

    For instances, your first character is as follows:

    1. First stroke is down.
    2. Second stroke is top across from left to right, and down of the right side
    3. Third stroke is left to right (I think you got right to left) to complete the box
    4. Fourth stroke is down the middle.

    I realize this makes it all the more tedious, but the errors are obvious to any and all Chinese from elementary school on.

    There are dictionaries that list the exact brush stoke counts, but there are also tutorials on the set of rules that apply.

    And so a simple box is actually 3 strokes, not 4. And one cannot simply go clockwise or counter-clockwise. It is top to bottom and left to right.

    Oh, of course that box is an exception to the general rules, just like the stuff you learned about English in elementary school.

    http://www.zhongwen.com/shufa/

    And here is a link to animated brush stroke demonstrations that you can cut and paste in characters you want to learn

    http://lost-theory.org/ocrat/chargif/
  • GarethGareth Posts: 278
    edited 2013-05-29 13:45
    Does that require a special ink?
    No special ink..... just a sheet of Phosphorescent vinyl...... the sheet is mega sensitive to UV light, a 1 second flash of UV from a UV led is enough to create a dot on the sheet that lasts for maybe 1 hour before fading slowly away.... to be used again. UV lasers have a much more dramatic longer lasting effect.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-05-30 07:19
    So you could easily write Chinese brush strokes that would just fade away after a period of time. That is quite attractive as a graphic demo in a crowded dimly lit room, or outdoors at night.

    There is a special paper that is made for Chinese students to practice brush stroke calligraphy. Instead of using black ink, you just use clear water and the image disappears after it dries out. This allows parents to avoid all the mess of piles of inky paper, ink spills, and dirty brushes.

    You are on to something useful for Parallax promotions.
  • NikosGNikosG Posts: 705
    edited 2013-05-30 14:30
    @Loopy,

    Thanks for all of your indications! Actually I was waiting your feedback for improvements.
    I was sure that I have done many mistakes as it was only “One day project” about 8 hours.
    Actually I spend most time in order to print each character and find the coordinates, capture the video etc.
    I had also a small accident as I had to replace the mini servo of my S2’s pen lifter. My research on the Net about Chinese writing was only a half hour.
    I’m still trying to understand the “philosophy” of this amazing way of writing!
    The more I learn the more I love it! As Humanoido said : Chinese writing is full of flavor, culture, connotation, history, reference, style, prose, subtlety, current events, etc.. So any approach demands attention and a deeper examination!
    In any case the topic is an amazing school project that combines History,Chinese language, artistic skills, computers and robotics, and mathematics!
    I also have in mind a completely new approach of this amazing challenge. I believe that the “key” is to create SPIN code for the different “Strokes”.
    Then we can create any character putting the appropriate stroke in the right place inside the imaginable “BOX” of the character.

    Anyway I must see more videos about this topic. Any suggestion is welcome!
    Thank you for the suggested links!

    I’ll try to create a new version of the phase taking into account what you said till the timeline given by Ken.


    Nikos
  • NikosGNikosG Posts: 705
    edited 2013-05-30 14:34
    Gareth wrote: »
    No special ink..... just a sheet of Phosphorescent vinyl...... the sheet is mega sensitive to UV light, a 1 second flash of UV from a UV led is enough to create a dot on the sheet that lasts for maybe 1 hour before fading slowly away.... to be used again. UV lasers have a much more dramatic longer lasting effect.

    Gareth,

    I saw your video: How to Epicycloid A Robot with Ultra Violet Leds - Using an S2 Parallax Turtle.
    It is a really cool job!
    I noticed that you have done dots in different size (some dots are bigger from the others). You can really control the size (the diameter) of the dot? Can you create dots in four different sizes? E.g: Very small , small , normal and bigger ?
    My question doesn’t have to do with the “chinese” project.
    I try to scribble an Image with my S2 using different size dots, but it is difficult to make the dots with the pen.
Sign In or Register to comment.