Wednesday, June 15, 2011

Work completed 06/09 - 06/15

1.  Beginning work on Buckyballs creation.  Need to discuss how this should be used as an instructional tool for the students.  Do we want to use it in a way similar to the way we use the Wigwam applet - where students build a design using the applet and then use the coordinates it creates to build an actual model using styrofoam and bendy wire?  I'm not sure how this would work when constructing a buckyball.  Would we be ok to simply extend this approach so that the student's model consists of bendy wire bi-sected by a styrofoam plane?  Is there a better approach?  If so, what ramifications does this have for the applet creating buckyballs?  If we come up with a separate approach, our decision on approach will imply taking one of the following approaches - 1. incorporating the code into the existing wigwam applet code, 2.  a different applet (but based on the code for wigwam) or 3.  a different applet, developed completely independently of wigwam logic.  Thoughts on this?

2.  Also, started looking into execution issues on netbooks.  Currently I possess two netbooks from the last workshop - one on which the Wigwam applet works correctly and the other on which it does not.  The hope is to isolate the difference between them that's causing the problem.  Hopefully, will determine the cause of this in the next couple days.

3.  Determined source of issues related to installation of Wigwam project on local workstation that prevented execution of code within NetBeans on local workstation.  Summarized issues on post for 06/13.  Documented detailed steps for future developers who may work on this project to lower future startup costs.  Contents of README.txt (located in WigwamV2 folder of project is as follows):

****************************README.txt********************************************

-------------------------
Wigwam Project Configuration
-------------------------

Overview

The Wigwam project source code makes heavy use of the Java OpenGL (JOGL) libraries for graphics support.  These libraries will need to be installed properly on any workstation where development for the Wigwam project is to occur.  Configuration instructions are below.  The official site for downloading the JOGL libraries can be found by going to http://schabby.de/jogl-download/.  However, all of the JOGL binaries for supporting the Wigwam project can be found on the svn server in a zip file called libs.zip on the csdt svn server.  This is the recommended location for downloading since this guarantees proper versioning compatibility with the source code of the Wigwam project.

Configuration instructions

I.  Install JOGL support libraries

1.  Download the libs.zip from the csdt svn server.  It's in the parent directory, a sibling of the other csdt projects on the csdt svn server.
2.  Unzip the file and install the files in the jogl directory to a directory on the local workstation.  For example, install them in c:\java\jogl\lib.  The files selected should include the following:

jogl.jar
gluegen-rt.jar
jogl.dll
jogl_cg.dll
jogl_awt.dll
gluegen-rt.dll
libjogl.jnilib
libgluegen-rt.jnilib
libjogl_cg.jnilib
libjogl_awt.jnilib

The jar files are contain compiled java source code modules, .class files.  The .dll files are libraries for calling graphics routines native to the operating system platform.  The .jnilib files contain functions that resolve calls in the .class files and the routines in the .dll files.

3.  Add the directory from step 2 to the PATH environment variable (on Windows), or the corresponding environment variable if on a UNIX system.  This environment variable will allow the operating system to find the .dlls listed above whose routines are called by the JVM at runtime.

II.  Install the Wigwam project.

1.  Download the Wigwam project from the csdt svn server.
2.  Open the project in NetBeans by navigating to the ..\VirtualWigwam\WigwamV2 directory in the Open Project dialog.
3.  Once the project is open, reset the JOGL library to reference to the local installation of the jogl.jar file, (installed in part I above).  This file should have been in the the libs.zip.
4.  Reset the GLUEGEN-RT libary to reference the gluegen-rt.jar installed locally from libs.zip.
6.  Right click on the project in the project explorer window and select properties.  In the project properties window, under the WebStart node, set the AppletDescriptor/Applet Class to wigwam.WigwamApplet, (NOT wigwam.Wigwam).
7.  In the project properties window, click on the Applet parameters button.  Set the width and height dimensions to 900.

"Gotchas" that can cost a lot of time configuring this project

1.  There are other versions of jogl on the internet.  These don't necessarily work with the current version of the Wigwam applet.  For example, there is a package at http://csis.pace.edu/~marchese/CG/JOGL/Jogl1l.htm.    Don't be lured into downloading the jogl deployment package at this site - it won't help because of incompatibility with the Wigwam project and will only lead to trouble.  Such packages may have a different interface but some commonality, (just to further confuse things) from the version required by the Wigwam applet.

2.  In order to prevent confusion, make sure only one version of JOGL is installed on the local workstation.  Multiple installations can cause havoc with the PATH environment variable since Windows will search through the path only until it finds a dll with a matching name.  If there are multiple such files with the same name, the directory to the wrong one may be listed first in the PATH variable, and trouble will ensue.

3.  Make sure the Applet class is wigwam.WigwamApplet, not wigwam.Wigwam.  Both of these classes extend JApplet, and thus, constitute applets.  However, in order for this project to render correctly in the browser, the applet class needs to be WigwamApplet.

III.  Test the applet.

1.  Compile the project. (Shift-F11 in NetBeans.)
2.  In the Files explorer window, navigate to dist/launch.html, right click, and select launch.html from the pop-up menu.  This will fire up the default browser and the applet should be rendered from the local workstation.
3.  Also, as an alternative, the applet can be kicked off in the applet viewer by right clicking on the WigwamApplet.java class in the project explorer window and selecting Run File.

**********************End README.txt**********************************************

No comments:

Post a Comment