Index: /issm/trunk-jpl/src/mobile/android/ISSM/.classpath
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/.classpath	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/.classpath	(revision 14391)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+	<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="gen"/>
+	<classpathentry kind="output" path="bin/classes"/>
+</classpath>
Index: /issm/trunk-jpl/src/mobile/android/ISSM/.project
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/.project	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/.project	(revision 14391)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>gov.nasa.jpl.issm.main</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.ApkBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
Index: /issm/trunk-jpl/src/mobile/android/ISSM/AndroidManifest.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/AndroidManifest.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/AndroidManifest.xml	(revision 14391)
@@ -0,0 +1,31 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="gov.nasa.jpl.issm"
+    android:versionCode="1"
+    android:versionName="1.0"
+    android:installLocation="preferExternal" >
+    <uses-sdk
+        android:minSdkVersion="10"
+        android:targetSdkVersion="15" />
+	<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+    <application
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme" >
+        <activity android:name="gov.nasa.jpl.issm.SplashScreen"
+            	  android:label="@string/title_activity_issm" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+				<category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+            </activity>
+            <activity
+            android:name="gov.nasa.jpl.issm.MenuPage"
+            android:label="@string/title_activity_issm" >
+        </activity>
+            <activity
+            android:name="gov.nasa.jpl.issm.ISSM"
+            android:label="@string/title_activity_issm" >
+        </activity>
+    </application>
+
+</manifest>
Index: /issm/trunk-jpl/src/mobile/android/ISSM/Makefile.am
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/Makefile.am	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/Makefile.am	(revision 14391)
@@ -0,0 +1,7 @@
+EXTRA_DIST =  AndroidManifest.xml  assets gen jni obj project.properties src Makefile.am bin ic_launcher-web.png libs proguard-project.txt res
+
+#Generate JNI library
+lib_LTLIBRARIES = libISSMJNI.la
+
+libISSMJNI_la_SOURCES = ./jni/Main.cpp
+libISSMJNI_la_LIBADD = $(ISSM_DIR)/src/c/libISSMCore.a $(ISSM_DIR)/externalpackages/gsl/install/lib/libgsl.a
Index: /issm/trunk-jpl/src/mobile/android/ISSM/assets/Map/antarctica.petsc
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/assets/Map/antarctica.petsc	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/assets/Map/antarctica.petsc	(revision 14391)
@@ -0,0 +1,19 @@
+%Petsc options file: SeaRISEgreenland.petsc written from Matlab solver array
+
++NoneAnalysis
+-mat_type aij
+-ksp_type gmres
+-pc_type asm
+-sub_pc_type ilu
+-pc_asm_overlap 5
+-ksp_max_it 100
+-ksp_rtol 1e-15
+
++DiagnosticVertAnalysis
+-mat_type aij
+-ksp_type gmres
+-pc_type asm
+-sub_pc_type ilu
+-pc_asm_overlap 5
+-ksp_max_it 100
+-ksp_rtol 1e-15
Index: /issm/trunk-jpl/src/mobile/android/ISSM/assets/Map/greenland.petsc
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/assets/Map/greenland.petsc	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/assets/Map/greenland.petsc	(revision 14391)
@@ -0,0 +1,19 @@
+%Petsc options file: SeaRISEgreenland.petsc written from Matlab solver array
+
++NoneAnalysis
+-mat_type aij
+-ksp_type gmres
+-pc_type asm
+-sub_pc_type ilu
+-pc_asm_overlap 5
+-ksp_max_it 100
+-ksp_rtol 1e-15
+
++DiagnosticVertAnalysis
+-mat_type aij
+-ksp_type gmres
+-pc_type asm
+-sub_pc_type ilu
+-pc_asm_overlap 5
+-ksp_max_it 100
+-ksp_rtol 1e-15
Index: /issm/trunk-jpl/src/mobile/android/ISSM/bin/AndroidManifest.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/bin/AndroidManifest.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/bin/AndroidManifest.xml	(revision 14391)
@@ -0,0 +1,31 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="gov.nasa.jpl.issm"
+    android:versionCode="1"
+    android:versionName="1.0"
+    android:installLocation="preferExternal" >
+    <uses-sdk
+        android:minSdkVersion="10"
+        android:targetSdkVersion="15" />
+	<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+    <application
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme" >
+        <activity android:name="gov.nasa.jpl.issm.SplashScreen"
+            	  android:label="@string/title_activity_issm" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+				<category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+            </activity>
+            <activity
+            android:name="gov.nasa.jpl.issm.MenuPage"
+            android:label="@string/title_activity_issm" >
+        </activity>
+            <activity
+            android:name="gov.nasa.jpl.issm.ISSM"
+            android:label="@string/title_activity_issm" >
+        </activity>
+    </application>
+
+</manifest>
Index: /issm/trunk-jpl/src/mobile/android/ISSM/jni/Android.mk
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/jni/Android.mk	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/jni/Android.mk	(revision 14391)
@@ -0,0 +1,16 @@
+LOCAL_PATH:= $(call my-dir)
+my_LOCAL_PATH:=$(LOCAL_PATH)
+
+include $(call all-subdir-makefiles)
+
+LOCAL_PATH := $(my_LOCAL_PATH)
+
+include $(CLEAR_VARS)
+LOCAL_PATH := $(my_LOCAL_PATH)
+LOCAL_ALLOW_UNDEFINED_SYMBOLS := true
+LOCAL_CFLAGS := -Wno-psabi -DHAVE_CONFIG_H
+LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -llog -ldl -lm
+LOCAL_MODULE := IssmJni
+LOCAL_SRC_FILES := Main.cpp 
+LOCAL_STATIC_LIBRARIES := libISSMCore libgsl libgslcblas
+include $(BUILD_SHARED_LIBRARY)
Index: /issm/trunk-jpl/src/mobile/android/ISSM/jni/Application.mk
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/jni/Application.mk	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/jni/Application.mk	(revision 14391)
@@ -0,0 +1,4 @@
+APP_STL:= gnustl_static
+APP_CPPFLAGS := -frtti
+APP_CPPFLAGS += -fexceptions
+APP_ABI := armeabi
Index: /issm/trunk-jpl/src/mobile/android/ISSM/jni/Main.cpp
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/jni/Main.cpp	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/jni/Main.cpp	(revision 14391)
@@ -0,0 +1,183 @@
+#include <jni.h>
+#include <android/log.h>
+#include "../../../c/issm.h"
+#include <cstddef>
+#include <stdio.h>
+#include <android/log.h>
+
+namespace gov_nasa_jpl_issm
+{
+	/*Global variables{{{*/
+	FemModel *fm;
+	double* xyz; /*keep vertices information here*/
+	/*}}}*/
+	jint Initialize(JNIEnv *env, jclass clazz, jstring jsolution_type, jstring jabsfile, jstring jrelfile) /*{{{*/
+	{
+		
+		/*arguments to constructor: */
+		int argc; //arguments to constructor.
+		char** argv = NULL;
+		COMM    communicator = 1; //fake communicator for constructor
+		const char* issmname = "issm.exe";
+		char *solution_type = NULL;
+		char *absfile = NULL;
+		char *relfile = NULL;
+
+		/*log:*/
+		__android_log_print(ANDROID_LOG_INFO, "Native","Initializing FemModel");
+
+		/*retrieve from java machine: */
+		solution_type = (char*)env->GetStringUTFChars(jsolution_type,0);
+		absfile = (char*)env->GetStringUTFChars(jabsfile,0);
+		relfile = (char*)env->GetStringUTFChars(jrelfile,0);
+
+		/*creat arguments to call constructor for FemModel: */
+		argc=4; 
+		argv=(char**)malloc(argc*sizeof(char*));
+		argv[0]=(char*)issmname;
+		argv[1]=solution_type;
+		argv[2]=absfile;
+		argv[3]=relfile;
+		
+		/*call Model constructor passing in infile as File Descriptor parameter.*/
+		fm  = new FemModel(argc,argv,communicator);
+
+		/*release strings: */
+		env->ReleaseStringUTFChars(jsolution_type, solution_type); //must realease the char*
+		env->ReleaseStringUTFChars(jabsfile, absfile); //must realease the char*
+		env->ReleaseStringUTFChars(jrelfile, relfile); //must realease the char*
+
+		/*figure out size of solution: */
+		__android_log_print(ANDROID_LOG_INFO, "Native","Number of elements");
+		jint size = (jint) fm->elements->NumberOfElements();
+
+		/*retrieve vertices x,y and z coordinates: */
+		__android_log_print(ANDROID_LOG_INFO, "Native","Retrieving vertices");
+		xyz=fm->vertices->ToXYZ();
+		
+		/*log: */
+		__android_log_print(ANDROID_LOG_INFO, "Native","Done Initializing FemModel");
+
+		return size;
+
+	}
+	/*}}}*/
+	void Solve(JNIEnv *env, jclass clazz , jdouble alpha, jobject buf){ /*{{{*/
+
+		int i,count;
+		double x1,y1,z1,vel1;
+		double x2,y2,z2,vel2;
+		double x3,y3,z3,vel3;
+		int    v1,v2,v3,eid;
+		Patch* patch=NULL;
+		
+		/*log:*/
+		__android_log_print(ANDROID_LOG_INFO, "Native","Solving ");
+
+		/*retrieve buffer: */
+		jdouble *dBuf = (jdouble *)env->GetDirectBufferAddress(buf);
+
+		/*reset basal friction to what it was before: */
+		__android_log_print(ANDROID_LOG_INFO, "Native","alpha %g ",alpha);
+		InputDuplicatex(fm->elements,fm->nodes,fm->vertices,fm->loads,fm->materials,fm->parameters,AndroidFrictionCoefficientEnum,FrictionCoefficientEnum);
+
+		/*now scale friction by alpha: */
+		InputScalex(fm->elements,fm->nodes,fm->vertices,fm->loads,fm->materials,fm->parameters,FrictionCoefficientEnum,alpha/100);
+
+		/*solve: */
+		fm -> Solve();
+
+		/*retrieve results: */
+		__android_log_print(ANDROID_LOG_INFO, "Native","Retrieving results ");
+		patch=fm->elements->ResultsToPatch();
+
+		/*sort out the velocities: */
+		for(i=0;i<patch->numrows;i++){
+			if ((patch->values[i*patch->numcols+0])==VelEnum){
+
+				/*Each row of the Patch object is made of the following information: 
+				  - the result enum_type, 
+				  - the step and time, 
+				  - the id of the element, 
+				  - the interpolation type, 
+				  - the vertices ids, 
+				  - and the values at the nodes (could be different from the vertices)
+				*/
+				eid=(int)patch->values[i*patch->numcols+3]-1;
+				v1=(int)patch->values[i*patch->numcols+5]; 
+				x1=xyz[3*(v1-1)+0]; y1=xyz[3*(v1-1)+1]; z1=xyz[3*(v1-1)+2];
+				
+				v2=(int)patch->values[i*patch->numcols+6];
+				x2=xyz[3*(v2-1)+0]; y2=xyz[3*(v2-1)+1]; z2=xyz[3*(v2-1)+2];
+				
+				v3=(int)patch->values[i*patch->numcols+7];
+				x3=xyz[3*(v3-1)+0]; y3=xyz[3*(v3-1)+1]; z3=xyz[3*(v3-1)+2];
+
+				vel1=patch->values[i*patch->numcols+8]; 
+				vel2=patch->values[i*patch->numcols+9]; 
+				vel3=patch->values[i*patch->numcols+10]; 
+
+				/*plug into dBuf: */
+				/*vertex 1: */
+				dBuf[12*eid+0]=x1;
+				dBuf[12*eid+1]=y1;
+				dBuf[12*eid+2]=z1;
+
+				/*vertex 2: */
+				dBuf[12*eid+3]=x2;
+				dBuf[12*eid+4]=y2;
+				dBuf[12*eid+5]=z2;
+			
+				/*vertex 3: */
+				dBuf[12*eid+6]=x3;
+				dBuf[12*eid+7]=y3;
+				dBuf[12*eid+8]=z3;
+				
+				/*values at 3 vertices: */
+				dBuf[12*eid+9]=vel1;
+				dBuf[12*eid+10]=vel2;
+				dBuf[12*eid+11]=vel3;
+
+			}
+		}
+
+		/*for(i=0;i<148;i++){
+		__android_log_print(ANDROID_LOG_INFO, "Native","%g %g %g | %g %g %g | %g %g %g | %g %g %g\n",
+				dBuf[12*i+0],dBuf[12*i+1],dBuf[12*i+2],
+				dBuf[12*i+3],dBuf[12*i+4],dBuf[12*i+5],
+				dBuf[12*i+6],dBuf[12*i+7],dBuf[12*i+8],
+				dBuf[12*i+9],dBuf[12*i+10],dBuf[12*i+11]);
+		}*/
+
+		/*delete temporary data:*/
+		delete patch;
+
+	}/*}}}*/
+	static JNINativeMethod method_table[] = /*{{{*/
+	{
+			{"createISSMModel"   ,"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I"  , (void *) Initialize},
+			{"solveISSMModel", "(DLjava/nio/DoubleBuffer;)V", (void *) Solve}
+	};
+	/*}}}*/
+}
+
+using namespace gov_nasa_jpl_issm;
+extern "C" jint JNI_OnLoad(JavaVM* vm, void* reserved) /*{{{*/
+{
+    JNIEnv* env;
+    if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) {
+        return -1;
+    }
+    else
+    {
+    	jclass clazz = env->FindClass("gov/nasa/jpl/issm/IssmJni");
+    	if(clazz)
+    	{
+    		env->RegisterNatives(clazz, method_table, 3);
+    		env->DeleteLocalRef(clazz);
+    		return JNI_VERSION_1_6;
+    	}
+    	else return -1;
+    }
+}
+/*}}}*/
Index: /issm/trunk-jpl/src/mobile/android/ISSM/jni/gsllib/Android.mk
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/jni/gsllib/Android.mk	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/jni/gsllib/Android.mk	(revision 14391)
@@ -0,0 +1,13 @@
+LOCAL_PATH:= $(call my-dir)
+my_directory:= $(LOCAL_PATH)
+include $(CLEAR_VARS)
+LOCAL_MODULE    := libgsl
+LOCAL_SRC_FILES := ../../../../../externalpackages/gsl/install/lib/libgsl.a
+LOCAL_EXPORT_C_INCLUDES := $(ISSM_DIR)/externalpackages/gsl/install/include/gsl/
+include $(PREBUILT_STATIC_LIBRARY)
+
+LOCAL_PATH=$(my_directory)
+include $(CLEAR_VARS)
+LOCAL_MODULE    := libgslcblas
+LOCAL_SRC_FILES := ../../../../../externalpackages/gsl/install/lib/libgslcblas.a
+include $(PREBUILT_STATIC_LIBRARY)
Index: /issm/trunk-jpl/src/mobile/android/ISSM/jni/issmlib/Android.mk
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/jni/issmlib/Android.mk	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/jni/issmlib/Android.mk	(revision 14391)
@@ -0,0 +1,8 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+LOCAL_MODULE    := libISSMCore
+LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -llog 
+LOCAL_SRC_FILES := ../../../../../lib/libISSMCore.a
+LOCAL_EXPORT_C_INCLUDES := $(ISSM_DIR)
+include $(PREBUILT_STATIC_LIBRARY)
+
Index: /issm/trunk-jpl/src/mobile/android/ISSM/proguard-project.txt
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/proguard-project.txt	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/proguard-project.txt	(revision 14391)
@@ -0,0 +1,20 @@
+# To enable ProGuard in your project, edit project.properties
+# to define the proguard.config property as described in that file.
+#
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in ${sdk.dir}/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the ProGuard
+# include property in project.properties.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
Index: /issm/trunk-jpl/src/mobile/android/ISSM/project.properties
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/project.properties	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/project.properties	(revision 14391)
@@ -0,0 +1,14 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system edit
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+#
+# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
+#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
+
+# Project target.
+target=android-16
Index: /issm/trunk-jpl/src/mobile/android/ISSM/res/anim/alpha.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/res/anim/alpha.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/res/anim/alpha.xml	(revision 14391)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<alpha
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:fromAlpha="0.0"
+    android:toAlpha="1.0"
+    android:duration="3000" />
Index: /issm/trunk-jpl/src/mobile/android/ISSM/res/anim/translate.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/res/anim/translate.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/res/anim/translate.xml	(revision 14391)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<set
+    xmlns:android="http://schemas.android.com/apk/res/android">
+ 
+<translate
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:fromXDelta="0%"
+    android:toXDelta="0%"
+    android:fromYDelta="200%"
+    android:toYDelta="0%"
+    android:duration="2000"
+    android:zAdjustment="top" />
+ 
+</set>
Index: /issm/trunk-jpl/src/mobile/android/ISSM/res/layout/issmcore.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/res/layout/issmcore.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/res/layout/issmcore.xml	(revision 14391)
@@ -0,0 +1,73 @@
+<RelativeLayout 
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/relativeLay"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="horizontal"
+    android:background="@drawable/background" >
+      <TextView
+        android:id="@+id/friction"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentTop="true"
+        android:textSize="15sp"
+        android:typeface="serif"
+        android:textColor="#f49956"
+        android:text="Friction" />
+      
+      <TextView
+        android:id="@+id/value"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentLeft="true"
+        android:layout_below="@+id/friction"
+        android:typeface="serif"
+        android:textColor="#FF0000"
+        android:text="100%" />
+
+    <gov.nasa.jpl.issm.VerticalSeekBar
+        android:id="@+id/seekbar"
+        android:layout_width="wrap_content"
+        android:layout_height="300dp"
+        android:layout_above="@+id/back"
+        android:layout_marginBottom="50dp"
+        android:max="490"
+        android:progress="100"
+        android:progressDrawable="@layout/seekbar_progress"
+        android:thumb="@drawable/thumb" />
+      
+    <FrameLayout
+        android:id="@+id/frame"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_above="@+id/solve"
+        android:layout_below="@+id/value"
+        android:layout_marginLeft="30dp"
+        android:layout_marginBottom="12dp" >
+    </FrameLayout>
+    
+
+    <Button
+        android:id="@+id/back"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentBottom="true"
+        android:layout_alignParentLeft="true"
+        android:layout_marginBottom="17dp"
+        android:background="@drawable/btn_lightblue_glossy"
+        android:text="Back"/>
+
+    <Button
+        android:id="@+id/solve"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignBaseline="@+id/back"
+        android:layout_alignBottom="@+id/back"
+        android:layout_marginLeft="14dp"
+        android:layout_toRightOf="@+id/back"
+        android:background="@drawable/btn_lightblue_glossy"
+        android:text="Solve"/>
+
+</RelativeLayout>
Index: /issm/trunk-jpl/src/mobile/android/ISSM/res/layout/issmmapselection.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/res/layout/issmmapselection.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/res/layout/issmmapselection.xml	(revision 14391)
@@ -0,0 +1,32 @@
+
+    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent"
+	android:background="@drawable/background" >
+
+        <ImageButton
+            android:id="@+id/greenland"
+            android:layout_width="150dip"
+            android:layout_height="150dip"
+            android:layout_alignParentTop="true"
+            android:layout_centerHorizontal="true"
+            android:layout_marginTop="42dp"
+            android:background="@drawable/greenland" />
+
+		<View
+		    android:layout_width="wrap_content"
+		    android:layout_height="2dip"
+		    android:layout_marginTop="70dip"
+		    android:layout_below="@+id/greenland"
+		    android:background="#DDFFDD" />
+		
+        <ImageButton
+            android:id="@+id/antarctica"
+            android:layout_width="150dip"
+            android:layout_height="150dip"
+            android:layout_alignLeft="@+id/greenland"
+            android:layout_alignParentBottom="true"
+            android:layout_marginBottom="42dp"
+            android:background="@drawable/antarctica" />
+
+           </RelativeLayout>
Index: /issm/trunk-jpl/src/mobile/android/ISSM/res/layout/main_issm.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/res/layout/main_issm.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/res/layout/main_issm.xml	(revision 14391)
@@ -0,0 +1,9 @@
+	<ViewFlipper
+	        xmlns:android="http://schemas.android.com/apk/res/android"
+			android:id="@+id/flipper"
+			android:layout_width="fill_parent"
+			android:layout_height="fill_parent"	>
+	<include android:id="@+id/first"  layout="@layout/issmmapselection" />
+	<include android:id="@+id/second"  layout="@layout/issmcore" />
+	</ViewFlipper>
+
Index: /issm/trunk-jpl/src/mobile/android/ISSM/res/layout/menupage.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/res/layout/menupage.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/res/layout/menupage.xml	(revision 14391)
@@ -0,0 +1,51 @@
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent"
+        android:background="@drawable/background" >
+
+        <ImageButton
+            android:id="@+id/start"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentLeft="true"
+            android:layout_alignParentTop="true"
+            android:layout_marginLeft="19dp"
+            android:layout_marginTop="107dp"
+            android:background="@null"
+            android:src="@drawable/start" />
+        
+        <ImageButton
+            android:id="@+id/video"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentRight="true"
+            android:layout_alignParentTop="true"
+            android:layout_marginRight="19dp"
+            android:layout_marginTop="107dp"
+            android:background="@null"
+            android:src="@drawable/video" />
+        
+        <ImageButton
+            android:id="@+id/intro"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@+id/start"
+            android:layout_marginLeft="19dp"
+            android:layout_marginTop="107dp"
+            android:background="@null"
+            android:src="@drawable/intro" />
+        
+        <ImageButton
+            android:id="@+id/visitus"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@+id/video"
+             android:layout_alignParentRight="true"
+            android:layout_marginRight="19dp"
+            android:layout_marginTop="107dp"
+            android:background="@null"
+            android:src="@drawable/visitus" />
+        
+ 
+
+    </RelativeLayout>
Index: /issm/trunk-jpl/src/mobile/android/ISSM/res/layout/popuptext.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/res/layout/popuptext.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/res/layout/popuptext.xml	(revision 14391)
@@ -0,0 +1,39 @@
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    android:orientation="vertical" 
+    android:background="@android:color/background_light">
+     <ScrollView android:layout_width="fill_parent"
+    	android:layout_height="0dip" 
+    	android:layout_weight="1">
+    	 <LinearLayout 
+		     android:layout_width="wrap_content"
+		     android:layout_height="wrap_content"
+		     android:orientation="vertical" 
+		     android:layout_margin="1dp">
+	    		<TextView
+		          android:background="#07000000"
+		          android:id="@+id/header"
+		          android:layout_width="wrap_content"
+				  android:layout_height="wrap_content"
+				  android:gravity="center"	
+				  android:textStyle="bold" 
+				  android:textSize="20sp"
+		          android:text="\tWelcome to the Ice Sheet System Model (ISSM)." >
+		      </TextView>
+		      <TextView
+		          android:background="#07000000"
+		          android:id="@+id/infotext"
+		          android:layout_width="wrap_content"
+				  android:layout_height="wrap_content"	 
+		          android:text="\tISSM is the result of a collaboration between the Jet Propulsion Laboratory and University of California at Irvine. Its purpose is to tackle the challenge of modeling the evolution of the polar ice caps in Greenland and Antarctica. \n\tISSM is funded by the NASA Cryosphere and MAP (Modeling Analysis and Prediction) programs, JPL R&amp;TD(Research, Technology and Development) and the National Science Foundation. Our main collaborators are:MSSMat Laboratory of École Centrale Paris, Argonne National Laboratory and the Department of Geology of University of Buffalo, NY.\n\tAs synthesized in the last Intergovernmental Panel on Climate Change (IPCC) Assessment Report AR4,future changes in the Greenland and Antarctic ice sheet mass, particularly due to changes in ice flow,are a major source of uncertainty that could increase sea level rise projections.\n\tTo remedy this problem, large scale ice flow models are necessary that can accurately model the evolution of Greenland and Antarctica in a warming climate. In order to achieve this goal,and improve projections of future sea level rise, ISSM relies on state of the art technologies,developed in synergy with the Research and Technology Development (R&amp;TD) at JPL." >
+			  </TextView>
+		</LinearLayout>
+	</ScrollView>
+		      <Button
+		          android:id="@+id/dismiss"
+		          android:layout_width="fill_parent"
+		          android:layout_height="wrap_content"
+		          android:text="Dismiss" >
+		      </Button>
+</LinearLayout>
Index: /issm/trunk-jpl/src/mobile/android/ISSM/res/layout/seekbar_progress.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/res/layout/seekbar_progress.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/res/layout/seekbar_progress.xml	(revision 14391)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:id="@android:id/background">
+        <nine-patch
+            xmlns:android="http://schemas.android.com/apk/res/android"
+            android:src="@drawable/seek_bg"
+            android:dither="true"
+         />
+    </item>
+    <item android:id="@android:id/secondaryProgress">
+        <clip>
+            <shape>
+                <gradient
+                    android:startColor="#80028ac8"
+                    android:centerColor="#80127fb1"
+                    android:centerY="0.75"
+                    android:endColor="#a004638f"
+                    android:angle="270"
+                />
+            </shape>
+        </clip>
+    </item>
+    <item
+        android:id="@android:id/progress"
+        android:drawable="@layout/seekbar_progress_bg"
+    />
+</layer-list>
Index: /issm/trunk-jpl/src/mobile/android/ISSM/res/layout/seekbar_progress_bg.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/res/layout/seekbar_progress_bg.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/res/layout/seekbar_progress_bg.xml	(revision 14391)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+ <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item>
+        <clip>
+        <bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+            android:src="@drawable/blue" 	
+            android:antialias="true"
+            android:dither="false"
+            android:filter="false"
+            android:gravity="left"
+        />
+        </clip>
+    </item>
+</layer-list>
Index: /issm/trunk-jpl/src/mobile/android/ISSM/res/layout/splashscreen.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/res/layout/splashscreen.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/res/layout/splashscreen.xml	(revision 14391)
@@ -0,0 +1,16 @@
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    android:background="@drawable/background"
+    android:layout_gravity="center"
+     android:id="@+id/lin_lay"
+    android:gravity="center"
+    android:orientation="vertical" >
+ 
+    <ImageView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:id="@+id/logo"
+        android:background="@drawable/issm_logo" />
+ 
+</LinearLayout>
Index: /issm/trunk-jpl/src/mobile/android/ISSM/res/menu/activity_issm.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/res/menu/activity_issm.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/res/menu/activity_issm.xml	(revision 14391)
@@ -0,0 +1,6 @@
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:id="@+id/menu_settings"
+        android:title="@string/menu_settings"
+        android:orderInCategory="100"
+        android:showAsAction="never" />
+</menu>
Index: /issm/trunk-jpl/src/mobile/android/ISSM/res/menu/issm_menu.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/res/menu/issm_menu.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/res/menu/issm_menu.xml	(revision 14391)
@@ -0,0 +1,36 @@
+    <menu xmlns:android="http://schemas.android.com/apk/res/android">
+        <item android:id="@+id/menu_color"
+          android:icon="@drawable/ic_color"
+          android:title="Color" >
+          <menu>
+          	<item android:id="@+id/cl_hsv"
+          	      android:title="HSV" />
+          	<item android:id="@+id/cl_autumn"
+          	      android:title="Autumn" />
+          	<item android:id="@+id/cl_bone"
+          	      android:title="Bone" />                
+          	<item android:id="@+id/cl_cool"
+          	      android:title="Cool" />
+          	<item android:id="@+id/cl_copper"
+          	      android:title="Copper" />
+          	<item android:id="@+id/cl_gray"
+          	      android:title="Gray" />
+          	<item android:id="@+id/cl_hot"
+          	      android:title="Hot" />
+          	<item android:id="@+id/cl_jet"
+          	      android:title="Jet" />
+          	<item android:id="@+id/cl_pink"
+          	      android:title="Pink" />
+          	<item android:id="@+id/cl_spring"
+          	      android:title="Spring" />
+          	<item android:id="@+id/cl_winter"
+          	      android:title="Winter" />
+          	<item android:id="@+id/cl_summer"
+          	      android:title="Summer" />                                                      
+          </menu>
+     </item>   
+ 
+    	<item android:id="@+id/menu_about"
+          android:icon="@drawable/ic_about"
+          android:title="About" />
+    	</menu>
Index: /issm/trunk-jpl/src/mobile/android/ISSM/res/values-large/dimens.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/res/values-large/dimens.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/res/values-large/dimens.xml	(revision 14391)
@@ -0,0 +1,7 @@
+<resources>
+
+    <dimen name="padding_small">8dp</dimen>
+    <dimen name="padding_medium">16dp</dimen>
+    <dimen name="padding_large">16dp</dimen>
+
+</resources>
Index: /issm/trunk-jpl/src/mobile/android/ISSM/res/values-v11/styles.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/res/values-v11/styles.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/res/values-v11/styles.xml	(revision 14391)
@@ -0,0 +1,5 @@
+<resources>
+
+    <style name="AppTheme" parent="android:Theme.Holo.Light" />
+
+</resources>
Index: /issm/trunk-jpl/src/mobile/android/ISSM/res/values-v14/styles.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/res/values-v14/styles.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/res/values-v14/styles.xml	(revision 14391)
@@ -0,0 +1,5 @@
+<resources>
+
+    <style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar" />
+
+</resources>
Index: /issm/trunk-jpl/src/mobile/android/ISSM/res/values/dimens.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/res/values/dimens.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/res/values/dimens.xml	(revision 14391)
@@ -0,0 +1,7 @@
+<resources>
+
+    <dimen name="padding_small">8dp</dimen>
+    <dimen name="padding_medium">8dp</dimen>
+    <dimen name="padding_large">16dp</dimen>
+
+</resources>
Index: /issm/trunk-jpl/src/mobile/android/ISSM/res/values/strings.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/res/values/strings.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/res/values/strings.xml	(revision 14391)
@@ -0,0 +1,8 @@
+<resources>
+
+    <string name="app_name">ISSM</string>
+    <string name="hello_world">Hello world!</string>
+    <string name="menu_settings">Settings</string>
+    <string name="title_activity_issm">ISSM</string>
+
+</resources>
Index: /issm/trunk-jpl/src/mobile/android/ISSM/res/values/styles.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/res/values/styles.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/res/values/styles.xml	(revision 14391)
@@ -0,0 +1,5 @@
+<resources>
+
+    <style name="AppTheme" parent="android:Theme.Light" />
+
+</resources>
Index: /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/ColorBar.java
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/ColorBar.java	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/ColorBar.java	(revision 14391)
@@ -0,0 +1,94 @@
+package gov.nasa.jpl.issm;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.view.MotionEvent;
+import android.view.View;
+/////////////////////////////////////////////////////////////
+public class ColorBar extends View
+{
+	Paint paint = new Paint();
+	Paint textpaint = new Paint();
+	//coordinate of the colorbar
+    private int width = 30;
+	private int start_x = 10;
+	private int start_y = 30;
+	private int end_y = 0;
+	boolean touch;
+	final int MAX_SCALING =255;
+	double [][] colorBuffer;
+    public ColorBar(Context context)
+    {
+        super(context);
+        setWillNotDraw(false);
+        paint.setStrokeWidth(5);
+		textpaint.setColor(Color.WHITE);
+        textpaint.setTextSize(20);
+        touch = false;
+    }
+//----------------------------------------------------------------    
+    //change the color map
+    public void setColorMap(ColorMap colorMap)
+    {
+    	this.colorBuffer = colorMap.getColorBuffer();
+    }
+//----------------------------------------------------------------        
+    @Override
+    public void onDraw(Canvas canvas) 
+    {
+    	int r,g,b;
+    	int y = start_y;
+    	for(int i = 0; i < 64; i++ )
+    	{  	
+    		r =  Math.round((float)colorBuffer[i][0]*MAX_SCALING);
+    		g =  Math.round((float)colorBuffer[i][1]*MAX_SCALING);
+    		b =  Math.round((float)colorBuffer[i][2]*MAX_SCALING);
+    		paint.setColor(Color.argb(MAX_SCALING, r, g, b));
+    		canvas.drawLine(start_x, y, start_x+width, y, paint);
+    		
+    		if(i == 60)  canvas.drawText("_0.0", start_x+width, y, textpaint);
+    		if(i == 48) canvas.drawText("_0.2", start_x+width, y, textpaint);
+    		if(i == 36) canvas.drawText("_0.4", start_x+width, y, textpaint);
+    		if(i == 24) canvas.drawText("_0.6", start_x+width, y, textpaint);
+    		if(i == 12) canvas.drawText("_0.8", start_x+width, y, textpaint);
+    		if(i == 0) canvas.drawText("_1.0", start_x+width, y, textpaint);
+    		
+    		y+=5;
+    	}
+    	
+    	end_y = y;
+    }
+//----------------------------------------------------------------        
+    //allow user to move color bar around
+    @Override
+    public boolean onTouchEvent (MotionEvent event)
+    {
+
+	      if (event.getAction() == MotionEvent.ACTION_DOWN) 
+	      {    
+	    	  int x = (int) event.getX();
+	    	  int y = (int) event.getY(); 
+	    	  if(x >= start_x && x <= start_x+width && y >= start_y && y <= end_y)
+	    		  touch = true;
+	      } 
+	      else if (event.getAction() == MotionEvent.ACTION_MOVE) 
+	      {
+	    	 if(touch)
+	    	 {
+	    		 start_x = (int) event.getX();
+	    		 start_y = (int) event.getY(); 
+	    	 }
+	    	 invalidate();
+	
+	      } 
+	      else if (event.getAction() == MotionEvent.ACTION_UP) 
+	      {
+	    	  touch = false;
+	      }
+	      return true;
+    }
+//----------------------------------------------------------------        
+}
+////////////////////////////////////////////////////////////////////////////
Index: /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/ColorMap.java
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/ColorMap.java	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/ColorMap.java	(revision 14391)
@@ -0,0 +1,915 @@
+package gov.nasa.jpl.issm;
+
+/////////////////////////////////////////////////////////
+class ColorMap
+{
+	private double[][] d;
+	final int rowNumber = 64;
+//-------------------------------------------------------
+	public ColorMap()
+	{
+		setDefault();
+	}
+//-------------------------------------------------------
+	public double[][] getColorBuffer()
+	{
+		return d;
+	}
+//--------------------------------------------------------	
+	//set default color map => hsv {{{
+	public void setDefault()
+	{
+		d = new double[][]{	
+				{1.0, 	0.0, 	0.0 },
+				{ 1.0, 	0.0938, 	0.0 },
+				{ 1.0, 	0.1875, 	0.0 },
+				{ 1.0, 	0.2813, 	0.0 },
+				{ 1.0, 	0.375, 	0.0 },
+				{ 1.0, 	0.4688, 	0.0 },
+				{ 1.0, 	0.5625, 	0.0 },
+				{ 1.0, 	0.6563, 	0.0 },
+				{ 1.0, 	0.75, 	0.0 },
+				{ 1.0, 	0.8438, 	0.0 },
+				{ 1.0, 	0.9375, 	0.0 },
+				{ 0.9688, 	1.0, 	0.0 },
+				{ 0.875, 	1.0, 	0.0 },
+				{ 0.7813, 	1.0, 	0.0 },
+				{ 0.6875, 	1.0, 	0.0 },
+				{ 0.5938, 	1.0, 	0.0 },
+				{ 0.5, 	1.0, 	0.0 },
+				{ 0.4063, 	1.0, 	0.0 },
+				{ 0.3125, 	1.0, 	0.0 },
+				{ 0.2188, 	1.0, 	0.0 },
+				{ 0.125, 	1.0, 	0.0 },
+				{ 0.0313, 	1.0, 	0.0 },
+				{ 0.0, 	1.0, 	0.0625 },
+				{ 0.0, 	1.0, 	0.1563 },
+				{ 0.0, 	1.0, 	0.25 },
+				{ 0.0, 	1.0, 	0.3438 },
+				{ 0.0, 	1.0, 	0.4375 },
+				{ 0.0, 	1.0, 	0.5313 },
+				{ 0.0, 	1.0, 	0.625 },
+				{ 0.0, 	1.0, 	0.7188 },
+				{ 0.0, 	1.0, 	0.8125 },
+				{ 0.0, 	1.0, 	0.9063 },
+				{ 0.0, 	1.0, 	1.0 },
+				{ 0.0, 	0.9063, 	1.0 },
+				{ 0.0, 	0.8125, 	1.0 },
+				{ 0.0, 	0.7188, 	1.0 },
+				{ 0.0, 	0.625, 	1.0 },
+				{ 0.0, 	0.5313, 	1.0 },
+				{ 0.0, 	0.4375, 	1.0 },
+				{ 0.0, 	0.3438, 	1.0 },
+				{ 0.0, 	0.25, 	1.0 },
+				{ 0.0, 	0.1563, 	1.0 },
+				{ 0.0, 	0.0625, 	1.0 },
+				{ 0.0313, 	0.0, 	1.0 },
+				{ 0.125, 	0.0, 	1.0 },
+				{ 0.2188, 	0.0, 	1.0 },
+				{ 0.3125, 	0.0, 	1.0 },
+				{ 0.4063, 	0.0, 	1.0 },
+				{ 0.5, 	0.0, 	1.0 },
+				{ 0.5938, 	0.0, 	1.0 },
+				{ 0.6875, 	0.0, 	1.0 },
+				{ 0.7813, 	0.0, 	1.0 },
+				{ 0.875, 	0.0, 	1.0 },
+				{ 0.9688, 	0.0, 	1.0 },
+				{ 1.0, 	0.0, 	0.9375 },
+				{ 1.0, 	0.0, 	0.8438 },
+				{ 1.0, 	0.0, 	0.75 },
+				{ 1.0, 	0.0, 	0.6563 },
+				{ 1.0, 	0.0, 	0.5625 },
+				{ 1.0, 	0.0, 	0.4688 },
+				{ 1.0, 	0.0, 	0.375 },
+				{ 1.0, 	0.0, 	0.2813 },
+				{ 1.0, 	0.0, 	0.1875 },
+				{ 1.0, 	0.0, 	0.0938 }
+			};
+	} 
+	//}}}
+//-------------------------------------------------------
+	public void setAutumn()
+	{
+		d = new double[][]{
+				{ 1.0, 	0.0, 	0.0 },
+				{ 1.0, 	0.0159, 	0.0 },
+				{ 1.0, 	0.0317, 	0.0 },
+				{ 1.0, 	0.0476, 	0.0 },
+				{ 1.0, 	0.0635, 	0.0 },
+				{ 1.0, 	0.0794, 	0.0 },
+				{ 1.0, 	0.0952, 	0.0 },
+				{ 1.0, 	0.1111, 	0.0 },
+				{ 1.0, 	0.127, 	0.0 },
+				{ 1.0, 	0.1429, 	0.0 },
+				{ 1.0, 	0.1587, 	0.0 },
+				{ 1.0, 	0.1746, 	0.0 },
+				{ 1.0, 	0.1905, 	0.0 },
+				{ 1.0, 	0.2063, 	0.0 },
+				{ 1.0, 	0.2222, 	0.0 },
+				{ 1.0, 	0.2381, 	0.0 },
+				{ 1.0, 	0.254, 	0.0 },
+				{ 1.0, 	0.2698, 	0.0 },
+				{ 1.0, 	0.2857, 	0.0 },
+				{ 1.0, 	0.3016, 	0.0 },
+				{ 1.0, 	0.3175, 	0.0 },
+				{ 1.0, 	0.3333, 	0.0 },
+				{ 1.0, 	0.3492, 	0.0 },
+				{ 1.0, 	0.3651, 	0.0 },
+				{ 1.0, 	0.381, 	0.0 },
+				{ 1.0, 	0.3968, 	0.0 },
+				{ 1.0, 	0.4127, 	0.0 },
+				{ 1.0, 	0.4286, 	0.0 },
+				{ 1.0, 	0.4444, 	0.0 },
+				{ 1.0, 	0.4603, 	0.0 },
+				{ 1.0, 	0.4762, 	0.0 },
+				{ 1.0, 	0.4921, 	0.0 },
+				{ 1.0, 	0.5079, 	0.0 },
+				{ 1.0, 	0.5238, 	0.0 },
+				{ 1.0, 	0.5397, 	0.0 },
+				{ 1.0, 	0.5556, 	0.0 },
+				{ 1.0, 	0.5714, 	0.0 },
+				{ 1.0, 	0.5873, 	0.0 },
+				{ 1.0, 	0.6032, 	0.0 },
+				{ 1.0, 	0.619, 	0.0 },
+				{ 1.0, 	0.6349, 	0.0 },
+				{ 1.0, 	0.6508, 	0.0 },
+				{ 1.0, 	0.6667, 	0.0 },
+				{ 1.0, 	0.6825, 	0.0 },
+				{ 1.0, 	0.6984, 	0.0 },
+				{ 1.0, 	0.7143, 	0.0 },
+				{ 1.0, 	0.7302, 	0.0 },
+				{ 1.0, 	0.746, 	0.0 },
+				{ 1.0, 	0.7619, 	0.0 },
+				{ 1.0, 	0.7778, 	0.0 },
+				{ 1.0, 	0.7937, 	0.0 },
+				{ 1.0, 	0.8095, 	0.0 },
+				{ 1.0, 	0.8254, 	0.0 },
+				{ 1.0, 	0.8413, 	0.0 },
+				{ 1.0, 	0.8571, 	0.0 },
+				{ 1.0, 	0.873, 	0.0 },
+				{ 1.0, 	0.8889, 	0.0 },
+				{ 1.0, 	0.9048, 	0.0 },
+				{ 1.0, 	0.9206, 	0.0 },
+				{ 1.0, 	0.9365, 	0.0 },
+				{ 1.0, 	0.9524, 	0.0 },
+				{ 1.0, 	0.9683, 	0.0 },
+				{ 1.0, 	0.9841, 	0.0 },
+				{ 1.0, 	1.0, 	0.0 }
+			};
+	}
+//-------------------------------------------------------
+	public void setBone()
+	{
+		d = new double[][]{
+				{ 0.0, 	0.0, 	0.0052 },
+				{ 0.0139, 	0.0139, 	0.0243 },
+				{ 0.0278, 	0.0278, 	0.0434 },
+				{ 0.0417, 	0.0417, 	0.0625 },
+				{ 0.0556, 	0.0556, 	0.0816 },
+				{ 0.0694, 	0.0694, 	0.1007 },
+				{ 0.0833, 	0.0833, 	0.1198 },
+				{ 0.0972, 	0.0972, 	0.1389 },
+				{ 0.1111, 	0.1111, 	0.158 },
+				{ 0.125, 	0.125, 	0.1771 },
+				{ 0.1389, 	0.1389, 	0.1962 },
+				{ 0.1528, 	0.1528, 	0.2153 },
+				{ 0.1667, 	0.1667, 	0.2344 },
+				{ 0.1806, 	0.1806, 	0.2535 },
+				{ 0.1944, 	0.1944, 	0.2726 },
+				{ 0.2083, 	0.2083, 	0.2917 },
+				{ 0.2222, 	0.2222, 	0.3108 },
+				{ 0.2361, 	0.2361, 	0.3299 },
+				{ 0.25, 	0.25, 	0.349 },
+				{ 0.2639, 	0.2639, 	0.3681 },
+				{ 0.2778, 	0.2778, 	0.3872 },
+				{ 0.2917, 	0.2917, 	0.4062 },
+				{ 0.3056, 	0.3056, 	0.4253 },
+				{ 0.3194, 	0.3194, 	0.4444 },
+				{ 0.3333, 	0.3385, 	0.4583 },
+				{ 0.3472, 	0.3576, 	0.4722 },
+				{ 0.3611, 	0.3767, 	0.4861 },
+				{ 0.375, 	0.3958, 	0.5 },
+				{ 0.3889, 	0.4149, 	0.5139 },
+				{ 0.4028, 	0.434, 	0.5278 },
+				{ 0.4167, 	0.4531, 	0.5417 },
+				{ 0.4306, 	0.4722, 	0.5556 },
+				{ 0.4444, 	0.4913, 	0.5694 },
+				{ 0.4583, 	0.5104, 	0.5833 },
+				{ 0.4722, 	0.5295, 	0.5972 },
+				{ 0.4861, 	0.5486, 	0.6111 },
+				{ 0.5, 	0.5677, 	0.625 },
+				{ 0.5139, 	0.5868, 	0.6389 },
+				{ 0.5278, 	0.6059, 	0.6528 },
+				{ 0.5417, 	0.625, 	0.6667 },
+				{ 0.5556, 	0.6441, 	0.6806 },
+				{ 0.5694, 	0.6632, 	0.6944 },
+				{ 0.5833, 	0.6823, 	0.7083 },
+				{ 0.5972, 	0.7014, 	0.7222 },
+				{ 0.6111, 	0.7205, 	0.7361 },
+				{ 0.625, 	0.7396, 	0.75 },
+				{ 0.6389, 	0.7587, 	0.7639 },
+				{ 0.6528, 	0.7778, 	0.7778 },
+				{ 0.6745, 	0.7917, 	0.7917 },
+				{ 0.6962, 	0.8056, 	0.8056 },
+				{ 0.7179, 	0.8194, 	0.8194 },
+				{ 0.7396, 	0.8333, 	0.8333 },
+				{ 0.7613, 	0.8472, 	0.8472 },
+				{ 0.783, 	0.8611, 	0.8611 },
+				{ 0.8047, 	0.875, 	0.875 },
+				{ 0.8264, 	0.8889, 	0.8889 },
+				{ 0.8481, 	0.9028, 	0.9028 },
+				{ 0.8698, 	0.9167, 	0.9167 },
+				{ 0.8915, 	0.9306, 	0.9306 },
+				{ 0.9132, 	0.9444, 	0.9444 },
+				{ 0.9349, 	0.9583, 	0.9583 },
+				{ 0.9566, 	0.9722, 	0.9722 },
+				{ 0.9783, 	0.9861, 	0.9861 },
+				{ 1.0, 	1.0, 	1.0 }
+			};
+	}		
+//-------------------------------------------------------
+	public void setCool()
+	{
+		d = new double[][]{
+				{ 0.0, 	1.0, 	1.0 },
+				{ 0.0159, 	0.9841, 	1.0 },
+				{ 0.0317, 	0.9683, 	1.0 },
+				{ 0.0476, 	0.9524, 	1.0 },
+				{ 0.0635, 	0.9365, 	1.0 },
+				{ 0.0794, 	0.9206, 	1.0 },
+				{ 0.0952, 	0.9048, 	1.0 },
+				{ 0.1111, 	0.8889, 	1.0 },
+				{ 0.127, 	0.873, 	1.0 },
+				{ 0.1429, 	0.8571, 	1.0 },
+				{ 0.1587, 	0.8413, 	1.0 },
+				{ 0.1746, 	0.8254, 	1.0 },
+				{ 0.1905, 	0.8095, 	1.0 },
+				{ 0.2063, 	0.7937, 	1.0 },
+				{ 0.2222, 	0.7778, 	1.0 },
+				{ 0.2381, 	0.7619, 	1.0 },
+				{ 0.254, 	0.746, 	1.0 },
+				{ 0.2698, 	0.7302, 	1.0 },
+				{ 0.2857, 	0.7143, 	1.0 },
+				{ 0.3016, 	0.6984, 	1.0 },
+				{ 0.3175, 	0.6825, 	1.0 },
+				{ 0.3333, 	0.6667, 	1.0 },
+				{ 0.3492, 	0.6508, 	1.0 },
+				{ 0.3651, 	0.6349, 	1.0 },
+				{ 0.381, 	0.619, 	1.0 },
+				{ 0.3968, 	0.6032, 	1.0 },
+				{ 0.4127, 	0.5873, 	1.0 },
+				{ 0.4286, 	0.5714, 	1.0 },
+				{ 0.4444, 	0.5556, 	1.0 },
+				{ 0.4603, 	0.5397, 	1.0 },
+				{ 0.4762, 	0.5238, 	1.0 },
+				{ 0.4921, 	0.5079, 	1.0 },
+				{ 0.5079, 	0.4921, 	1.0 },
+				{ 0.5238, 	0.4762, 	1.0 },
+				{ 0.5397, 	0.4603, 	1.0 },
+				{ 0.5556, 	0.4444, 	1.0 },
+				{ 0.5714, 	0.4286, 	1.0 },
+				{ 0.5873, 	0.4127, 	1.0 },
+				{ 0.6032, 	0.3968, 	1.0 },
+				{ 0.619, 	0.381, 	1.0 },
+				{ 0.6349, 	0.3651, 	1.0 },
+				{ 0.6508, 	0.3492, 	1.0 },
+				{ 0.6667, 	0.3333, 	1.0 },
+				{ 0.6825, 	0.3175, 	1.0 },
+				{ 0.6984, 	0.3016, 	1.0 },
+				{ 0.7143, 	0.2857, 	1.0 },
+				{ 0.7302, 	0.2698, 	1.0 },
+				{ 0.746, 	0.254, 	1.0 },
+				{ 0.7619, 	0.2381, 	1.0 },
+				{ 0.7778, 	0.2222, 	1.0 },
+				{ 0.7937, 	0.2063, 	1.0 },
+				{ 0.8095, 	0.1905, 	1.0 },
+				{ 0.8254, 	0.1746, 	1.0 },
+				{ 0.8413, 	0.1587, 	1.0 },
+				{ 0.8571, 	0.1429, 	1.0 },
+				{ 0.873, 	0.127, 	1.0 },
+				{ 0.8889, 	0.1111, 	1.0 },
+				{ 0.9048, 	0.0952, 	1.0 },
+				{ 0.9206, 	0.0794, 	1.0 },
+				{ 0.9365, 	0.0635, 	1.0 },
+				{ 0.9524, 	0.0476, 	1.0 },
+				{ 0.9683, 	0.0317, 	1.0 },
+				{ 0.9841, 	0.0159, 	1.0 },
+				{ 1.0, 	0.0, 	1.0 }
+			};
+	}
+//-------------------------------------------------------
+	public void setCopper()
+	{
+		d = new double[][]{
+				{ 0.0, 	0.0, 	0.0 },
+				{ 0.0198, 	0.0124, 	0.0079 },
+				{ 0.0397, 	0.0248, 	0.0158 },
+				{ 0.0595, 	0.0372, 	0.0237 },
+				{ 0.0794, 	0.0496, 	0.0316 },
+				{ 0.0992, 	0.062, 	0.0395 },
+				{ 0.119, 	0.0744, 	0.0474 },
+				{ 0.1389, 	0.0868, 	0.0553 },
+				{ 0.1587, 	0.0992, 	0.0632 },
+				{ 0.1786, 	0.1116, 	0.0711 },
+				{ 0.1984, 	0.124, 	0.079 },
+				{ 0.2183, 	0.1364, 	0.0869 },
+				{ 0.2381, 	0.1488, 	0.0948 },
+				{ 0.2579, 	0.1612, 	0.1027 },
+				{ 0.2778, 	0.1736, 	0.1106 },
+				{ 0.2976, 	0.186, 	0.1185 },
+				{ 0.3175, 	0.1984, 	0.1263 },
+				{ 0.3373, 	0.2108, 	0.1342 },
+				{ 0.3571, 	0.2232, 	0.1421 },
+				{ 0.377, 	0.2356, 	0.15 },
+				{ 0.3968, 	0.248, 	0.1579 },
+				{ 0.4167, 	0.2604, 	0.1658 },
+				{ 0.4365, 	0.2728, 	0.1737 },
+				{ 0.4563, 	0.2852, 	0.1816 },
+				{ 0.4762, 	0.2976, 	0.1895 },
+				{ 0.496, 	0.31, 	0.1974 },
+				{ 0.5159, 	0.3224, 	0.2053 },
+				{ 0.5357, 	0.3348, 	0.2132 },
+				{ 0.5556, 	0.3472, 	0.2211 },
+				{ 0.5754, 	0.3596, 	0.229 },
+				{ 0.5952, 	0.372, 	0.2369 },
+				{ 0.6151, 	0.3844, 	0.2448 },
+				{ 0.6349, 	0.3968, 	0.2527 },
+				{ 0.6548, 	0.4092, 	0.2606 },
+				{ 0.6746, 	0.4216, 	0.2685 },
+				{ 0.6944, 	0.434, 	0.2764 },
+				{ 0.7143, 	0.4464, 	0.2843 },
+				{ 0.7341, 	0.4588, 	0.2922 },
+				{ 0.754, 	0.4712, 	0.3001 },
+				{ 0.7738, 	0.4836, 	0.308 },
+				{ 0.7937, 	0.496, 	0.3159 },
+				{ 0.8135, 	0.5084, 	0.3238 },
+				{ 0.8333, 	0.5208, 	0.3317 },
+				{ 0.8532, 	0.5332, 	0.3396 },
+				{ 0.873, 	0.5456, 	0.3475 },
+				{ 0.8929, 	0.558, 	0.3554 },
+				{ 0.9127, 	0.5704, 	0.3633 },
+				{ 0.9325, 	0.5828, 	0.3712 },
+				{ 0.9524, 	0.5952, 	0.379 },
+				{ 0.9722, 	0.6076, 	0.3869 },
+				{ 0.9921, 	0.62, 	0.3948 },
+				{ 1.0, 	0.6324, 	0.4027 },
+				{ 1.0, 	0.6448, 	0.4106 },
+				{ 1.0, 	0.6572, 	0.4185 },
+				{ 1.0, 	0.6696, 	0.4264 },
+				{ 1.0, 	0.682, 	0.4343 },
+				{ 1.0, 	0.6944, 	0.4422 },
+				{ 1.0, 	0.7068, 	0.4501 },
+				{ 1.0, 	0.7192, 	0.458 },
+				{ 1.0, 	0.7316, 	0.4659 },
+				{ 1.0, 	0.744, 	0.4738 },
+				{ 1.0, 	0.7564, 	0.4817 },
+				{ 1.0, 	0.7688, 	0.4896 },
+				{ 1.0, 	0.7812, 	0.4975 },
+			};
+	}
+//-------------------------------------------------------
+	public void setGray()
+	{
+		d = new double[][]{
+				{ 0.0, 	0.0, 	0.0 },
+				{ 0.0159, 	0.0159, 	0.0159 },
+				{ 0.0317, 	0.0317, 	0.0317 },
+				{ 0.0476, 	0.0476, 	0.0476 },
+				{ 0.0635, 	0.0635, 	0.0635 },
+				{ 0.0794, 	0.0794, 	0.0794 },
+				{ 0.0952, 	0.0952, 	0.0952 },
+				{ 0.1111, 	0.1111, 	0.1111 },
+				{ 0.127, 	0.127, 	0.127 },
+				{ 0.1429, 	0.1429, 	0.1429 },
+				{ 0.1587, 	0.1587, 	0.1587 },
+				{ 0.1746, 	0.1746, 	0.1746 },
+				{ 0.1905, 	0.1905, 	0.1905 },
+				{ 0.2063, 	0.2063, 	0.2063 },
+				{ 0.2222, 	0.2222, 	0.2222 },
+				{ 0.2381, 	0.2381, 	0.2381 },
+				{ 0.254, 	0.254, 	0.254 },
+				{ 0.2698, 	0.2698, 	0.2698 },
+				{ 0.2857, 	0.2857, 	0.2857 },
+				{ 0.3016, 	0.3016, 	0.3016 },
+				{ 0.3175, 	0.3175, 	0.3175 },
+				{ 0.3333, 	0.3333, 	0.3333 },
+				{ 0.3492, 	0.3492, 	0.3492 },
+				{ 0.3651, 	0.3651, 	0.3651 },
+				{ 0.381, 	0.381, 	0.381 },
+				{ 0.3968, 	0.3968, 	0.3968 },
+				{ 0.4127, 	0.4127, 	0.4127 },
+				{ 0.4286, 	0.4286, 	0.4286 },
+				{ 0.4444, 	0.4444, 	0.4444 },
+				{ 0.4603, 	0.4603, 	0.4603 },
+				{ 0.4762, 	0.4762, 	0.4762 },
+				{ 0.4921, 	0.4921, 	0.4921 },
+				{ 0.5079, 	0.5079, 	0.5079 },
+				{ 0.5238, 	0.5238, 	0.5238 },
+				{ 0.5397, 	0.5397, 	0.5397 },
+				{ 0.5556, 	0.5556, 	0.5556 },
+				{ 0.5714, 	0.5714, 	0.5714 },
+				{ 0.5873, 	0.5873, 	0.5873 },
+				{ 0.6032, 	0.6032, 	0.6032 },
+				{ 0.619, 	0.619, 	0.619 },
+				{ 0.6349, 	0.6349, 	0.6349 },
+				{ 0.6508, 	0.6508, 	0.6508 },
+				{ 0.6667, 	0.6667, 	0.6667 },
+				{ 0.6825, 	0.6825, 	0.6825 },
+				{ 0.6984, 	0.6984, 	0.6984 },
+				{ 0.7143, 	0.7143, 	0.7143 },
+				{ 0.7302, 	0.7302, 	0.7302 },
+				{ 0.746, 	0.746, 	0.746 },
+				{ 0.7619, 	0.7619, 	0.7619 },
+				{ 0.7778, 	0.7778, 	0.7778 },
+				{ 0.7937, 	0.7937, 	0.7937 },
+				{ 0.8095, 	0.8095, 	0.8095 },
+				{ 0.8254, 	0.8254, 	0.8254 },
+				{ 0.8413, 	0.8413, 	0.8413 },
+				{ 0.8571, 	0.8571, 	0.8571 },
+				{ 0.873, 	0.873, 	0.873 },
+				{ 0.8889, 	0.8889, 	0.8889 },
+				{ 0.9048, 	0.9048, 	0.9048 },
+				{ 0.9206, 	0.9206, 	0.9206 },
+				{ 0.9365, 	0.9365, 	0.9365 },
+				{ 0.9524, 	0.9524, 	0.9524 },
+				{ 0.9683, 	0.9683, 	0.9683 },
+				{ 0.9841, 	0.9841, 	0.9841 },
+				{ 1.0, 	1.0, 	1.0 }
+			};
+	}
+//-------------------------------------------------------
+	public void setHot()
+	{
+		d = new double[][]{
+				{ 0.0417, 	0.0, 	0.0 },
+				{ 0.0833, 	0.0, 	0.0 },
+				{ 0.125, 	0.0, 	0.0 },
+				{ 0.1667, 	0.0, 	0.0 },
+				{ 0.2083, 	0.0, 	0.0 },
+				{ 0.25, 	0.0, 	0.0 },
+				{ 0.2917, 	0.0, 	0.0 },
+				{ 0.3333, 	0.0, 	0.0 },
+				{ 0.375, 	0.0, 	0.0 },
+				{ 0.4167, 	0.0, 	0.0 },
+				{ 0.4583, 	0.0, 	0.0 },
+				{ 0.5, 	0.0, 	0.0 },
+				{ 0.5417, 	0.0, 	0.0 },
+				{ 0.5833, 	0.0, 	0.0 },
+				{ 0.625, 	0.0, 	0.0 },
+				{ 0.6667, 	0.0, 	0.0 },
+				{ 0.7083, 	0.0, 	0.0 },
+				{ 0.75, 	0.0, 	0.0 },
+				{ 0.7917, 	0.0, 	0.0 },
+				{ 0.8333, 	0.0, 	0.0 },
+				{ 0.875, 	0.0, 	0.0 },
+				{ 0.9167, 	0.0, 	0.0 },
+				{ 0.9583, 	0.0, 	0.0 },
+				{ 1.0, 	0.0, 	0.0 },
+				{ 1.0, 	0.0417, 	0.0 },
+				{ 1.0, 	0.0833, 	0.0 },
+				{ 1.0, 	0.125, 	0.0 },
+				{ 1.0, 	0.1667, 	0.0 },
+				{ 1.0, 	0.2083, 	0.0 },
+				{ 1.0, 	0.25, 	0.0 },
+				{ 1.0, 	0.2917, 	0.0 },
+				{ 1.0, 	0.3333, 	0.0 },
+				{ 1.0, 	0.375, 	0.0 },
+				{ 1.0, 	0.4167, 	0.0 },
+				{ 1.0, 	0.4583, 	0.0 },
+				{ 1.0, 	0.5, 	0.0 },
+				{ 1.0, 	0.5417, 	0.0 },
+				{ 1.0, 	0.5833, 	0.0 },
+				{ 1.0, 	0.625, 	0.0 },
+				{ 1.0, 	0.6667, 	0.0 },
+				{ 1.0, 	0.7083, 	0.0 },
+				{ 1.0, 	0.75, 	0.0 },
+				{ 1.0, 	0.7917, 	0.0 },
+				{ 1.0, 	0.8333, 	0.0 },
+				{ 1.0, 	0.875, 	0.0 },
+				{ 1.0, 	0.9167, 	0.0 },
+				{ 1.0, 	0.9583, 	0.0 },
+				{ 1.0, 	1.0, 	0.0 },
+				{ 1.0, 	1.0, 	0.0625 },
+				{ 1.0, 	1.0, 	0.125 },
+				{ 1.0, 	1.0, 	0.1875 },
+				{ 1.0, 	1.0, 	0.25 },
+				{ 1.0, 	1.0, 	0.3125 },
+				{ 1.0, 	1.0, 	0.375 },
+				{ 1.0, 	1.0, 	0.4375 },
+				{ 1.0, 	1.0, 	0.5 },
+				{ 1.0, 	1.0, 	0.5625 },
+				{ 1.0, 	1.0, 	0.625 },
+				{ 1.0, 	1.0, 	0.6875 },
+				{ 1.0, 	1.0, 	0.75 },
+				{ 1.0, 	1.0, 	0.8125 },
+				{ 1.0, 	1.0, 	0.875 },
+				{ 1.0, 	1.0, 	0.9375 },
+				{ 1.0, 	1.0, 	1.0 },
+			};
+	}
+//-------------------------------------------------------
+	public void setJet()
+	{
+		d = new double[][]{
+				{ 0.0, 	0.0, 	0.5625 },
+				{ 0.0, 	0.0, 	0.625 },
+				{ 0.0, 	0.0, 	0.6875 },
+				{ 0.0, 	0.0, 	0.75 },
+				{ 0.0, 	0.0, 	0.8125 },
+				{ 0.0, 	0.0, 	0.875 },
+				{ 0.0, 	0.0, 	0.9375 },
+				{ 0.0, 	0.0, 	1.0 },
+				{ 0.0, 	0.0625, 	1.0 },
+				{ 0.0, 	0.125, 	1.0 },
+				{ 0.0, 	0.1875, 	1.0 },
+				{ 0.0, 	0.25, 	1.0 },
+				{ 0.0, 	0.3125, 	1.0 },
+				{ 0.0, 	0.375, 	1.0 },
+				{ 0.0, 	0.4375, 	1.0 },
+				{ 0.0, 	0.5, 	1.0 },
+				{ 0.0, 	0.5625, 	1.0 },
+				{ 0.0, 	0.625, 	1.0 },
+				{ 0.0, 	0.6875, 	1.0 },
+				{ 0.0, 	0.75, 	1.0 },
+				{ 0.0, 	0.8125, 	1.0 },
+				{ 0.0, 	0.875, 	1.0 },
+				{ 0.0, 	0.9375, 	1.0 },
+				{ 0.0, 	1.0, 	1.0 },
+				{ 0.0625, 	1.0, 	0.9375 },
+				{ 0.125, 	1.0, 	0.875 },
+				{ 0.1875, 	1.0, 	0.8125 },
+				{ 0.25, 	1.0, 	0.75 },
+				{ 0.3125, 	1.0, 	0.6875 },
+				{ 0.375, 	1.0, 	0.625 },
+				{ 0.4375, 	1.0, 	0.5625 },
+				{ 0.5, 	1.0, 	0.5 },
+				{ 0.5625, 	1.0, 	0.4375 },
+				{ 0.625, 	1.0, 	0.375 },
+				{ 0.6875, 	1.0, 	0.3125 },
+				{ 0.75, 	1.0, 	0.25 },
+				{ 0.8125, 	1.0, 	0.1875 },
+				{ 0.875, 	1.0, 	0.125 },
+				{ 0.9375, 	1.0, 	0.0625 },
+				{ 1.0, 	1.0, 	0.0 },
+				{ 1.0, 	0.9375, 	0.0 },
+				{ 1.0, 	0.875, 	0.0 },
+				{ 1.0, 	0.8125, 	0.0 },
+				{ 1.0, 	0.75, 	0.0 },
+				{ 1.0, 	0.6875, 	0.0 },
+				{ 1.0, 	0.625, 	0.0 },
+				{ 1.0, 	0.5625, 	0.0 },
+				{ 1.0, 	0.5, 	0.0 },
+				{ 1.0, 	0.4375, 	0.0 },
+				{ 1.0, 	0.375, 	0.0 },
+				{ 1.0, 	0.3125, 	0.0 },
+				{ 1.0, 	0.25, 	0.0 },
+				{ 1.0, 	0.1875, 	0.0 },
+				{ 1.0, 	0.125, 	0.0 },
+				{ 1.0, 	0.0625, 	0.0 },
+				{ 1.0, 	0.0, 	0.0 },
+				{ 0.9375, 	0.0, 	0.0 },
+				{ 0.875, 	0.0, 	0.0 },
+				{ 0.8125, 	0.0, 	0.0 },
+				{ 0.75, 	0.0, 	0.0 },
+				{ 0.6875, 	0.0, 	0.0 },
+				{ 0.625, 	0.0, 	0.0 },
+				{ 0.5625, 	0.0, 	0.0 },
+				{ 0.5, 	0.0, 	0.0 }
+			};
+	}
+//-------------------------------------------------------
+	public void setPink()
+	{
+		d = new double[][]{
+				{ 0.1179, 	0.0, 	0.0 },
+				{ 0.1959, 	0.1029, 	0.1029 },
+				{ 0.2507, 	0.1455, 	0.1455 },
+				{ 0.2955, 	0.1782, 	0.1782 },
+				{ 0.3343, 	0.2057, 	0.2057 },
+				{ 0.3691, 	0.23, 	0.23 },
+				{ 0.4009, 	0.252, 	0.252 },
+				{ 0.4303, 	0.2722, 	0.2722 },
+				{ 0.4579, 	0.291, 	0.291 },
+				{ 0.4839, 	0.3086, 	0.3086 },
+				{ 0.5085, 	0.3253, 	0.3253 },
+				{ 0.532, 	0.3412, 	0.3412 },
+				{ 0.5546, 	0.3563, 	0.3563 },
+				{ 0.5762, 	0.3709, 	0.3709 },
+				{ 0.5971, 	0.3849, 	0.3849 },
+				{ 0.6172, 	0.3984, 	0.3984 },
+				{ 0.6367, 	0.4115, 	0.4115 },
+				{ 0.6557, 	0.4241, 	0.4241 },
+				{ 0.6741, 	0.4364, 	0.4364 },
+				{ 0.692, 	0.4484, 	0.4484 },
+				{ 0.7094, 	0.46, 	0.46 },
+				{ 0.7265, 	0.4714, 	0.4714 },
+				{ 0.7431, 	0.4825, 	0.4825 },
+				{ 0.7594, 	0.4933, 	0.4933 },
+				{ 0.7664, 	0.5175, 	0.504 },
+				{ 0.7732, 	0.5407, 	0.5143 },
+				{ 0.78, 	0.5628, 	0.5245 },
+				{ 0.7868, 	0.5842, 	0.5345 },
+				{ 0.7935, 	0.6048, 	0.5443 },
+				{ 0.8001, 	0.6247, 	0.554 },
+				{ 0.8067, 	0.644, 	0.5634 },
+				{ 0.8133, 	0.6627, 	0.5727 },
+				{ 0.8197, 	0.6809, 	0.5819 },
+				{ 0.8262, 	0.6986, 	0.5909 },
+				{ 0.8325, 	0.7159, 	0.5998 },
+				{ 0.8389, 	0.7328, 	0.6086 },
+				{ 0.8452, 	0.7493, 	0.6172 },
+				{ 0.8514, 	0.7655, 	0.6257 },
+				{ 0.8576, 	0.7813, 	0.6341 },
+				{ 0.8637, 	0.7968, 	0.6424 },
+				{ 0.8698, 	0.812, 	0.6506 },
+				{ 0.8759, 	0.827, 	0.6587 },
+				{ 0.8819, 	0.8416, 	0.6667 },
+				{ 0.8879, 	0.856, 	0.6746 },
+				{ 0.8938, 	0.8702, 	0.6824 },
+				{ 0.8997, 	0.8842, 	0.6901 },
+				{ 0.9056, 	0.8979, 	0.6977 },
+				{ 0.9114, 	0.9114, 	0.7052 },
+				{ 0.9172, 	0.9172, 	0.7272 },
+				{ 0.923, 	0.923, 	0.7485 },
+				{ 0.9287, 	0.9287, 	0.7692 },
+				{ 0.9344, 	0.9344, 	0.7893 },
+				{ 0.94, 	0.94, 	0.809 },
+				{ 0.9456, 	0.9456, 	0.8282 },
+				{ 0.9512, 	0.9512, 	0.8469 },
+				{ 0.9567, 	0.9567, 	0.8653 },
+				{ 0.9623, 	0.9623, 	0.8832 },
+				{ 0.9677, 	0.9677, 	0.9008 },
+				{ 0.9732, 	0.9732, 	0.9181 },
+				{ 0.9786, 	0.9786, 	0.9351 },
+				{ 0.984, 	0.984, 	0.9517 },
+				{ 0.9894, 	0.9894, 	0.9681 },
+				{ 0.9947, 	0.9947, 	0.9842 },
+				{ 1.0, 	1.0, 	1.0 }
+			};
+	}
+//-------------------------------------------------------
+	public void setSpring()
+	{
+		d = new double[][]{
+				{ 1.0, 	0.0, 	1.0 },
+				{ 1.0, 	0.0159, 	0.9841 },
+				{ 1.0, 	0.0317, 	0.9683 },
+				{ 1.0, 	0.0476, 	0.9524 },
+				{ 1.0, 	0.0635, 	0.9365 },
+				{ 1.0, 	0.0794, 	0.9206 },
+				{ 1.0, 	0.0952, 	0.9048 },
+				{ 1.0, 	0.1111, 	0.8889 },
+				{ 1.0, 	0.127, 	0.873 },
+				{ 1.0, 	0.1429, 	0.8571 },
+				{ 1.0, 	0.1587, 	0.8413 },
+				{ 1.0, 	0.1746, 	0.8254 },
+				{ 1.0, 	0.1905, 	0.8095 },
+				{ 1.0, 	0.2063, 	0.7937 },
+				{ 1.0, 	0.2222, 	0.7778 },
+				{ 1.0, 	0.2381, 	0.7619 },
+				{ 1.0, 	0.254, 	0.746 },
+				{ 1.0, 	0.2698, 	0.7302 },
+				{ 1.0, 	0.2857, 	0.7143 },
+				{ 1.0, 	0.3016, 	0.6984 },
+				{ 1.0, 	0.3175, 	0.6825 },
+				{ 1.0, 	0.3333, 	0.6667 },
+				{ 1.0, 	0.3492, 	0.6508 },
+				{ 1.0, 	0.3651, 	0.6349 },
+				{ 1.0, 	0.381, 	0.619 },
+				{ 1.0, 	0.3968, 	0.6032 },
+				{ 1.0, 	0.4127, 	0.5873 },
+				{ 1.0, 	0.4286, 	0.5714 },
+				{ 1.0, 	0.4444, 	0.5556 },
+				{ 1.0, 	0.4603, 	0.5397 },
+				{ 1.0, 	0.4762, 	0.5238 },
+				{ 1.0, 	0.4921, 	0.5079 },
+				{ 1.0, 	0.5079, 	0.4921 },
+				{ 1.0, 	0.5238, 	0.4762 },
+				{ 1.0, 	0.5397, 	0.4603 },
+				{ 1.0, 	0.5556, 	0.4444 },
+				{ 1.0, 	0.5714, 	0.4286 },
+				{ 1.0, 	0.5873, 	0.4127 },
+				{ 1.0, 	0.6032, 	0.3968 },
+				{ 1.0, 	0.619, 	0.381 },
+				{ 1.0, 	0.6349, 	0.3651 },
+				{ 1.0, 	0.6508, 	0.3492 },
+				{ 1.0, 	0.6667, 	0.3333 },
+				{ 1.0, 	0.6825, 	0.3175 },
+				{ 1.0, 	0.6984, 	0.3016 },
+				{ 1.0, 	0.7143, 	0.2857 },
+				{ 1.0, 	0.7302, 	0.2698 },
+				{ 1.0, 	0.746, 	0.254 },
+				{ 1.0, 	0.7619, 	0.2381 },
+				{ 1.0, 	0.7778, 	0.2222 },
+				{ 1.0, 	0.7937, 	0.2063 },
+				{ 1.0, 	0.8095, 	0.1905 },
+				{ 1.0, 	0.8254, 	0.1746 },
+				{ 1.0, 	0.8413, 	0.1587 },
+				{ 1.0, 	0.8571, 	0.1429 },
+				{ 1.0, 	0.873, 	0.127 },
+				{ 1.0, 	0.8889, 	0.1111 },
+				{ 1.0, 	0.9048, 	0.0952 },
+				{ 1.0, 	0.9206, 	0.0794 },
+				{ 1.0, 	0.9365, 	0.0635 },
+				{ 1.0, 	0.9524, 	0.0476 },
+				{ 1.0, 	0.9683, 	0.0317 },
+				{ 1.0, 	0.9841, 	0.0159 },
+				{ 1.0, 	1.0, 	0.0 }
+			};
+	}
+//-------------------------------------------------------
+	public void setSummer()
+	{
+		d = new double[][]{
+				{ 0.0, 	0.5, 	0.4 },
+				{ 0.0159, 	0.5079, 	0.4 },
+				{ 0.0317, 	0.5159, 	0.4 },
+				{ 0.0476, 	0.5238, 	0.4 },
+				{ 0.0635, 	0.5317, 	0.4 },
+				{ 0.0794, 	0.5397, 	0.4 },
+				{ 0.0952, 	0.5476, 	0.4 },
+				{ 0.1111, 	0.5556, 	0.4 },
+				{ 0.127, 	0.5635, 	0.4 },
+				{ 0.1429, 	0.5714, 	0.4 },
+				{ 0.1587, 	0.5794, 	0.4 },
+				{ 0.1746, 	0.5873, 	0.4 },
+				{ 0.1905, 	0.5952, 	0.4 },
+				{ 0.2063, 	0.6032, 	0.4 },
+				{ 0.2222, 	0.6111, 	0.4 },
+				{ 0.2381, 	0.619, 	0.4 },
+				{ 0.254, 	0.627, 	0.4 },
+				{ 0.2698, 	0.6349, 	0.4 },
+				{ 0.2857, 	0.6429, 	0.4 },
+				{ 0.3016, 	0.6508, 	0.4 },
+				{ 0.3175, 	0.6587, 	0.4 },
+				{ 0.3333, 	0.6667, 	0.4 },
+				{ 0.3492, 	0.6746, 	0.4 },
+				{ 0.3651, 	0.6825, 	0.4 },
+				{ 0.381, 	0.6905, 	0.4 },
+				{ 0.3968, 	0.6984, 	0.4 },
+				{ 0.4127, 	0.7063, 	0.4 },
+				{ 0.4286, 	0.7143, 	0.4 },
+				{ 0.4444, 	0.7222, 	0.4 },
+				{ 0.4603, 	0.7302, 	0.4 },
+				{ 0.4762, 	0.7381, 	0.4 },
+				{ 0.4921, 	0.746, 	0.4 },
+				{ 0.5079, 	0.754, 	0.4 },
+				{ 0.5238, 	0.7619, 	0.4 },
+				{ 0.5397, 	0.7698, 	0.4 },
+				{ 0.5556, 	0.7778, 	0.4 },
+				{ 0.5714, 	0.7857, 	0.4 },
+				{ 0.5873, 	0.7937, 	0.4 },
+				{ 0.6032, 	0.8016, 	0.4 },
+				{ 0.619, 	0.8095, 	0.4 },
+				{ 0.6349, 	0.8175, 	0.4 },
+				{ 0.6508, 	0.8254, 	0.4 },
+				{ 0.6667, 	0.8333, 	0.4 },
+				{ 0.6825, 	0.8413, 	0.4 },
+				{ 0.6984, 	0.8492, 	0.4 },
+				{ 0.7143, 	0.8571, 	0.4 },
+				{ 0.7302, 	0.8651, 	0.4 },
+				{ 0.746, 	0.873, 	0.4 },
+				{ 0.7619, 	0.881, 	0.4 },
+				{ 0.7778, 	0.8889, 	0.4 },
+				{ 0.7937, 	0.8968, 	0.4 },
+				{ 0.8095, 	0.9048, 	0.4 },
+				{ 0.8254, 	0.9127, 	0.4 },
+				{ 0.8413, 	0.9206, 	0.4 },
+				{ 0.8571, 	0.9286, 	0.4 },
+				{ 0.873, 	0.9365, 	0.4 },
+				{ 0.8889, 	0.9444, 	0.4 },
+				{ 0.9048, 	0.9524, 	0.4 },
+				{ 0.9206, 	0.9603, 	0.4 },
+				{ 0.9365, 	0.9683, 	0.4 },
+				{ 0.9524, 	0.9762, 	0.4 },
+				{ 0.9683, 	0.9841, 	0.4 },
+				{ 0.9841, 	0.9921, 	0.4 },
+				{ 1.0, 	1.0, 	0.4 }
+			};
+	}
+//-------------------------------------------------------
+	public void setWinter()
+	{
+		d = new double[][]{
+				{ 0.0, 	0.0, 	1.0 },
+				{ 0.0, 	0.0159, 	0.9921 },
+				{ 0.0, 	0.0317, 	0.9841 },
+				{ 0.0, 	0.0476, 	0.9762 },
+				{ 0.0, 	0.0635, 	0.9683 },
+				{ 0.0, 	0.0794, 	0.9603 },
+				{ 0.0, 	0.0952, 	0.9524 },
+				{ 0.0, 	0.1111, 	0.9444 },
+				{ 0.0, 	0.127, 	0.9365 },
+				{ 0.0, 	0.1429, 	0.9286 },
+				{ 0.0, 	0.1587, 	0.9206 },
+				{ 0.0, 	0.1746, 	0.9127 },
+				{ 0.0, 	0.1905, 	0.9048 },
+				{ 0.0, 	0.2063, 	0.8968 },
+				{ 0.0, 	0.2222, 	0.8889 },
+				{ 0.0, 	0.2381, 	0.881 },
+				{ 0.0, 	0.254, 	0.873 },
+				{ 0.0, 	0.2698, 	0.8651 },
+				{ 0.0, 	0.2857, 	0.8571 },
+				{ 0.0, 	0.3016, 	0.8492 },
+				{ 0.0, 	0.3175, 	0.8413 },
+				{ 0.0, 	0.3333, 	0.8333 },
+				{ 0.0, 	0.3492, 	0.8254 },
+				{ 0.0, 	0.3651, 	0.8175 },
+				{ 0.0, 	0.381, 	0.8095 },
+				{ 0.0, 	0.3968, 	0.8016 },
+				{ 0.0, 	0.4127, 	0.7937 },
+				{ 0.0, 	0.4286, 	0.7857 },
+				{ 0.0, 	0.4444, 	0.7778 },
+				{ 0.0, 	0.4603, 	0.7698 },
+				{ 0.0, 	0.4762, 	0.7619 },
+				{ 0.0, 	0.4921, 	0.754 },
+				{ 0.0, 	0.5079, 	0.746 },
+				{ 0.0, 	0.5238, 	0.7381 },
+				{ 0.0, 	0.5397, 	0.7302 },
+				{ 0.0, 	0.5556, 	0.7222 },
+				{ 0.0, 	0.5714, 	0.7143 },
+				{ 0.0, 	0.5873, 	0.7063 },
+				{ 0.0, 	0.6032, 	0.6984 },
+				{ 0.0, 	0.619, 	0.6905 },
+				{ 0.0, 	0.6349, 	0.6825 },
+				{ 0.0, 	0.6508, 	0.6746 },
+				{ 0.0, 	0.6667, 	0.6667 },
+				{ 0.0, 	0.6825, 	0.6587 },
+				{ 0.0, 	0.6984, 	0.6508 },
+				{ 0.0, 	0.7143, 	0.6429 },
+				{ 0.0, 	0.7302, 	0.6349 },
+				{ 0.0, 	0.746, 	0.627 },
+				{ 0.0, 	0.7619, 	0.619 },
+				{ 0.0, 	0.7778, 	0.6111 },
+				{ 0.0, 	0.7937, 	0.6032 },
+				{ 0.0, 	0.8095, 	0.5952 },
+				{ 0.0, 	0.8254, 	0.5873 },
+				{ 0.0, 	0.8413, 	0.5794 },
+				{ 0.0, 	0.8571, 	0.5714 },
+				{ 0.0, 	0.873, 	0.5635 },
+				{ 0.0, 	0.8889, 	0.5556 },
+				{ 0.0, 	0.9048, 	0.5476 },
+				{ 0.0, 	0.9206, 	0.5397 },
+				{ 0.0, 	0.9365, 	0.5317 },
+				{ 0.0, 	0.9524, 	0.5238 },
+				{ 0.0, 	0.9683, 	0.5159 },
+				{ 0.0, 	0.9841, 	0.5079 },
+				{ 0.0, 	1.0, 	0.5 }
+			};
+	}	
+//-------------------------------------------------------
+	public void getRGB(double alpha, RGB rgb)
+	{
+
+		double d1,d2,d3;
+		double d1a,d2a,d3a;
+		double d1b,d2b,d3b;
+		int    index1,index2;
+
+		if (alpha==0){
+			d1=d[0][0];
+			d2=d[0][1];
+			d3=d[0][2];
+		}
+		else if (alpha==1){
+			d1=d[rowNumber-1][0];
+			d2=d[rowNumber-1][1];
+			d3=d[rowNumber-1][2];
+		}
+		else{
+			index1=(int)(alpha*(rowNumber-1));
+			index2=index1+1;
+			
+			d1a=d[index1][0];
+			d2a=d[index1][1];
+			d3a=d[index1][2];
+
+			d1b=d[index2][0];
+			d2b=d[index2][1];
+			d3b=d[index2][2];
+
+			d1=(d1a+d1b)/2;
+			d2=(d2a+d2b)/2;
+			d3=(d3a+d3b)/2;
+		}
+	
+		rgb.setR( (float) d1);
+		rgb.setG( (float) d2);
+		rgb.setB( (float) d3);
+	}	
+//-------------------------------------------------------
+} // end class colorMap
+/////////////////////////////////////////////////////////
+class RGB
+{
+	private float R,G,B;
+//-------------------------------------------------------
+	public void setR(float value) {this.R = value;}
+	public void setG(float value) {this.G = value;}
+	public void setB(float value) {this.B = value;}
+	public float getR() { return R;}
+	public float getG() { return G;}
+	public float getB() { return B;}
+//-------------------------------------------------------
+} //end class RGB	
+/////////////////////////////////////////////////////////
Index: /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/ISSM.java
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/ISSM.java	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/ISSM.java	(revision 14391)
@@ -0,0 +1,346 @@
+package gov.nasa.jpl.issm;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.nio.DoubleBuffer;
+import android.opengl.GLSurfaceView;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.app.Activity;
+import android.app.ProgressDialog;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.view.animation.AccelerateInterpolator;
+import android.view.animation.Animation;
+import android.view.animation.TranslateAnimation;
+import android.widget.Button;
+import android.widget.FrameLayout;
+import android.widget.ImageButton;
+import android.widget.SeekBar;
+import android.widget.SeekBar.OnSeekBarChangeListener;
+import android.widget.TextView;
+import android.widget.Toast;
+import android.widget.ViewFlipper;
+
+
+public class ISSM extends Activity implements OnClickListener
+{
+	private DoubleBuffer buff;
+	private IssmJni issmNative;
+	private String mapName;
+	private String issmFolder;
+	private int size;
+    private GLSurfaceView mGLView;
+	private FrameLayout frame;
+	private VerticalSeekBar bar;
+	private TextView value;
+	private ColorMap colorMap;
+	private int alpha;
+	private final int MINIMUM = 90;
+	private final int OFFSET = 10;
+	private ViewFlipper viewflipper;
+	private ProgressDialog dialog;
+	private ColorBar colorBar;
+	//------------------------------------------------------------------------------------------------    
+    @Override
+    public void onCreate(Bundle savedInstanceState)
+    {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.main_issm);
+        this.initialize();         
+    }
+  //----------------------------------------------------------------------------------------------
+    private void initialize()
+    {
+    	Bundle map = getIntent().getExtras();
+        {
+        	if(map!= null)
+        	{
+        		issmFolder = map.getString("pathToFile");
+        	}
+        }
+    	alpha = MINIMUM + OFFSET;
+    	frame = (FrameLayout)findViewById(R.id.frame);
+    	viewflipper = (ViewFlipper) findViewById(R.id.flipper);
+        this.bar  = (VerticalSeekBar) findViewById(R.id.seekbar);
+        this.value  = (TextView) super.findViewById(R.id.value);
+        Button solve = (Button) super.findViewById(R.id.solve);
+        solve.setOnClickListener(this);
+        Button back = (Button) super.findViewById(R.id.back);
+        back.setOnClickListener(this);
+        ImageButton gl = (ImageButton) findViewById(R.id.greenland);		
+		gl.setOnClickListener(this);
+		ImageButton art = (ImageButton) findViewById(R.id.antarctica);
+		art.setOnClickListener(this);
+        bar.setOnSeekBarChangeListener(new OnSeekBarChangeListener()
+        {
+                public void onProgressChanged(SeekBar seekBar, int progress,boolean fromUser)
+                {
+	                	
+                        alpha = progress + OFFSET;
+                        value.setText("" + alpha + "%");
+                }
+
+	            @Override
+	            public void onStartTrackingTouch(SeekBar seekBar) {}
+	
+	            @Override
+	            public void onStopTrackingTouch(SeekBar seekBar) {}
+        });
+
+        //load up the ISSM library and create double buffer in java
+        //which later on will be pass for native for allocation.
+        issmNative = new IssmJni();
+        
+        //set default color map to be HSV
+        this.colorMap = new ColorMap();
+        //create colorBar
+        colorBar = new ColorBar(this);
+        colorBar.setColorMap(colorMap);
+    }
+//------------------------------------------------------------------------------------------------    
+    public void createModel()
+    {
+		String solution_type="DiagnosticSolution";
+    	String file = "";
+    	if( mapName.equals("greenland"))
+		{
+    		file = "greenland";
+		}
+    	else file = "antarctica";
+
+    	size = issmNative.createISSMModel(solution_type,issmFolder,file);
+    	buff = ByteBuffer.allocateDirect(size*12*8).order(ByteOrder.nativeOrder()).asDoubleBuffer();
+    }
+//------------------------------------------------------------------------------------------------  
+    public boolean onCreateOptionsMenu(Menu menu) 
+    {
+    	MenuInflater menuInflater = getMenuInflater();
+    	menuInflater.inflate(R.menu.issm_menu,menu);
+    	
+    	return true;
+    }
+//------------------------------------------------------------------------------------------------  
+    //Option Menu that allow user to choose color. 
+   public boolean onOptionsItemSelected(MenuItem item)
+    {
+    	switch (item.getItemId())
+        {
+	        case R.id.menu_about:          
+	            Toast.makeText(ISSM.this, "ISSM Application", Toast.LENGTH_SHORT).show();
+	            return true;
+	 	            
+	        case R.id.cl_autumn:
+	        	colorMap.setAutumn(); colorBar.setColorMap(colorMap);
+	        	drawFigure();
+	        	return true;
+	        
+	        case R.id.cl_bone:
+	        	colorMap.setBone(); colorBar.setColorMap(colorMap);
+	        	drawFigure();
+	        	return true;
+	        
+	        case R.id.cl_cool:
+	        	colorMap.setCool(); colorBar.setColorMap(colorMap);
+	        	drawFigure();
+	        	return true;
+	        	
+	        case R.id.cl_copper:
+	        	colorMap.setCopper(); colorBar.setColorMap(colorMap);
+	        	drawFigure();
+	        	return true;
+	        	
+	        case R.id.cl_gray:
+	        	colorMap.setGray(); colorBar.setColorMap(colorMap);
+	        	drawFigure();
+	        	return true;
+	        
+	        case R.id.cl_hot:
+	        	colorMap.setGray(); colorBar.setColorMap(colorMap);
+	        	drawFigure();
+	        	return true;
+	        
+	        case R.id.cl_hsv:
+	        	colorMap.setDefault(); colorBar.setColorMap(colorMap);
+	        	drawFigure();
+	        	return true;
+	        	
+	        case R.id.cl_jet:
+	        	colorMap.setJet(); colorBar.setColorMap(colorMap);
+	        	drawFigure();
+	        	return true;
+	        	
+	        case R.id.cl_pink:
+	        	colorMap.setPink(); colorBar.setColorMap(colorMap);
+	        	drawFigure();
+	        	return true;
+	        	
+	        case R.id.cl_spring:
+	        	colorMap.setSpring(); colorBar.setColorMap(colorMap);
+	        	drawFigure();
+	        	return true;
+	        	
+	        case R.id.cl_summer:	
+	        	colorMap.setSummer(); colorBar.setColorMap(colorMap);
+	        	drawFigure();
+	        	return true;
+	        	
+	        case R.id.cl_winter:
+	        	colorMap.setWinter();colorBar.setColorMap(colorMap);
+	        	drawFigure();
+	        	return true;
+	        default:
+	        	return super.onOptionsItemSelected(item);
+        }
+    	
+    }
+//   
+   
+//---------------------------------------------------------------------------------   
+    public void onClick(View view) 
+	{
+    	switch(view.getId())
+    	{
+	    	case R.id.greenland:
+			{
+				mapName= "greenland";
+				viewflipper.setInAnimation(inFromRightAnimation());
+		        viewflipper.setOutAnimation(outToLeftAnimation());
+		        viewflipper.showNext();
+		        //create FemModel in native code and return the size of the model
+		        this.createModel();
+		        break;
+			}
+	    	case R.id.antarctica:
+			{
+				mapName= "antarctica";
+				viewflipper.setInAnimation(inFromRightAnimation());
+		        viewflipper.setOutAnimation(outToLeftAnimation());
+		        viewflipper.showNext();
+		        //create FemModel in native code and return the size of the model
+		        this.createModel();
+		        break;
+			}
+	    	case R.id.back:
+	    	{
+	    		 frame.removeView(mGLView);
+	    		 viewflipper.setInAnimation(inFromLeftAnimation());
+		         viewflipper.setOutAnimation(outToRightAnimation());
+		         viewflipper.showPrevious(); 
+		         break;
+	    	}
+    		case R.id.solve:
+    		{
+    			dialog = new ProgressDialog(view.getContext());
+    			dialog.setCancelable(true);
+    			dialog.setMessage("Loading View. Please Wait ...");
+    			dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
+    			dialog.setProgress(0);
+    			dialog.setMax(100);
+    			new CalculationTask().execute(alpha);
+    			break;
+    		}
+    	}
+	}
+//---------------------------------------------------------------------------------- 
+    public void drawFigure()
+    {
+    	frame.removeAllViews();
+    	mGLView = new MyGLSurfaceView(this, buff, size, colorMap);
+    	frame.addView(mGLView);
+    	//frame.addView(colorBar);
+    }
+//------------------------------------------------------------------------------------
+   //AsyncTask will allow to display while doing some task in the background
+   private class CalculationTask extends AsyncTask<Integer,Integer,Boolean>
+   {
+		@Override
+		protected Boolean doInBackground(Integer... target) 
+		{
+			Thread thread = new Thread()
+			{
+				public void run()
+				{
+					for(int i = 0; i <= 100; i+=5)
+					{
+						try {
+							Thread.sleep(300);
+						} catch (InterruptedException e) {
+							// TODO Auto-generated catch block
+							e.printStackTrace();
+						}
+						publishProgress(i);
+					}
+				}
+			};
+			thread.start();
+			issmNative.solveISSMModel(target[0],buff);
+			return true;
+		}
+		
+		protected void onPreExecute()
+		{
+			super.onPostExecute(null);
+			dialog.show();
+		}
+		protected void onProgressUpdate(Integer ... value)
+		{
+			super.onProgressUpdate();
+			dialog.setProgress(value[0]);
+		}
+		protected void onPostExecute(Boolean result)
+		{
+			super.onPostExecute(result);
+			dialog.dismiss();
+			if(result) drawFigure();
+		}
+	   
+   }
+//----------------------------------------------------------------------------------- 
+    
+    // Below are implementation for the animation between map selection and core computation
+
+	private Animation inFromRightAnimation() {
+
+	Animation inFromRight = new TranslateAnimation(
+	Animation.RELATIVE_TO_PARENT,  +1.0f, Animation.RELATIVE_TO_PARENT,  0.0f,
+	Animation.RELATIVE_TO_PARENT,  0.0f, Animation.RELATIVE_TO_PARENT,   0.0f
+	);
+	inFromRight.setDuration(500);
+	inFromRight.setInterpolator(new AccelerateInterpolator());
+	return inFromRight;
+	}
+	private Animation outToLeftAnimation() {
+	Animation outtoLeft = new TranslateAnimation(
+	  Animation.RELATIVE_TO_PARENT,  0.0f, Animation.RELATIVE_TO_PARENT,  -1.0f,
+	  Animation.RELATIVE_TO_PARENT,  0.0f, Animation.RELATIVE_TO_PARENT,   0.0f
+	);
+	outtoLeft.setDuration(500);
+	outtoLeft.setInterpolator(new AccelerateInterpolator());
+	return outtoLeft;
+	}
+
+	private Animation inFromLeftAnimation() {
+	Animation inFromLeft = new TranslateAnimation(
+	Animation.RELATIVE_TO_PARENT,  -1.0f, Animation.RELATIVE_TO_PARENT,  0.0f,
+	Animation.RELATIVE_TO_PARENT,  0.0f, Animation.RELATIVE_TO_PARENT,   0.0f
+	);
+	inFromLeft.setDuration(500);
+	inFromLeft.setInterpolator(new AccelerateInterpolator());
+	return inFromLeft;
+	}
+	private Animation outToRightAnimation() {
+	Animation outtoRight = new TranslateAnimation(
+	  Animation.RELATIVE_TO_PARENT,  0.0f, Animation.RELATIVE_TO_PARENT,  +1.0f,
+	  Animation.RELATIVE_TO_PARENT,  0.0f, Animation.RELATIVE_TO_PARENT,   0.0f
+	);
+	outtoRight.setDuration(500);
+	outtoRight.setInterpolator(new AccelerateInterpolator());
+	return outtoRight;
+	}
+//-------------------------------------------------------------------------------------------	 
+}
+/////////////////////////////////////////////////////////////////////////////////////////////
Index: /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/IssmJni.java
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/IssmJni.java	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/IssmJni.java	(revision 14391)
@@ -0,0 +1,12 @@
+package gov.nasa.jpl.issm;
+import java.nio.DoubleBuffer;
+
+class IssmJni
+{
+	public native void solveISSMModel(double alpha, DoubleBuffer buff);
+	public native int createISSMModel(String solution_type, String absfile, String relfile);
+	static 
+	{
+        System.loadLibrary("ISSMJNI");
+    }
+}
Index: /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/MenuPage.java
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/MenuPage.java	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/MenuPage.java	(revision 14391)
@@ -0,0 +1,88 @@
+package gov.nasa.jpl.issm;
+
+import android.app.Activity;
+import android.net.Uri;
+import android.os.Bundle;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.Button;
+import android.widget.ImageButton;
+import android.widget.PopupWindow;
+import android.content.Intent;
+/////////////////////////////////////////////////////////////////////////// 
+public class MenuPage extends Activity
+{
+	ISSM issm = new ISSM();
+	private String issmFolder; 
+//------------------------------------------------------------------------	
+	public void onCreate(Bundle icicle)
+	{
+		super.onCreate(icicle);
+		setContentView(R.layout.menupage);		
+		Bundle map = getIntent().getExtras();
+        {
+        	if(map!= null)
+        	{
+        		issmFolder = map.getString("pathToFile");
+        	}
+        }
+        //start the core implementation of ISSM
+	    ImageButton start = (ImageButton) findViewById(R.id.start);		
+		start.setOnClickListener(new View.OnClickListener() 
+		{
+			public void onClick(View v) 
+			{
+				Intent i = new Intent(MenuPage.this, ISSM.class);
+				i.putExtra("pathToFile", issmFolder);
+		        startActivity(i);
+			}
+		});
+		// navigate to youtube video
+		ImageButton video = (ImageButton) findViewById(R.id.video);		
+		video.setOnClickListener(new View.OnClickListener() 
+		{
+			public void onClick(View v) 
+			{
+				String url = "http://www.youtube.com/watch?v=KlDO0C8r_ws";
+				Intent i = new Intent(Intent.ACTION_VIEW);
+				i.setData(Uri.parse(url));
+		        startActivity(i);
+			}
+		});
+		// pop up a text box that contains information about ISSM
+		final ImageButton intro = (ImageButton) findViewById(R.id.intro);	
+		intro.setOnClickListener(new View.OnClickListener() 
+		{
+			public void onClick(View v)
+			{
+				LayoutInflater layoutInflater = (LayoutInflater)getBaseContext().getSystemService(LAYOUT_INFLATER_SERVICE);  
+				View popupView = layoutInflater.inflate(R.layout.popuptext, null);  
+				final PopupWindow popupWindow = new PopupWindow( popupView, 400,600, true);
+				popupWindow.showAtLocation(popupView, Gravity.CENTER, 0, 0);
+				Button dismiss = (Button)popupView.findViewById(R.id.dismiss);
+	            dismiss.setOnClickListener(new Button.OnClickListener()
+	            {
+	            	public void onClick(View v)
+	            	{
+	            		popupWindow.dismiss();
+	            	}
+	            });
+			}
+		});
+		//navigate to website
+		ImageButton visitus = (ImageButton) findViewById(R.id.visitus);		
+		visitus.setOnClickListener(new View.OnClickListener() 
+		{
+			public void onClick(View v) 
+			{
+				String url = "http://issm.jpl.nasa.gov/";
+				Intent i = new Intent(Intent.ACTION_VIEW);
+				i.setData(Uri.parse(url));
+		        startActivity(i);
+			}
+		});
+	}
+//-------------------------------------------------------------------------------------	
+}
+///////////////////////////////////////////////////////////////////////////////////////// 
Index: /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/MyGLRenderer.java
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/MyGLRenderer.java	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/MyGLRenderer.java	(revision 14391)
@@ -0,0 +1,350 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package gov.nasa.jpl.issm;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.nio.FloatBuffer;
+
+import javax.microedition.khronos.egl.EGLConfig;
+import javax.microedition.khronos.opengles.GL10;
+
+import android.opengl.GLES20;
+import android.opengl.GLSurfaceView;
+import android.opengl.Matrix;
+
+public class MyGLRenderer implements GLSurfaceView.Renderer 
+{
+	public volatile float mAngle;
+	public volatile float mAngleX; /* NEW STUFF*/
+	public volatile float mAngleY;
+	
+	
+    private FloatBuffer[] triangleVert;
+	
+	private float[][] mScaleMatrix;  // scaling /* NEW STUFF*/
+	private float[][] mRotXMatrix;	 // rotation x 
+	private float[][] mRotYMatrix;	 // rotation x
+
+	/**
+	 * Store the model matrix. This matrix is used to move models from object space (where each model can be thought
+	 * of being located at the center of the universe) to world space.
+	 */
+	private float[][] mModelMatrix;
+	
+	/**
+	 * Store the view matrix. This can be thought of as our camera. This matrix transforms world space to eye space;
+	 * it positions things relative to our eye.
+	 */
+	private float[][] mViewMatrix;
+
+	/** Store the projection matrix. This is used to project the scene onto a 2D viewport. */
+	private float[][] mProjectionMatrix;
+
+	/** Allocate storage for the final combined matrix. This will be passed into the shader program. */
+	private float[][] mMVPMatrix;
+
+	/** This will be used to pass in the transformation matrix. */
+	private int mMatrixHandle;
+	
+    private float[][] triangleData2DArr;
+    
+    private int mPositionHandle;
+    
+    private int mColorHandle;
+    
+	/** How many bytes per float. */
+    private final int mBytesPerFloat = 4;
+
+    /** How many elements per vertex. */
+    private final int mStrideBytes = 7 * mBytesPerFloat;
+
+    /** Offset of the position data. */
+    private final int mPositionOffset = 0;
+
+    /** Size of the position data in elements. */
+    private final int mPositionDataSize = 3;
+
+    /** Offset of the color data. */
+    private final int mColorOffset = 3;
+
+    /** Size of the color data in elements. */
+    private final int mColorDataSize = 4;	
+
+	// scaling /* NEW STUFF*/
+	float scaleX = 1.0f;
+	float scaleY = 1.0f;
+	float scaleZ = 1.0f;
+
+	public float eyeX;
+	public float eyeY;
+	public float eyeZ;
+	
+    public MyGLRenderer(float[][] vertices)
+    {	
+    	triangleData2DArr = new float[vertices.length][21];
+ 
+    	triangleVert = new FloatBuffer[vertices.length];
+    	mScaleMatrix  = new float[triangleVert.length][16];  // scaling  /* NEW STUFF*/
+    	mRotXMatrix  = new float[triangleVert.length][16];	 // rotation x
+    	mRotYMatrix  = new float[triangleVert.length][16];	 // rotation x
+    	
+    	for (int i = 0; i < vertices.length; i++)
+    	{
+    		for (int j = 0; j < 21; j++)
+    			triangleData2DArr[i][j] = vertices[i][j]; 
+    	}
+	    
+	    // initialize vertex byte buffer for shape coordinates
+    	for (int i = 0; i < vertices.length; i++)
+    	{
+    		triangleVert[i] = ByteBuffer.allocateDirect(triangleData2DArr[i].length * mBytesPerFloat)
+    													.order(ByteOrder.nativeOrder()).asFloatBuffer();
+    		triangleVert[i].put(triangleData2DArr[i]).position(0);
+    	}
+    }
+    
+	public void changeScale(float scale) /* NEW STUFF*/
+	{
+		if (scaleX * scale > 3.0f) return;
+		  scaleX *= scale; scaleY *= scale; scaleZ *= scale;
+		
+		//scaleX += scale;scaleY += scale;scaleZ += scale;
+		//scaleX = scale;scaleY = scale;scaleZ = scale;
+		//scaleX /= 100;scaleY /= 100;scaleZ /= 100;
+	}
+
+	public void defaultScale() 
+	{
+		scaleX = 1f;
+		scaleY = 1f;
+		scaleZ = 1f;
+	}
+	
+    public void onSurfaceCreated(GL10 unused, EGLConfig config) 
+    {
+        // Set the background frame color
+        GLES20.glClearColor(0.2f, 0.4f, 1.0f, 1.0f);
+        
+		// Position the eye behind the origin.
+		eyeX = 0.0f;
+		eyeY = 0.0f;
+		eyeZ = 1.5f;
+
+		// We are looking toward the distance
+		final float lookX = 0.0f;
+		final float lookY = 0.0f;
+		final float lookZ = -5.0f;
+
+		// Set our up vector. This is where our head would be pointing were we holding the camera.
+		final float upX = 0.0f;
+		final float upY = 1.0f;
+		final float upZ = 0.0f;
+
+		// Set the view matrix. This matrix can be said to represent the camera position.
+		// NOTE: In OpenGL 1, a ModelView matrix is used, which is a combination of a model and
+		// view matrix. In OpenGL 2, we can keep track of these matrices separately if we choose.
+		mViewMatrix = new float[triangleVert.length][16];
+		
+		
+		for (int i = 0; i < triangleVert.length; i++)
+			Matrix.setLookAtM(mViewMatrix[i], 0, eyeX, eyeY, eyeZ, lookX, lookY, lookZ, upX, upY, upZ);
+			//Matrix.setLookAtM(mVMatrix[i], 0, 0, 0, -5.0f, 0.0f, 0f, 0f, 0f, 1.0f, 0.0f);
+        
+		final String vertexShader =
+				"uniform mat4 u_MVPMatrix;      \n"		// A constant representing the combined model/view/projection matrix.
+			  + "attribute vec4 a_Position;     \n"		// Per-vertex position information we will pass in.
+			  + "attribute vec4 a_Color;        \n"		// Per-vertex color information we will pass in.			  
+			  + "varying vec4 v_Color;          \n"		// This will be passed into the fragment shader.
+			  + "void main()                    \n"		// The entry point for our vertex shader.
+			  + "{                              \n"
+			  + "   v_Color = a_Color;          \n"		// Pass the color through to the fragment shader. 
+			  
+			  											// It will be interpolated across the triangle.
+			  + "   gl_Position = u_MVPMatrix   \n" 	// gl_Position is a special variable used to store the final position.
+			  + "               * a_Position;   \n"     // Multiply the vertex by the matrix to get the final point in 			                                            			 
+			  + "}                              \n";    // normalized screen coordinates.
+
+			final String fragmentShader =
+				"precision mediump float;       \n"		// Set the default precision to medium. We don't need as high of a											// precision in the fragment shader.				
+			  + "varying vec4 v_Color;          \n"		// This is the color from the vertex shader interpolated across the 
+			  											// triangle per fragment.			  
+			  + "void main()                    \n"		// The entry point for our fragment shader.
+			  + "{                              \n"
+			  + "   gl_FragColor = v_Color;     \n"		// Pass the color directly through the pipeline.		  
+			  + "}                              \n";												
+
+    	   
+        int vertexShaderHandle = GLES20.glCreateShader(GLES20.GL_VERTEX_SHADER);
+		// Pass in the shader source.
+		GLES20.glShaderSource(vertexShaderHandle, vertexShader);
+
+		// Compile the shader.
+		GLES20.glCompileShader(vertexShaderHandle);
+
+		// Get the compilation status.
+		final int[] compileStatus1 = new int[1];
+		GLES20.glGetShaderiv(vertexShaderHandle, GLES20.GL_COMPILE_STATUS, compileStatus1, 0);
+
+		// If the compilation failed, delete the shader.
+		if (compileStatus1[0] == 0) 
+		{				
+			GLES20.glDeleteShader(vertexShaderHandle);
+			vertexShaderHandle = 0;
+		}
+		
+         
+    	int fragmentShaderHandle = GLES20.glCreateShader(GLES20.GL_FRAGMENT_SHADER);
+		// Pass in the shader source.
+		GLES20.glShaderSource(fragmentShaderHandle, fragmentShader);
+
+		// Compile the shader.
+		GLES20.glCompileShader(fragmentShaderHandle);
+
+		// Get the compilation status.
+		final int[] compileStatus2 = new int[1];
+		GLES20.glGetShaderiv(fragmentShaderHandle, GLES20.GL_COMPILE_STATUS, compileStatus2, 0);
+
+		// If the compilation failed, delete the shader.
+		if (compileStatus2[0] == 0) 
+		{				
+			GLES20.glDeleteShader(fragmentShaderHandle);
+			fragmentShaderHandle = 0;
+		}
+
+        
+        int mProgram = GLES20.glCreateProgram();
+		// Bind the vertex shader to the program.
+		GLES20.glAttachShader(mProgram, vertexShaderHandle);			
+
+		// Bind the fragment shader to the program.
+		GLES20.glAttachShader(mProgram, fragmentShaderHandle);
+
+		// Bind attributes
+		GLES20.glBindAttribLocation(mProgram, 0, "a_Position");
+		GLES20.glBindAttribLocation(mProgram, 1, "a_Color");
+		
+		// Link the two shaders together into a program.
+		GLES20.glLinkProgram(mProgram);
+
+		// Get the link status.
+		final int[] linkStatus = new int[1];
+		GLES20.glGetProgramiv(mProgram, GLES20.GL_LINK_STATUS, linkStatus, 0);
+
+		// If the link failed, delete the program.
+		if (linkStatus[0] == 0) 
+		{				
+			GLES20.glDeleteProgram(mProgram);
+			mProgram = 0;
+		}
+		
+		for (int i = 0; i < triangleVert.length; i++)
+		{
+			mMatrixHandle = GLES20.glGetUniformLocation(mProgram, "u_MVPMatrix");       
+	        mPositionHandle = GLES20.glGetAttribLocation(mProgram, "a_Position");
+	        mColorHandle = GLES20.glGetAttribLocation(mProgram, "a_Color");
+		}
+        
+        // Add program to OpenGL environment
+        GLES20.glUseProgram(mProgram);
+    }
+    public void onSurfaceChanged(GL10 unused, int width, int height) 
+    {
+        // Adjust the viewport based on geometry changes,
+        // such as screen rotation
+        GLES20.glViewport(0, 0, width, height);
+        
+		// Create a new perspective projection matrix. The height will stay the same
+		// while the width will vary as per aspect ratio.
+		final float ratio = (float) width / height;
+		
+		mProjectionMatrix = new float[triangleVert.length][16];
+		for (int i = 0; i < triangleVert.length; i++)
+			Matrix.frustumM(mProjectionMatrix[i], 0, -ratio, ratio, -1, 1, 1f, 5);
+			
+    }
+    
+    public void onDrawFrame(GL10 glUnused) 
+    {
+    	// Draw background color
+    	GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);
+    	
+    	mModelMatrix = new float[triangleVert.length][16];
+        // Draw the triangle facing straight on.
+    	for (int i = 0; i < triangleVert.length; i++)
+    	{
+    		//Matrix.setIdentityM(mModelMatrix[i], 0); /* NEW STUFF*/
+    		Matrix.setIdentityM(mScaleMatrix[i], 0);
+    		Matrix.scaleM(mScaleMatrix[i], 0, scaleX, scaleY, scaleZ);
+    		
+    		// Rotation along x
+    		Matrix.setRotateM(mRotXMatrix[i], 0, this.mAngleY, -1.0f, 0.0f, 0.0f);
+    		Matrix.setRotateM(mRotYMatrix[i], 0, this.mAngleX, 0.0f, 1.0f, 0.0f); /* NEW STUFF*/
+    		
+    		Matrix.setLookAtM(mViewMatrix[i], 0, eyeX, eyeY, eyeZ, 0.0f, 0.0f, -5.0f, 0.0f, 1.0f, 0.0f); 
+    	
+    	}
+    		
+    	mMVPMatrix = new float[triangleVert.length][16];
+    	draw(triangleVert); 
+
+    }
+
+    private void draw(final FloatBuffer[] aTriangleBuffer)
+    {
+    	for (int i = 0; i < aTriangleBuffer.length; i++)
+    	{
+	        // Pass in the position information
+	        aTriangleBuffer[i].position(mPositionOffset);
+	        GLES20.glVertexAttribPointer(mPositionHandle, mPositionDataSize, GLES20.GL_FLOAT, false,
+	                				     mStrideBytes, aTriangleBuffer[i]);
+	        
+	        GLES20.glEnableVertexAttribArray(mPositionHandle);
+	     
+	        
+	        // Pass in the color information
+	        aTriangleBuffer[i].position(mColorOffset);
+	        GLES20.glVertexAttribPointer(mColorHandle, mColorDataSize, GLES20.GL_FLOAT, false,
+	                					 mStrideBytes, aTriangleBuffer[i]);
+	        
+	        GLES20.glEnableVertexAttribArray(mColorHandle);
+	        
+	        Matrix.setRotateM(mRotXMatrix[i], 0, this.mAngleY, -1.0f, 0.0f, 0.0f); /* NEW STUFF*/
+    		Matrix.setRotateM(mRotYMatrix[i], 0, this.mAngleX, 0.0f, 1.0f, 0.0f);
+
+    		float tempMatrix[][] = new float[triangleVert.length][16]; /* NEW STUFF*/
+    		Matrix.multiplyMM(tempMatrix[i], 0, mRotYMatrix[i], 0, mRotXMatrix[i], 0);
+    		Matrix.multiplyMM(mModelMatrix[i], 0, mScaleMatrix[i], 0, tempMatrix[i], 0);
+
+			// This multiplies the view matrix by the model matrix, and stores the result in the MVP matrix
+	        // (which currently contains model * view).
+	        Matrix.multiplyMM(mMVPMatrix[i], 0, mViewMatrix[i], 0, mModelMatrix[i], 0);
+	        
+	        // This multiplies the modelview matrix by the projection matrix, and stores the result in the MVP matrix
+	        // (which now contains model * view * projection).
+	        Matrix.multiplyMM(mMVPMatrix[i], 0, mProjectionMatrix[i], 0, mMVPMatrix[i], 0);
+	        
+	        GLES20.glUniformMatrix4fv(mMatrixHandle, 1, false, mMVPMatrix[i], 0);   
+
+	        // Draw the triangle
+	        GLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, 3);
+	        
+	        // Disable vertex array
+	        GLES20.glDisableVertexAttribArray(mPositionHandle);
+    	}
+    }
+
+}
Index: /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/MyGLSurfaceView.java
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/MyGLSurfaceView.java	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/MyGLSurfaceView.java	(revision 14391)
@@ -0,0 +1,215 @@
+package gov.nasa.jpl.issm;
+
+import java.nio.DoubleBuffer;
+import java.util.Random;
+
+import android.content.Context;
+import android.opengl.GLSurfaceView;
+import android.util.FloatMath;
+import android.view.MotionEvent;
+
+
+class MyGLSurfaceView extends GLSurfaceView 
+{
+	private MyGLRenderer mRend;
+	private DoubleBuffer db;
+	private int size;
+	double vmax = 0, vmin=0;
+	final int firstVelocity = 9; 
+	ColorMap colorMap;
+	
+	// pinch to zoom
+	float oldDist = 100.0f;
+	float newDist;
+	
+	int mode = 0;
+    public MyGLSurfaceView(Context context, DoubleBuffer db, int size, ColorMap colorMap) 
+    {
+        super(context);
+        // Create an OpenGL ES 2.0 context.
+        setEGLContextClientVersion(2);
+        this.db = db;
+        this.size = size;
+        this.colorMap = colorMap;
+        vmin = db.get(firstVelocity);
+        findMinMaxVelocity(); 
+        intialize();
+    }
+    private void intialize()
+    {
+        final int MAX_VERTICES = 21;
+        float f[][] = new float[size][MAX_VERTICES];
+        //indexes prefer to velocity at each vertices of triangles.
+        double alpha1, alpha2, alpha3;
+		float  xmin,xmax,ymin,ymax;
+        final int XSCALE_FACTOR = 1;
+        final int YSCALE_FACTOR = 2;
+        RGB rgb = new RGB();
+
+		for (int i = 0; i < size; i++) {
+				f[i][0] = (float)db.get(12*i+0);
+				f[i][1] = (float)db.get(12*i+1);
+				f[i][2] = (float)db.get(12*i+2);
+				f[i][7] = (float)db.get(12*i+3);
+				f[i][8] = (float)db.get(12*i+4);
+				f[i][9] = (float)db.get(12*i+5);
+				f[i][14] = (float)db.get(12*i+6);
+				f[i][15] = (float)db.get(12*i+7);
+				f[i][16] = (float)db.get(12*i+8);
+				
+				f[i][6] = 1.0f;
+				f[i][13] = 1.0f;
+				f[i][20] = 1.0f;
+				
+				alpha1 = getAlphaColor(db.get(12*i+9));
+				alpha2 = getAlphaColor(db.get(12*i+10));
+				alpha3 = getAlphaColor(db.get(12*i+11));
+				
+				colorMap.getRGB(alpha1, rgb);
+				float r1 = rgb.getR();
+				float g1 = rgb.getG();
+				float b1 = rgb.getB();
+				
+				colorMap.getRGB(alpha2, rgb);
+				float r2 = rgb.getR();
+				float g2 = rgb.getG();
+				float b2 = rgb.getB();
+				
+				colorMap.getRGB(alpha3, rgb);
+				float r3 = rgb.getR();
+				float g3 = rgb.getG();
+				float b3 = rgb.getB();
+				
+				
+				f[i][3] = r1;
+				f[i][4] = g1;
+				f[i][5] = b1;
+				
+				f[i][10] = r2;
+				f[i][11] = g2;
+				f[i][12] = b2;
+				
+				f[i][17] = r3;
+				f[i][18] = g3;
+				f[i][19] = b3;
+
+		}
+
+	
+		xmin=0; ymin=0; xmax=0; ymax=0;
+
+		for (int i = 0; i < size; i++) {
+			if (f[i][0]<xmin) xmin=f[i][0];
+			if (f[i][0]>xmax) xmax=f[i][0];
+
+			if (f[i][1]<ymin) ymin=f[i][1];
+			if (f[i][1]>ymax) ymax=f[i][1];
+		}
+				
+		for (int i = 0; i < size; i++) {
+				f[i][0] =  2*(f[i][0]-xmin)/(xmax-xmin)-1;
+				f[i][1] =  2*(f[i][1]-ymin)/(ymax-ymin)-1;
+				f[i][7] =  2*(f[i][7]-xmin)/(xmax-xmin)-1;
+				f[i][8] =  2*(f[i][8]-ymin)/(ymax-ymin)-1;
+				f[i][14] =  2*(f[i][14]-xmin)/(xmax-xmin)-1;
+				f[i][15] =  2*(f[i][15]-ymin)/(ymax-ymin)-1;
+		}
+				
+    	mRend = new MyGLRenderer(f);
+    	// Set the Renderer for drawing on the GLSurfaceView
+        setRenderer(mRend);
+
+        // Render the view only when there is a change in the drawing data
+        setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);
+    }
+    private void findMinMaxVelocity()
+    {
+    	for(int i = 0; i < size*12; i++)
+    	{
+    		if(i%12==9 || i%12==10 ||i%12==11 )
+    		{
+    			if (db.get(i) <  vmin) vmin = db.get(i);
+    			if (db.get(i) >= vmax) vmax = db.get(i);
+    		}
+    		else continue; 
+    	}
+    	
+    }  
+    private double getAlphaColor(double velocity)
+    {
+    	return (velocity-vmin)/(vmax-vmin);
+    }
+    
+    private final float TOUCH_SCALE_FACTOR = 180.0f / 320;
+    private float mPreviousX;
+    
+    private float mPreviousY;
+ // touch events
+ 	private final int NONE = 0;
+ 	private final int DRAG = 0;
+ 	private final int ZOOM = 0;
+    @Override
+    public boolean onTouchEvent(MotionEvent e) /* NEW STUFF*/
+	{
+		float x = e.getX();
+		float y = e.getY();
+		switch (e.getAction()) {
+			case MotionEvent.ACTION_DOWN:			// one touch: drag
+		      mode = DRAG;
+		      //mRend.eyeX = e.getX();
+		      //mRend.eyeY = e.getY;
+		      break;
+		      
+			case MotionEvent.ACTION_POINTER_DOWN:	// two touches: zoom
+				oldDist = spacing(e);
+				if (oldDist > 10.0f) 
+					mode = ZOOM; // zoom
+				break;
+				
+			case MotionEvent.ACTION_UP:		// no mode
+				mode = NONE;
+				oldDist = 100.0f;
+				break;
+				
+			case MotionEvent.ACTION_POINTER_UP:		// no mode
+				mode = NONE;
+				oldDist = 100.0f;
+				break;
+				
+			case MotionEvent.ACTION_MOVE:						// rotation
+				if (e.getPointerCount() > 1 && mode == ZOOM) 
+				{
+					newDist = spacing(e);
+					if (newDist > 10.0f) {
+						float scale = newDist/oldDist; // scale
+						
+						// scale in the renderer
+						mRend.changeScale(scale);
+						oldDist = newDist;
+					}
+				}
+				else if (mode == DRAG)
+				{
+					float dx = x - mPreviousX;
+					float dy = y - mPreviousY;
+					
+					mRend.mAngleX += dx * TOUCH_SCALE_FACTOR;
+					mRend.mAngleY += dy * TOUCH_SCALE_FACTOR;
+
+					requestRender();
+				}
+				break;
+		}
+		mPreviousX = x;
+		mPreviousY = y;
+		return true;
+	}
+	
+	private float spacing(MotionEvent event) /* NEW STUFF*/
+	{
+		float x = event.getX(0) - event.getX(1);
+		float y = event.getY(0) - event.getY(1);
+		return FloatMath.sqrt(x * x + y * y);
+	}
+}
+
Index: /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/SplashScreen.java
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/SplashScreen.java	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/SplashScreen.java	(revision 14391)
@@ -0,0 +1,156 @@
+package gov.nasa.jpl.issm;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import android.app.Activity;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.os.Environment;
+import android.util.Log;
+import android.view.animation.Animation;
+import android.view.animation.AnimationUtils;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.Toast;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.content.res.AssetManager;
+/////////////////////////////////////////////////////////////////////////// 
+public class SplashScreen extends Activity
+{
+	MenuPage mp = new MenuPage();
+	private static final String PREFERENCE_FIRST_RUN = null;
+	private String extStorageDirectory;
+	private String issmFolder; 
+	SharedPreferences settings;
+//------------------------------------------------------------------------	
+	public void onCreate(Bundle icicle)
+	{
+		super.onCreate(icicle);
+		setContentView(R.layout.splashscreen);		
+	    settings = this.getSharedPreferences("MenuPage", 0);
+	    boolean firstrun = settings.getBoolean(PREFERENCE_FIRST_RUN, true);
+	    extStorageDirectory = Environment.getExternalStorageDirectory().toString();
+	    issmFolder = extStorageDirectory + "/ISSM/input_files/";
+
+	    new CopyDataTask().execute(firstrun);    
+	}
+//-------------------------------------------------------------------------------------------
+	//Start the splashscreen at beginning while transferring 
+	//data file from Assets folder to SDcard
+	private class CopyDataTask extends AsyncTask<Boolean,Void,Boolean>
+	   {
+			@Override
+			protected Boolean doInBackground(Boolean... target) 
+			{
+				StartAnimations();
+				try {
+					Thread.sleep(3000);
+				} catch (InterruptedException e1) {
+					// TODO Auto-generated catch block
+					e1.printStackTrace();
+				}
+				if(target[0] = false)
+				{
+			        SharedPreferences.Editor e = settings.edit();
+			        e.putBoolean(PREFERENCE_FIRST_RUN, false);
+			        
+			        e.commit();
+			        // If not, run these methods:
+			        SetDirectory(issmFolder);
+				}
+				return true;
+			}
+			protected void onPostExecute(Boolean result)
+			{
+				Intent i = new Intent(SplashScreen.this, MenuPage.class);
+				i.putExtra("pathToFile", issmFolder);
+		        startActivity(i);
+			}
+	   }
+//-------------------------------------------------------------------------------------------
+	private void SetDirectory(String directory) 
+	{
+	    if (android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED)) 
+	    {
+	    	System.out.println(issmFolder);
+	        File txtDirectory = new File(issmFolder);
+	        
+	        // Check and create directory in SDcard
+	        if(!txtDirectory.exists())
+	        {
+	        	txtDirectory.mkdirs();
+	        	System.out.println("making directory");
+	        }
+	        CopyAssets(); // Then run the method to copy the file.
+
+	    } 
+	    else if (android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED_READ_ONLY)) 
+	    {
+	    	Toast toast = Toast.makeText(this.getApplicationContext(), "Memory is not mounted to device", Toast.LENGTH_LONG);
+	    	toast.show();
+	    }
+
+	}
+//----------------------------------------------------------------------------
+	/**
+	 * -- Copy the file from the assets folder to the sdCard
+	 * ===========================================================
+	 **/
+		private void CopyAssets() 
+		{
+		    AssetManager assetManager = getAssets();
+		    String[] files = null;
+		    try {
+		        files = assetManager.list("Map");
+		    } catch (IOException e) {
+		        Log.e("tag", e.getMessage());
+		    }
+		    for (int i = 0; i < files.length; i++) {
+		        InputStream in = null;
+		        OutputStream out = null;
+		        try {
+		            in = assetManager.open("Map/"+files[i]);
+		            out = new FileOutputStream(issmFolder + files[i]);
+		            copyFile(in, out);
+		            in.close();
+		            in = null;
+		            out.flush();
+		            out.close();
+		            out = null;
+		        } catch (Exception e) {
+		            Log.e("tag", e.getMessage());
+		        }
+		    }
+		    System.out.println("Done");
+		}
+//----------------------------------------------------------------------------
+		private void copyFile(InputStream in, OutputStream out) throws IOException 
+		{
+		    byte[] buffer = new byte[1024];
+		    int read;
+		    while ((read = in.read(buffer)) != -1) {
+		        out.write(buffer, 0, read);
+		    }
+		}
+//----------------------------------------------------------------------------
+		 private void StartAnimations() 
+		 {
+		        Animation anim = AnimationUtils.loadAnimation(this, R.anim.alpha);
+		        anim.reset();
+		        LinearLayout l=(LinearLayout) findViewById(R.id.lin_lay);
+		        l.clearAnimation();
+		        l.startAnimation(anim);
+		 
+		        anim = AnimationUtils.loadAnimation(this, R.anim.translate);
+		        anim.reset();
+		        ImageView iv = (ImageView) findViewById(R.id.logo);
+		        iv.clearAnimation();
+		        iv.startAnimation(anim);
+		    }
+//-------------------------------------------------------------------------------		 
+}
+////////////////////////////////////////////////////////////////////////////////// 
Index: /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/VerticalSeekBar.java
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/VerticalSeekBar.java	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/VerticalSeekBar.java	(revision 14391)
@@ -0,0 +1,60 @@
+package gov.nasa.jpl.issm;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.util.AttributeSet;
+import android.view.MotionEvent;
+import android.widget.SeekBar;
+
+public class VerticalSeekBar extends SeekBar {
+
+	private final int MAX_SIZE = 500;
+    public VerticalSeekBar(Context context) {
+        super(context);
+    }
+
+    public VerticalSeekBar(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+    }
+
+    public VerticalSeekBar(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+        super.onSizeChanged(h, w, oldh, oldw);
+    }
+
+    @Override
+    protected synchronized void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+        super.onMeasure(heightMeasureSpec, widthMeasureSpec);
+        setMeasuredDimension(getMeasuredHeight(), getMeasuredWidth());
+    }
+
+    protected void onDraw(Canvas c) {
+    	c.rotate(-90);
+        c.translate(-getHeight(),0);
+        super.onDraw(c);
+    }
+
+    @Override
+    public boolean onTouchEvent(MotionEvent event) {
+        if (!isEnabled()) {
+            return false;
+        }
+        int i = 0;
+        switch (event.getAction()) {
+            case MotionEvent.ACTION_DOWN:
+            case MotionEvent.ACTION_MOVE:
+            case MotionEvent.ACTION_UP:
+                i = getMax() - (int) (getMax() * event.getY() / getHeight());
+                setProgress(i);
+                onSizeChanged(getWidth(), getHeight(), 0, 0);
+                break;
+
+            case MotionEvent.ACTION_CANCEL:
+                break;
+        }
+        return true;
+    }
+}
Index: /issm/trunk-jpl/src/mobile/android/ISSM_Visual/.classpath
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM_Visual/.classpath	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM_Visual/.classpath	(revision 14391)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+	<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="gen"/>
+	<classpathentry kind="output" path="bin/classes"/>
+</classpath>
Index: /issm/trunk-jpl/src/mobile/android/ISSM_Visual/.project
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM_Visual/.project	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM_Visual/.project	(revision 14391)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>ISSM_Visual</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.ApkBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
Index: /issm/trunk-jpl/src/mobile/android/ISSM_Visual/AndroidManifest.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM_Visual/AndroidManifest.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM_Visual/AndroidManifest.xml	(revision 14391)
@@ -0,0 +1,25 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="gov.nasa.jpl.issm.visual"
+    android:versionCode="1"
+    android:versionName="1.0" >
+
+    <uses-sdk
+        android:minSdkVersion="8"
+        android:targetSdkVersion="15" />
+
+    <application
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme" >
+        <activity
+            android:name=".ISSMVisual"
+            android:label="@string/title_activity_issmvisual" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest>
Index: /issm/trunk-jpl/src/mobile/android/ISSM_Visual/bin/AndroidManifest.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM_Visual/bin/AndroidManifest.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM_Visual/bin/AndroidManifest.xml	(revision 14391)
@@ -0,0 +1,25 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="gov.nasa.jpl.issm.visual"
+    android:versionCode="1"
+    android:versionName="1.0" >
+
+    <uses-sdk
+        android:minSdkVersion="8"
+        android:targetSdkVersion="15" />
+
+    <application
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme" >
+        <activity
+            android:name=".ISSMVisual"
+            android:label="@string/title_activity_issmvisual" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest>
Index: /issm/trunk-jpl/src/mobile/android/ISSM_Visual/bin/jarlist.cache
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM_Visual/bin/jarlist.cache	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM_Visual/bin/jarlist.cache	(revision 14391)
@@ -0,0 +1,3 @@
+# cache for current jar dependecy. DO NOT EDIT.
+# format is <lastModified> <length> <SHA-1> <path>
+# Encoding is UTF-8
Index: /issm/trunk-jpl/src/mobile/android/ISSM_Visual/gen/com/example/issm_visual/BuildConfig.java
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM_Visual/gen/com/example/issm_visual/BuildConfig.java	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM_Visual/gen/com/example/issm_visual/BuildConfig.java	(revision 14391)
@@ -0,0 +1,6 @@
+/** Automatically generated file. DO NOT MODIFY */
+package com.example.issm_visual;
+
+public final class BuildConfig {
+    public final static boolean DEBUG = true;
+}
Index: /issm/trunk-jpl/src/mobile/android/ISSM_Visual/gen/com/example/issm_visual/R.java
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM_Visual/gen/com/example/issm_visual/R.java	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM_Visual/gen/com/example/issm_visual/R.java	(revision 14391)
@@ -0,0 +1,40 @@
+/* AUTO-GENERATED FILE.  DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * aapt tool from the resource data it found.  It
+ * should not be modified by hand.
+ */
+
+package com.example.issm_visual;
+
+public final class R {
+    public static final class attr {
+    }
+    public static final class drawable {
+        public static final int ic_action_search=0x7f020000;
+        public static final int ic_launcher=0x7f020001;
+    }
+    public static final class id {
+        public static final int frame=0x7f070003;
+        public static final int menu_settings=0x7f070005;
+        public static final int relativeLay=0x7f070000;
+        public static final int seekBar=0x7f070001;
+        public static final int status=0x7f070002;
+        public static final int value=0x7f070004;
+    }
+    public static final class layout {
+        public static final int activity_issmvisual=0x7f030000;
+    }
+    public static final class menu {
+        public static final int activity_issmvisual=0x7f060000;
+    }
+    public static final class string {
+        public static final int app_name=0x7f040000;
+        public static final int hello_world=0x7f040001;
+        public static final int menu_settings=0x7f040002;
+        public static final int title_activity_issmvisual=0x7f040003;
+    }
+    public static final class style {
+        public static final int AppTheme=0x7f050000;
+    }
+}
Index: /issm/trunk-jpl/src/mobile/android/ISSM_Visual/proguard-project.txt
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM_Visual/proguard-project.txt	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM_Visual/proguard-project.txt	(revision 14391)
@@ -0,0 +1,20 @@
+# To enable ProGuard in your project, edit project.properties
+# to define the proguard.config property as described in that file.
+#
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in ${sdk.dir}/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the ProGuard
+# include property in project.properties.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
Index: /issm/trunk-jpl/src/mobile/android/ISSM_Visual/project.properties
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM_Visual/project.properties	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM_Visual/project.properties	(revision 14391)
@@ -0,0 +1,14 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system edit
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+#
+# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
+#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
+
+# Project target.
+target=android-16
Index: /issm/trunk-jpl/src/mobile/android/ISSM_Visual/res/layout/activity_issmvisual.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM_Visual/res/layout/activity_issmvisual.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM_Visual/res/layout/activity_issmvisual.xml	(revision 14391)
@@ -0,0 +1,44 @@
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/relativeLay"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="horizontal" >
+
+    <SeekBar
+        android:id="@+id/seekBar"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_alignParentBottom="true"
+        android:layout_alignParentLeft="true"
+        android:layout_marginBottom="41dp" />
+
+    <TextView
+        android:id="@+id/value"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_above="@+id/seekBar"
+        android:layout_centerHorizontal="true"
+        android:layout_marginBottom="15dp"
+        android:text="alpha value = 0" />
+
+    <FrameLayout
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        xmlns:tools="http://schemas.android.com/tools"
+        android:id="@+id/frame"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_above="@+id/value"
+        android:layout_centerHorizontal="true"
+        android:layout_marginBottom="12dp" >
+    </FrameLayout>
+
+    <Button
+        android:id="@+id/button1"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_above="@+id/seekBar"
+        android:layout_alignParentRight="true"
+        android:text="Reset" />
+
+</RelativeLayout>
Index: /issm/trunk-jpl/src/mobile/android/ISSM_Visual/res/menu/activity_issmvisual.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM_Visual/res/menu/activity_issmvisual.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM_Visual/res/menu/activity_issmvisual.xml	(revision 14391)
@@ -0,0 +1,6 @@
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:id="@+id/menu_settings"
+        android:title="@string/menu_settings"
+        android:orderInCategory="100"
+        android:showAsAction="never" />
+</menu>
Index: /issm/trunk-jpl/src/mobile/android/ISSM_Visual/res/values-v11/styles.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM_Visual/res/values-v11/styles.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM_Visual/res/values-v11/styles.xml	(revision 14391)
@@ -0,0 +1,5 @@
+<resources>
+
+    <style name="AppTheme" parent="android:Theme.Holo.Light" />
+
+</resources>
Index: /issm/trunk-jpl/src/mobile/android/ISSM_Visual/res/values-v14/styles.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM_Visual/res/values-v14/styles.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM_Visual/res/values-v14/styles.xml	(revision 14391)
@@ -0,0 +1,5 @@
+<resources>
+
+    <style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar" />
+
+</resources>
Index: /issm/trunk-jpl/src/mobile/android/ISSM_Visual/res/values/strings.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM_Visual/res/values/strings.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM_Visual/res/values/strings.xml	(revision 14391)
@@ -0,0 +1,8 @@
+<resources>
+
+    <string name="app_name">ISSM_Visual</string>
+    <string name="hello_world">Hello world!</string>
+    <string name="menu_settings">Settings</string>
+    <string name="title_activity_issmvisual">ISSMVisual</string>
+
+</resources>
Index: /issm/trunk-jpl/src/mobile/android/ISSM_Visual/res/values/styles.xml
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM_Visual/res/values/styles.xml	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM_Visual/res/values/styles.xml	(revision 14391)
@@ -0,0 +1,5 @@
+<resources>
+
+    <style name="AppTheme" parent="android:Theme.Light" />
+
+</resources>
Index: /issm/trunk-jpl/src/mobile/android/ISSM_Visual/src/gov/nasa/jpl/issm/visual/ISSMVisual.java
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM_Visual/src/gov/nasa/jpl/issm/visual/ISSMVisual.java	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM_Visual/src/gov/nasa/jpl/issm/visual/ISSMVisual.java	(revision 14391)
@@ -0,0 +1,95 @@
+package gov.nasa.jpl.issm.visual;
+
+
+import android.app.Activity;
+import android.content.DialogInterface.OnClickListener;
+import android.opengl.GLSurfaceView;
+import android.os.Bundle;
+import android.view.Menu;
+import android.view.View;
+import android.widget.Button;
+import android.widget.FrameLayout;
+import android.widget.SeekBar;
+import android.widget.SeekBar.OnSeekBarChangeListener;
+import android.widget.TextView;
+
+public class ISSMVisual extends Activity implements OnSeekBarChangeListener
+{
+	private SeekBar bar;
+    private TextView /*txtStatus,*/ txtValue;
+    private GLSurfaceView mGLView;
+	private FrameLayout frame;
+	
+    @Override
+    public void onCreate(Bundle savedInstanceState) 
+    {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_issmvisual);
+        
+        bar = (SeekBar)findViewById(R.id.seekBar); // make seekbar object
+        bar.setOnSeekBarChangeListener(this); // set seekbar listener
+        txtValue = (TextView)findViewById(R.id.value);
+        Button reset = (Button)findViewById(R.id.button1);
+        reset.setOnClickListener(new View.OnClickListener()
+        {
+            public void onClick(View v) 
+            {
+            	frame.removeView(mGLView);
+            	mGLView = new MyGLSurfaceView(ISSMVisual.this);
+            	frame.addView(mGLView);
+            }
+        });
+        //txtStatus = (TextView)findViewById(R.id.status);
+        
+        mGLView = new MyGLSurfaceView(this);
+        frame = (FrameLayout)findViewById(R.id.frame);
+        frame.addView(mGLView);
+    }
+	public void onProgressChanged(SeekBar seekBar, int val,
+    		boolean fromUser) 
+    {
+    	// change progress text label with current Seekbar value
+    	txtValue.setText("alpha value = " + val);
+    	//txtStatus.setText("Status: changing");
+    }
+	
+    public void onStartTrackingTouch(SeekBar seekBar) {/*txtStatus.setText("Status: Starting to track touch");*/}
+    
+    public void onStopTrackingTouch(SeekBar seekBar) 
+    {
+    	seekBar.setSecondaryProgress(seekBar.getProgress()); // set the shade of the previous value.
+    	
+    	//txtStatus.setText("Status: Ended tracking touch");
+    	frame.removeView(mGLView);
+    	mGLView = new MyGLSurfaceView(this);
+        frame.addView(mGLView);
+    }
+    
+    @Override
+    protected void onPause() 
+    {
+        super.onPause();
+        // The following call pauses the rendering thread.
+        // If your OpenGL application is memory intensive,
+        // you should consider de-allocating objects that
+        // consume significant memory here.
+        mGLView.onPause();
+    }
+    
+    @Override
+    protected void onResume() 
+    {
+        super.onResume();
+        // The following call resumes a paused rendering thread.
+        // If you de-allocated graphic objects for onPause()
+        // this is a good place to re-allocate them.
+        mGLView.onResume();
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) 
+    {
+        getMenuInflater().inflate(R.menu.activity_issmvisual, menu);
+        return true;
+    }
+}
Index: /issm/trunk-jpl/src/mobile/android/ISSM_Visual/src/gov/nasa/jpl/issm/visual/MyGLRenderer.java
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM_Visual/src/gov/nasa/jpl/issm/visual/MyGLRenderer.java	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM_Visual/src/gov/nasa/jpl/issm/visual/MyGLRenderer.java	(revision 14391)
@@ -0,0 +1,294 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package gov.nasa.jpl.issm.visual;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.nio.FloatBuffer;
+
+import javax.microedition.khronos.egl.EGLConfig;
+import javax.microedition.khronos.opengles.GL10;
+
+import android.opengl.GLES20;
+import android.opengl.GLSurfaceView;
+import android.opengl.Matrix;
+
+public class MyGLRenderer implements GLSurfaceView.Renderer 
+{
+	public volatile float mAngle;
+	
+	/**
+	 * Store the model matrix. This matrix is used to move models from object space (where each model can be thought
+	 * of being located at the center of the universe) to world space.
+	 */
+	private float[][] mModelMatrix;
+	
+	/**
+	 * Store the view matrix. This can be thought of as our camera. This matrix transforms world space to eye space;
+	 * it positions things relative to our eye.
+	 */
+	private float[][] mViewMatrix;
+
+	/** Store the projection matrix. This is used to project the scene onto a 2D viewport. */
+	private float[][] mProjectionMatrix;
+
+	/** Allocate storage for the final combined matrix. This will be passed into the shader program. */
+	private float[][] mMVPMatrix;
+
+	/** This will be used to pass in the transformation matrix. */
+	private int mMatrixHandle;
+	
+    private FloatBuffer[] triangleVert;
+    
+    private float[][] triangleData2DArr;
+    
+    private int mPositionHandle;
+    
+    private int mColorHandle;
+    
+	/** How many bytes per float. */
+    private final int mBytesPerFloat = 4;
+
+    /** How many elements per vertex. */
+    private final int mStrideBytes = 7 * mBytesPerFloat;
+
+    /** Offset of the position data. */
+    private final int mPositionOffset = 0;
+
+    /** Size of the position data in elements. */
+    private final int mPositionDataSize = 3;
+
+    /** Offset of the color data. */
+    private final int mColorOffset = 3;
+
+    /** Size of the color data in elements. */
+    private final int mColorDataSize = 4;	
+
+    public MyGLRenderer(float[][] vertices)
+    {	
+    	triangleData2DArr = new float[vertices.length][21];
+    	triangleVert = new FloatBuffer[vertices.length];
+    	
+    	for (int i = 0; i < vertices.length; i++)
+    	{
+    		for (int j = 0; j < 21; j++)
+    			triangleData2DArr[i][j] = vertices[i][j]; 
+    	}
+	    		
+	    // initialize vertex byte buffer for shape coordinates
+    	for (int i = 0; i < vertices.length; i++)
+    	{
+    		triangleVert[i] = ByteBuffer.allocateDirect(triangleData2DArr[i].length * mBytesPerFloat)
+    													.order(ByteOrder.nativeOrder()).asFloatBuffer();
+    		triangleVert[i].put(triangleData2DArr[i]).position(0);
+    	}
+    }
+    
+    public void onSurfaceCreated(GL10 unused, EGLConfig config) 
+    {
+        // Set the background frame color
+        GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
+        
+		// Position the eye behind the origin.
+		final float eyeX = 0.0f;
+		final float eyeY = 0.0f;
+		final float eyeZ = 1.5f;
+
+		// We are looking toward the distance
+		final float lookX = 0.0f;
+		final float lookY = 0.0f;
+		final float lookZ = -5.0f;
+
+		// Set our up vector. This is where our head would be pointing were we holding the camera.
+		final float upX = 0.0f;
+		final float upY = 1.0f;
+		final float upZ = 0.0f;
+
+		// Set the view matrix. This matrix can be said to represent the camera position.
+		// NOTE: In OpenGL 1, a ModelView matrix is used, which is a combination of a model and
+		// view matrix. In OpenGL 2, we can keep track of these matrices separately if we choose.
+		mViewMatrix = new float[triangleVert.length][16];
+		
+		for (int i = 0; i < triangleVert.length; i++)
+			Matrix.setLookAtM(mViewMatrix[i], 0, eyeX, eyeY, eyeZ, lookX, lookY, lookZ, upX, upY, upZ);
+        
+		final String vertexShader =
+				"uniform mat4 u_MVPMatrix;      \n"		// A constant representing the combined model/view/projection matrix.
+			  + "attribute vec4 a_Position;     \n"		// Per-vertex position information we will pass in.
+			  + "attribute vec4 a_Color;        \n"		// Per-vertex color information we will pass in.			  
+			  + "varying vec4 v_Color;          \n"		// This will be passed into the fragment shader.
+			  + "void main()                    \n"		// The entry point for our vertex shader.
+			  + "{                              \n"
+			  + "   v_Color = a_Color;          \n"		// Pass the color through to the fragment shader. 
+			  											// It will be interpolated across the triangle.
+			  + "   gl_Position = u_MVPMatrix   \n" 	// gl_Position is a special variable used to store the final position.
+			  + "               * a_Position;   \n"     // Multiply the vertex by the matrix to get the final point in 			                                            			 
+			  + "}                              \n";    // normalized screen coordinates.
+
+			final String fragmentShader =
+				"precision mediump float;       \n"		// Set the default precision to medium. We don't need as high of a											// precision in the fragment shader.				
+			  + "varying vec4 v_Color;          \n"		// This is the color from the vertex shader interpolated across the 
+			  											// triangle per fragment.			  
+			  + "void main()                    \n"		// The entry point for our fragment shader.
+			  + "{                              \n"
+			  + "   gl_FragColor = v_Color;     \n"		// Pass the color directly through the pipeline.		  
+			  + "}                              \n";												
+
+    	   
+        int vertexShaderHandle = GLES20.glCreateShader(GLES20.GL_VERTEX_SHADER);
+		// Pass in the shader source.
+		GLES20.glShaderSource(vertexShaderHandle, vertexShader);
+
+		// Compile the shader.
+		GLES20.glCompileShader(vertexShaderHandle);
+
+		// Get the compilation status.
+		final int[] compileStatus1 = new int[1];
+		GLES20.glGetShaderiv(vertexShaderHandle, GLES20.GL_COMPILE_STATUS, compileStatus1, 0);
+
+		// If the compilation failed, delete the shader.
+		if (compileStatus1[0] == 0) 
+		{				
+			GLES20.glDeleteShader(vertexShaderHandle);
+			vertexShaderHandle = 0;
+		}
+		
+         
+    	int fragmentShaderHandle = GLES20.glCreateShader(GLES20.GL_FRAGMENT_SHADER);
+		// Pass in the shader source.
+		GLES20.glShaderSource(fragmentShaderHandle, fragmentShader);
+
+		// Compile the shader.
+		GLES20.glCompileShader(fragmentShaderHandle);
+
+		// Get the compilation status.
+		final int[] compileStatus2 = new int[1];
+		GLES20.glGetShaderiv(fragmentShaderHandle, GLES20.GL_COMPILE_STATUS, compileStatus2, 0);
+
+		// If the compilation failed, delete the shader.
+		if (compileStatus2[0] == 0) 
+		{				
+			GLES20.glDeleteShader(fragmentShaderHandle);
+			fragmentShaderHandle = 0;
+		}
+
+        
+        int mProgram = GLES20.glCreateProgram();
+		// Bind the vertex shader to the program.
+		GLES20.glAttachShader(mProgram, vertexShaderHandle);			
+
+		// Bind the fragment shader to the program.
+		GLES20.glAttachShader(mProgram, fragmentShaderHandle);
+
+		// Bind attributes
+		GLES20.glBindAttribLocation(mProgram, 0, "a_Position");
+		GLES20.glBindAttribLocation(mProgram, 1, "a_Color");
+
+		// Link the two shaders together into a program.
+		GLES20.glLinkProgram(mProgram);
+
+		// Get the link status.
+		final int[] linkStatus = new int[1];
+		GLES20.glGetProgramiv(mProgram, GLES20.GL_LINK_STATUS, linkStatus, 0);
+
+		// If the link failed, delete the program.
+		if (linkStatus[0] == 0) 
+		{				
+			GLES20.glDeleteProgram(mProgram);
+			mProgram = 0;
+		}
+		
+		for (int i = 0; i < triangleVert.length; i++)
+		{
+			mMatrixHandle = GLES20.glGetUniformLocation(mProgram, "u_MVPMatrix");        
+	        mPositionHandle = GLES20.glGetAttribLocation(mProgram, "a_Position");
+	        mColorHandle = GLES20.glGetAttribLocation(mProgram, "a_Color");
+		}
+        
+        // Add program to OpenGL environment
+        GLES20.glUseProgram(mProgram);
+    }
+    
+    public void onSurfaceChanged(GL10 unused, int width, int height) 
+    {
+        // Adjust the viewport based on geometry changes,
+        // such as screen rotation
+        GLES20.glViewport(0, 0, width, height);
+        
+		// Create a new perspective projection matrix. The height will stay the same
+		// while the width will vary as per aspect ratio.
+		final float ratio = (float) width / height;
+		
+		mProjectionMatrix = new float[triangleVert.length][16];
+		for (int i = 0; i < triangleVert.length; i++)
+			Matrix.frustumM(mProjectionMatrix[i], 0, -ratio*1.4f, ratio*1.4f, -1.4f, 1.4f, 1.4f, 14f);
+    }
+    
+    public void onDrawFrame(GL10 glUnused) 
+    {
+    	// Draw background color
+    	GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);
+    	
+    	mModelMatrix = new float[triangleVert.length][16];
+        // Draw the triangle facing straight on.
+    	for (int i = 0; i < triangleVert.length; i++)
+    		Matrix.setIdentityM(mModelMatrix[i], 0);
+    		
+    	mMVPMatrix = new float[triangleVert.length][16];
+    	draw(triangleVert); 
+
+    }
+
+    private void draw(final FloatBuffer[] aTriangleBuffer)
+    {
+    	for (int i = 0; i < aTriangleBuffer.length; i++)
+    	{
+	        // Pass in the position information
+	        aTriangleBuffer[i].position(mPositionOffset);
+	        GLES20.glVertexAttribPointer(mPositionHandle, mPositionDataSize, GLES20.GL_FLOAT, false,
+	                				     mStrideBytes, aTriangleBuffer[i]);
+	        
+	        GLES20.glEnableVertexAttribArray(mPositionHandle);
+	     
+	        
+	        // Pass in the color information
+	        aTriangleBuffer[i].position(mColorOffset);
+	        GLES20.glVertexAttribPointer(mColorHandle, mColorDataSize, GLES20.GL_FLOAT, false,
+	                					 mStrideBytes, aTriangleBuffer[i]);
+	        
+	        GLES20.glEnableVertexAttribArray(mColorHandle);
+	        
+	        Matrix.setRotateM(mModelMatrix[i], 0, mAngle, 0, 0, -1.0f);
+
+			// This multiplies the view matrix by the model matrix, and stores the result in the MVP matrix
+	        // (which currently contains model * view).
+	        Matrix.multiplyMM(mMVPMatrix[i], 0, mViewMatrix[i], 0, mModelMatrix[i], 0);
+	        
+	        // This multiplies the modelview matrix by the projection matrix, and stores the result in the MVP matrix
+	        // (which now contains model * view * projection).
+	        Matrix.multiplyMM(mMVPMatrix[i], 0, mProjectionMatrix[i], 0, mMVPMatrix[i], 0);
+	        
+	        GLES20.glUniformMatrix4fv(mMatrixHandle, 1, false, mMVPMatrix[i], 0);
+	        
+	        // Draw the triangle
+	        GLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, 3);
+	        
+	        // Disable vertex array
+	        GLES20.glDisableVertexAttribArray(mPositionHandle);
+    	}
+    }
+
+}
Index: /issm/trunk-jpl/src/mobile/android/ISSM_Visual/src/gov/nasa/jpl/issm/visual/MyGLSurfaceView.java
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM_Visual/src/gov/nasa/jpl/issm/visual/MyGLSurfaceView.java	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM_Visual/src/gov/nasa/jpl/issm/visual/MyGLSurfaceView.java	(revision 14391)
@@ -0,0 +1,82 @@
+package gov.nasa.jpl.issm.visual;
+
+import android.content.Context;
+import android.opengl.GLSurfaceView;
+import android.view.MotionEvent;
+
+
+class MyGLSurfaceView extends GLSurfaceView 
+{
+	private MyGLRenderer mRend;
+    public MyGLSurfaceView(Context context) 
+    {
+        super(context);
+
+        // Create an OpenGL ES 2.0 context.
+        setEGLContextClientVersion(2);
+        
+        final int NMAX_TRIANGLES = 2000;
+        final int MAX_VERTICES = 21;
+        
+        float f[][] = new float[NMAX_TRIANGLES][MAX_VERTICES];
+        int n, random;
+		for (int i = 0; i < f.length; i++)
+		{
+			for (int j = 0; j < MAX_VERTICES; j++)
+			{
+				if (j == 6 || j == 13 || j == 20) continue;
+				n = 1;
+		        random = (int)(Math.floor((Math.random()*10)+1));
+		        if (random <= 5) n = -1;
+		        
+				f[i][j] = (float)(Math.random()*n);
+			}
+		}
+
+        mRend = new MyGLRenderer(f);
+        
+        // Set the Renderer for drawing on the GLSurfaceView
+        setRenderer(mRend);
+
+        // Render the view only when there is a change in the drawing data
+        setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);
+    }
+    
+    private final float TOUCH_SCALE_FACTOR = 180.0f / 320;
+    private float mPreviousX;
+    
+    private float mPreviousY;
+    @Override
+    public boolean onTouchEvent(MotionEvent e) {
+        // MotionEvent reports input details from the touch screen
+        // and other input controls. In this case, you are only
+        // interested in events where the touch position changed.
+
+        float x = e.getX();
+        float y = e.getY();
+
+        switch (e.getAction()) {
+            case MotionEvent.ACTION_MOVE:
+
+                float dx = x - mPreviousX;
+                float dy = y - mPreviousY;
+
+                // reverse direction of rotation above the mid-line
+                if (y > getHeight() / 2) {
+                  dx = dx * -1 ;
+                }
+
+                // reverse direction of rotation to left of the mid-line
+                if (x < getWidth() / 2) {
+                  dy = dy * -1 ;
+                }
+
+                mRend.mAngle += (dx + dy) * TOUCH_SCALE_FACTOR;  // = 180.0f / 320
+                requestRender();
+        }
+
+        mPreviousX = x;
+        mPreviousY = y;
+        return true;
+    }
+}
Index: /issm/trunk-jpl/src/mobile/android/ISSM_Visual/src/gov/nasa/jpl/issm/visual/colormap/colormap.c
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM_Visual/src/gov/nasa/jpl/issm/visual/colormap/colormap.c	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM_Visual/src/gov/nasa/jpl/issm/visual/colormap/colormap.c	(revision 14391)
@@ -0,0 +1,83 @@
+int nrows=64;
+double hsv[nrows,3]={
+1.0000         0         0
+    1.0000    0.0938         0
+    1.0000    0.1875         0
+    1.0000    0.2812         0
+    1.0000    0.3750         0
+    1.0000    0.4688         0
+    1.0000    0.5625         0
+    1.0000    0.6562         0
+    1.0000    0.7500         0
+    1.0000    0.8438         0
+    1.0000    0.9375         0
+    0.9688    1.0000         0
+    0.8750    1.0000         0
+    0.7812    1.0000         0
+    0.6875    1.0000         0
+    0.5938    1.0000         0
+    0.5000    1.0000         0
+    0.4062    1.0000         0
+    0.3125    1.0000         0
+    0.2188    1.0000         0
+    0.1250    1.0000         0
+    0.0312    1.0000         0
+         0    1.0000    0.0625
+         0    1.0000    0.1562
+         0    1.0000    0.2500
+         0    1.0000    0.3438
+         0    1.0000    0.4375
+         0    1.0000    0.5312
+         0    1.0000    0.6250
+         0    1.0000    0.7188
+         0    1.0000    0.8125
+         0    1.0000    0.9062
+         0    1.0000    1.0000
+         0    0.9062    1.0000
+         0    0.8125    1.0000
+         0    0.7188    1.0000
+         0    0.6250    1.0000
+         0    0.5312    1.0000
+         0    0.4375    1.0000
+         0    0.3438    1.0000
+         0    0.2500    1.0000
+         0    0.1562    1.0000
+         0    0.0625    1.0000
+    0.0312         0    1.0000
+    0.1250         0    1.0000
+    0.2188         0    1.0000
+    0.3125         0    1.0000
+    0.4062         0    1.0000
+    0.5000         0    1.0000
+    0.5938         0    1.0000
+    0.6875         0    1.0000
+    0.7812         0    1.0000
+    0.8750         0    1.0000
+    0.9688         0    1.0000
+    1.0000         0    0.9375
+    1.0000         0    0.8438
+    1.0000         0    0.7500
+    1.0000         0    0.6562
+    1.0000         0    0.5625
+    1.0000         0    0.4688
+    1.0000         0    0.3750
+    1.0000         0    0.2812
+    1.0000         0    0.1875
+    1.0000         0    0.0938
+}
+
+
+
+value v=5*10^-5; // (m/s)
+value vmin,vmax;
+
+
+
+double alpha=(vmax-alpha)/(vmax-vmin);
+int i=(int)(alpha*nrows);
+
+double r,g,b;
+
+r=hsv[i,1];
+g=hsv[i,2];
+b=hsv[i,3];
Index: /issm/trunk-jpl/src/mobile/android/ISSM_Visual/src/gov/nasa/jpl/issm/visual/colormap/list_of_colormaps
===================================================================
--- /issm/trunk-jpl/src/mobile/android/ISSM_Visual/src/gov/nasa/jpl/issm/visual/colormap/list_of_colormaps	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/ISSM_Visual/src/gov/nasa/jpl/issm/visual/colormap/list_of_colormaps	(revision 14391)
@@ -0,0 +1,23 @@
+hsv        - Hue-saturation-value color map.
+hot        - Black-red-yellow-white color map.
+gray       - Linear gray-scale color map.
+bone       - Gray-scale with tinge of blue color map.
+copper     - Linear copper-tone color map.
+pink       - Pastel shades of pink color map.
+white      - All white color map.
+flag       - Alternating red, white, blue, and black color map.
+lines      - Color map with the line colors.
+colorcube  - Enhanced color-cube color map.
+vga        - Windows colormap for 16 colors.
+jet        - Variant of HSV.
+prism      - Prism color map.
+cool       - Shades of cyan and magenta color map.
+autumn     - Shades of red and yellow color map.
+spring     - Shades of magenta and yellow color map.
+winter     - Shades of blue and green color map.
+summer  
+
+
+
+a=colormap('hsv');
+a
Index: /issm/trunk-jpl/src/mobile/android/Makefile.am
===================================================================
--- /issm/trunk-jpl/src/mobile/android/Makefile.am	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/Makefile.am	(revision 14391)
@@ -0,0 +1,2 @@
+EXTRA_DIST =  Makefile.am issm-android-inputfiles
+SUBDIRS = ISSM
Index: /issm/trunk-jpl/src/mobile/android/issm-android-inputfiles/test102.petsc
===================================================================
--- /issm/trunk-jpl/src/mobile/android/issm-android-inputfiles/test102.petsc	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/issm-android-inputfiles/test102.petsc	(revision 14391)
@@ -0,0 +1,17 @@
+%Petsc options file: test102.petsc written from Matlab solver array
+
++NoneAnalysis
+-mat_type mpiaij
+-ksp_type preonly
+-pc_type lu
+-pc_factor_mat_solver_package mumps
+-mat_mumps_icntl_14 120
+-pc_factor_shift_positive_definite true
+
++DiagnosticVertAnalysis
+-mat_type mpiaij
+-ksp_type preonly
+-pc_type lu
+-pc_factor_mat_solver_package mumps
+-mat_mumps_icntl_14 120
+-pc_factor_shift_positive_definite true
Index: /issm/trunk-jpl/src/mobile/android/issm-android-inputfiles/test102.sh
===================================================================
--- /issm/trunk-jpl/src/mobile/android/issm-android-inputfiles/test102.sh	(revision 14391)
+++ /issm/trunk-jpl/src/mobile/android/issm-android-inputfiles/test102.sh	(revision 14391)
@@ -0,0 +1,2 @@
+#!/bin/sh
+/Users/larour/issm-uci/trunk-jpl/bin/issm.exe DiagnosticSolution /Users/larour/issm-uci/trunk-jpl/src/android/test102 test102 
