Archive for May, 2007

Colin Moock Interview

May 23, 2007 Comments off

You may have already seen this from Colin’s blog, but here is a great interview of Colin Moock by Mike Downey at FITC this year.  Lots of good discussion of EAS3.  Enjoy!

Categories: Uncategorized

Record Prime Factorization

May 22, 2007 Comments off

Last year, I wrote about prime factorization at the old Singularity blog.  The post included an AS 2 implementation of a textbook algorithm along with some pointers to more advanced methods such as the quadratic sieve and GNFS (General Number Field Sieve ). 

A lot of work has gone into factoring numbers on the RSA Challenge List.  Now, a team including members of the University of Bonn, NTT, and Arjen Lenstra has tackled the Mersene number 2^1039 – 1.  Read more about their results here.

You may download the simple textbook prime factorization from the Downloads section.

Categories: Math

AS 3 Data Structures for Game Developers

May 14, 2007 Comments off

Michael Baczynski recently released a library of data structures targeting game development.  I’m already interested in the BST for some work in bone animation. 

Major props to Michael for releasing the library and making game development easier for all of us!

Categories: Flash, Math


May 6, 2007 2 comments

Although it is pretty evident that this method does pixel-level hit testing, the documentation is pretty cryptic when it comes to *exactly* how to use the method to perform a specific test. I guess it’s one of those things that you have to figure out by looking at lots of examples. So, here is another example to throw into the mix.

I recently had to work on some code (AS2/F8) to highlight individual lines in a TextField on rollOver. Since no such method exists to do this directly, I approximated using TextField height and font metrics to create a number of ‘highlight’ boxes. One of the questions I had was how to determine if a highlight box was underneath a blank line of text.

Since I’m not directly computing the exact text in a single line, I had no way of knowing if a highlight box was underneath a ‘blank’ line. One way to find out is to take a bitmap snapshot of the TextField (actually, the MovieClip containing the TextField), a snapshot of the rectangle, then do a pixel-level hit test between the two BitmapData objects. This process is encapsulated inside a library method that should be usable in other applications.

Download the AS2/F8 example here. I hope it helps demystify BitmapData.hitTest and perhaps you can find use for this approach in another project.

Categories: Flash

Character Rigging Classes Available for Download

May 4, 2007 3 comments

The alpha version of the AS 3 rigging classes is now available for download.  This is the code base accompanying the FITC Toronto presentation on dynamic skeletal animation.  The download includes the entire Singularity package (including the parametric curve library).

Read more here.

Categories: Flex, General