Samsung SPen SDK v2.3 exercise

July 20th, 2014

According to Samsung SPen developer documentation, we should be using the latest Samsung Mobile SDK, version 3.0.  SPen SDK version 2.3 will no longer be supported after the 2014 calendar year.  The developer website is full of examples for the SPen usage for native mobile development in java.  Here is an SCanvasView intro page. For the most simple pen drawing exercise with SPen SDK version 2.3, I am creating this SCanvasView exercise, Note2Stylus.  All the smarts like anti-aliasing, smoothing and line thickness is handled by the SCanvasView right out of the box, very cool.  This app is created with Eclipse Juno – Android developer tool with SDK version 23.  The target hardware device is a Samsung Note 2 with Android 4.4.2.


MachWaves – Android

July 6th, 2014

Prototype and testing on Android 4.4.2, Saumsung Note II, the MachWaves app is build with eclipse-ADT, consisting of three tab-fragments, camera, configuration and about (help) page.

tab1Small tab2Small tab3Small

On tab1, camera feature current only supports still photo in portrait mode.  The highlight is default with a green color but should make it to tab2, configuration page in next iteration.  What else would be helpful in configuration ?  (highlight stroke thickness, saved file style, auto-save, angle in radian, ??).  Tab3 is the help page with a browser link to the generic support page.


Saved files are currently placed in /storage/emulated/0/Pictures/ directory.  The file name follows the structure, d MMM yyyy HH:mm:ss.png.  There is currently no way of saving the highlighted image with angle and mach number information.  Would that feature be of interest ?  Maybe I should offer the option to save file as jpeg or gif too.

base1 base2

Touch start/end events for two lines are drawn as highlight for the Canvas layer.  For the Mach angle, I determine intersecting vectors and calculate their dot product.  Mach number is estimated by the relationship, sin (mach-angle) = 1 / mach-number.  For more information, see reference, Compressible-Fluid Dynamics by Philip A. Thompson, 1988.

Download from GooglePlay, here or pull the source code available on GitHub.  Feel free to use it in anyway you see fit though higher quality code will be available next iteration.  Any suggestion is greatly appreciated.


June 26th, 2014

Thank you Professor Andy Davidhazy, RIT for teaching schileren method among many other flow visualization techniques. Thank you Dr. Brown of NASA Ames Research center for including me in your experiments.

Decades ago, I was privileged to work (co-op) at the Imaging Technology Branch of NASA Ames Research Center.  For most of the experience, I was in awe, fascinated by the brilliant minds, facilities and experiments much like a child would in Disney World.


In one particular photographic assignment at the High-Reynolds laboratory, I was allowed to inquire/propose a moire schileren technique I read and learned from an old text, Schlieren Methods, Douglas William Holder, 1963 (rare but available at RIT library).  For knife edge replacements, I created various ronchi rulings with the following result-best case  (a) parallel-ronchi-rules-supersonic-flow (b) rotated-ronchi-rules-no-flow (c) rotated-ronchi-rules-supersonic-flow.



Recently, I developed these mobile apps, Machwaves to offer simple photo/video capability and measure mach angle, mach number.  As I have no qualifying fluid dynamic experience, I welcome any input or correction on this application.  Source code in objective-C and Java is freely available.  Information about the app and download sites are available here.







May 26th, 2013

An exercise of the Tesseract.

My employer before Perceptive Software had a logo that ‘could have been’ a Tesseract.

Rotate the Tesseract by mouse-over anywhere other than center.

Source code available here on GitHub.

Screen Shot 2013-06-23 at 8.15.02 PM



Random Dot Stereogram

January 6th, 2013

It has been a few years since I was fascinated over random dot sterograms; 3D without glasses or special technology, just have to cross your eyes.. and a headache afterward. :)

Thanks to GPU Gems-chapter 41, here is some javascript to produce the RDS pair of a box (source code on GitHub).

Animating Text

November 26th, 2012

Exercising basic html-javascript text with animation.  Using cubic spline to draw top and bottom curves for text to travel in.  Mouse-click into div to insert curve anchor points.  Source code is available on GitHub.

WPF STL decoder

September 26th, 2012

For my most recent enrichment, this is my first exercise using WPF.  I am implementing a STL binary decoder in C#.  The ASCII format decoder is ‘work-in-progress’.

Visual Studio 2008 DecoderExercise project on GitHub.


FTPWebRequest in VB.NET

September 21st, 2012

One of the nice thing about Visual Studio is your language choice.  Regardless of your preference for C#, C++ or VB, the underlining API is the same.  So, it is a surprise to me that the FTPWebRequest example is missing a VB implementation.  As an exercise assigned, I am porting the C# example into VB for those whom feel left out.  Here is my dialog application that allows you to navigate to a directory, connect to ftp server and put file(s) onto server.  For test comparison, I have also make the sample code into a DLL for testing.  Here is my class library of the MSDN-C# example.

Screen Shot 2012-09-21 at 9.30.25 AM

How interpolation show their effect in frequency domain…

September 9th, 2012

An interesting LinkedIn discussion brought on by Zhonghai Deng.  Here is my exercise displaying frequency plots for 2X interpolation via nearest-neighbor, linear, and cubic.  The original image is a rect function (10 pixels x 1 pixels)  All interpolated images are scaled 2X to (20 pixels x 1 pixel) with Adobe photoshop.  See the result sinc function comparison and/or download the mathematica file and source images.

Android-Flex accelerometer sketch 2

September 4th, 2012

Made some minor enhancement on the year old android application, XLOsketch.  Like the first implementation, accelerometer is required.

Screen Shot 2012-09-04 at 6.56.15 PM

Correction from version 1.0, the drawing path appropriately draws downward as you would expect with gravity.  The steeper the angle, the faster it travels.

IMAG0135Also, there is a pause-continue option.  When paused, user has the control to change the stroke thickness.


Project Source code is available on GoogleSVN.  Or download from Android marketplace (Google play).

Screen Shot 2012-09-04 at 3.35.25 PM