Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Your Projects subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Project Ideas/Start New Projects => Your Projects
Author Message
Ed H


Member


Joined: 30 Nov 2007
Posts: 138

Posted: 17 Jan 2010 03:19:35 pm    Post subject:

Just an idea: store all the hiragana/katakana characters and their romanizations, and write a routine to draw them, so that various flashcard/reference programs can be made.

My take on this idea would be to store characters not as bitmaps, but rather as a collection of strokes, which I suppose could be stored as curves+thicknesses. How I'd do this exactly I'm not sure yet... parametric equations? Bezier curves? Doing it this way allows the program to keep track of both stoke order and stroke direction, which is pretty nice.
Back to top
cjgone
Aw3s0m3


Active Member


Joined: 24 May 2006
Posts: 693

Posted: 19 Jan 2010 12:11:34 am    Post subject:

In BASIC or assembler?
Back to top
Mapar007


Advanced Member


Joined: 04 Oct 2008
Posts: 365

Posted: 19 Jan 2010 09:57:14 am    Post subject:

My vote is asm. You can keep memory structures WAY smaller. (BASIC uses minimum 9 bytes...)

Last edited by Guest on 19 Jan 2010 09:57:25 am; edited 1 time in total
Back to top
DrDnar


Member


Joined: 28 Aug 2009
Posts: 116

Posted: 19 Jan 2010 06:00:19 pm    Post subject:

An 8×8 bitmap will require 8 bytes, and a 16×16 bitmap will require 32 bytes.

If you use cubic Bézier curves, drawing will be slower, and there are several encoding options:

  • If you use 16×16 characters, you might be able to get away with using one byte per coordinate pair (%xxxxyyyy format).
  • Or, you could use one byte per axis, increasing size, but probably giving more flexibility ($xxyy format).
  • Most applications use quadratic (3 coordinates) or cubic (4 coordinates) Bézier curves.
  • Cubic with 2-byte coordinates will probably give the best results. Plus, 2-byte coordinates will allow you to scale the characters up for better detail, if the user wants it.

Each curve, therefore, could take 3 to 8 bytes. So figure out what size characters you want and how many curves each character will have and decide which will be more space efficient. I think I'd go with bitmaps myself.

Bézier curves, by the way, are usually drawn using parametrics. Wikipedia has the equations. I once wrote a BASIC program that could draw Bézier curves.
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are GMT - 5 Hours

 

Advertisement