Saturday, September 25, 2010

Back to my old blog

My new blog is now the old blog I used to use when I first started to develop CSDT stuff. I just realized that it still exists--probably better that I continue it. I'm sticking to scheduling every hour of my day in advance, and this seems to be a pretty good way to ensure that I get work done.

Right now I've started by creating a null event, PEventNull, and supporting infrastructure so that orphaned statements may be drawn in the overlay window. I've also updated the XML schema and PObject to allow PEventNull to be introduced.

I've created a new base class for iteration-type statements called JPnlLineControl, which will also be used for all children-bearing statements. The conditional statement will also use this same base class. Fixes to any bugs in control class will naturally propagate to these derived classes. Coming up with an exact division of functionality that makes sense will be non-obvious, but tricky.

Friday, September 5, 2008

Scripts and their representantion - data and view

While working on the implementation of saving/loading I ran into one difficulty that is not allowing me to save the user-generated code. In short, what we call the user-generated code, or the object’s “script,” or in our software “the board,” is currently implemented as a collection of graphic components generated by Netbeans. The “script,” at this point, is not an object itself with data that can be separated from its visual appearance. Appearance and data are the same. For this reason, saving the code means, at this point, saving the collection of graphic components.


However, the original design of some of these graphic components (WhileElsePanel, IfElsePanel, MethodPanel, and so on) used a layout manager (GroupLayout) that can not be saved (it is not serializable), making the graphic component not serializable.


I am considering two alternatives to overcome this. One, is to make serializable all the layouts of the graphic components that constitute “the script.” The advantage of this approach is that the rest of the code Hilmi wrote will not be affected. The disadvantage is that GUI and the data will continue to be extremely integrated, making difficult to change the visual appearance of the code without changing the way it is interpreted and how it is saved, and changing the visual appearance is something that Ron wants to do.


The second alternative is to separate data and visual appearance. It requires the creation of a class CODE or SCRIPT, which is independent of any way to represent it visually, and it contains all the data to create or recreate the script. It also requires the interpreter to use this class, rather than the corresponding graphical components as it is currently done. The advantage of this is that the script can be visually represented in different ways, given that the GUI is separated from the script data. It also makes it easier to save and load every object’s script. The disadvantage is that it will be time consuming.


I want to hear your thoughts about this before deciding what alternative to follow. Maybe any of you see something than I do not. I am also copying this to Hilmi in case he attempted to do something like this in the past, and copying this email to the blog.

Thursday, April 3, 2008


  • Code is under programmableCSDT directory in the repository. Instructions to set up the project for newcomers needs to documented. (this will be slightly different then the "Getting Started to Choreography" documentation)
  • Bug fixed: Variables are cleared at each run.
  • Bug fixed: All objects are reset at each run therefore we don't see previous execution's movements.
  • Bug fixed: X coordinate was not working, it's fixed.
  • Select Mode box is activated. Now, it runs only if 3D Mode is selected.
  • Object Creation panel is moved to the top.
  • Default number of frames per Human object is set to 1. If coder sets a frame that is beyond the size of animation, the in between frames are filled with copies of the last frame. When "Run" button is clicked, the animation runs from the first frame to the last frame of the longest object (longest object is the Humanoid which has the most frames)
  • Slider is added to the animation window.
  • I attempted to label the humanoid objects but put off for a later time.
  • Expression Panel is redesigned to allow more kinds of expressions.
  • All panels are deletable now. While dragging a command, only sections that can be dropped onto are highlighted.
  • Variables are also deletable. If a variable is in use, it shows the panel using that variable and prompts a dialog box stating the problem.
I thought of three ways for defining and using customized methods which are listed below. We can implement one of them once we agree on a design.

Design of Customized Methods
  1. The code space will be a tabbed panel. When a user wants to add a method to a class (e.g. Humanoid), he will choose that class to edit. The list of methods for that class will appear in a new tab.
  • A draggable "method definition" command will appear in the left panel. Number of parameters to the method, names and types of these variables will be set via a dialog box.
  • Local variables (variables valid just in the scope of the method) should be introduced. So each method will have a list of variables. For now, these variables and parameters can only be int, string, or boolean. Passing objects is not possible.
  • Only one object will be active in a custom method. So in the definition of the method, if the user wants to do a method call to a primitive method. (such as setRightKnee) In method call panel, only available object will be "this" object which corresponds to the object that customized method called on.
  • These panels and the main panel can be saved as XML and be loaded at a further time. Manually loading these custom methods each time can be cumbersome for users, so the program can look pre-specified locations for XML files to load previous implementations.
2. Custom methods can be declared in the main panel as well. As in the first design we will have a draggable "Method Creation" command. Definition of the method will be seen as . (e.g. Humanoid.go) since there may be method declarations for other classes as well. Reusability of the methods in this design is worse than the first design.

3. We can create each custom method in a new tab, but that would be too cumbersome and unmanageable if one needs to use many (more than 5) customized methods.

Lastly, we are a bit behind of the schedule we planned. We can set the following goals for the remaining month.
- Implementation of the GUI for defining and using customized methods
- Saving and Loading codes as XML
- Fixing major bugs and cosmetic improvements to the GUI
- Documentation of the project

Wednesday, April 2, 2008

online community, field sites, etc.

Been about 3 weeks since I blogged last, lets see...

  • Continued to work with John Britton about the online community; will be meeting with our Dean next week to discuss hardware support.
  • Continued discussion with Gates foundation folks, looks like we will be included in the teacher training proposed for June.
  • New school included in St Louis.
  • New teachers from African New Era Organization will attend Baltimore presentation (April 25-26).
  • NSF has funded a workshop on cultural diversity in computing; will be attending that (and hopefully recruiting some new collaborators) April 13-15 in Texas.
  • Found some errors in the HTML for the cultural background sections; fixed most.
  • Working with undergrad Garrett Smith on his use of Graffiti Grapher at the Boys and Girls Club. He will try to improve the software as well.
  • Working with undergrad Christina Wiegers on creating a save function for the pyramid tool, and conversion so it can output to the 3D printer.

Friday, March 7, 2008

VBL layer control, Gates Foundation, GG at TBGC

Just tried out the programmable dance tool at http://www.cs.rpi.edu/~yildih2/testpcsdt/pcsdt.html but could not get the basic method (applied to right hip) to work right: X did nothing, Y was X variation, Z was Y. I think Hilmi is right about the preview function: its just as easy to press "run" and see what you have so far. Only problem is getting users to do that. They will be intimidated not seeing a figure there.
This week worked mostly on VBL layer control for Kera's class. Finally got it paired down to a small number of controls. Using an "edit layers"/hide layer control toggle we can further reduce the "busy" look, so that it ends up as simple as it does now.
Also made a presentation of CSDTs to the Gates Foundation here at RPI. Nice folks; who knows when it will actually turn into something but at least we are getting the word out.
Undergrad Garrett Smith is going to try graffiti grapher at Boys and Girl's Club in troy; went over a plan with him.
Also working on a paper reviewing the work so far with native american groups, co-authored with Jim Barta, focused on art. Also finished revision of another on Cartesian Coords in native am society.
John Britton had me try out the new server, lots of web errors however because not all files were UTF-8. He said he corrected them, on my second try I only found one more remaining.
3 speaking offers came in this week: Winston NC, Somerset NJ, Fairbanks Alaska.

Friday, February 22, 2008

wish lists 2-22-08

High Priority Wish list:
Direct assignments (for variables?)

Re-initialize variables (right now it carries values over from last run into the next run )

Ability to delete each panel (right now no ability to clear certain panels)

Delete variable (if you try to delete a variable while still using it in the code it should give you an error message “you can’t delete this variable until you delete the panel that uses it”Delete each panel (right now no ability to clear certain panels)

=============
Medium priority:
Save code

Include the name of the music file in the saved code

Move "object creation" button to top, between "select mode" and "select object," so that the user can see a horizontal sequence corresponding to the sequence of actions they need to take.

==================
Low priority wish list:
Preview – need to ask Tiffany’s group what to display when you “step though” the program. Might be useful to look at Scratch and see how it resolves that issue.

Show frame number under animation (should be option that user can switch on or off)

Show dancer names under animation (should be option that user can switch on or off)

Additional integer math functions (rand, mod, ceiling, floor, etc.)

Float math functions: float var, sine, cos, exponent, log, etc.

=================
Future priority wish list:
Interaction features: (you can code for a button, slider, fill-in, etc. to appear on animation screen, so that rather than just watch a movie the user can interact with the animation).

3D “props” – dance around a mayan pyramid or bonfire, juggle swords, etc.

Build-your-own 3D props—design your own 3D props. We probably want to have a specialized tool—perhaps appearing as an “editing” tab—for creating these. Could also import from other CSDTs and pCSDTs.

Non-humanoid bodies

Build-your-own body

Friday, January 25, 2008

pCSDT Prototype is online

The prototype has been uploaded to http://www.cs.rpi.edu/~yildih2/testpcsdt/pcsdt.html
We used JNLPAppletLauncher to deploy the pCSDT applet to the web. Here is how it is described in its website.

"
The JNLPAppletLauncher is a general purpose JNLP-based applet launcher class for deploying applets that use extension libraries containing native code. It allows applets to use extensions like Java 3D, JOGL, and JOAL very easily, with just a few additional parameters to the applet tag, on Java SE versions as far back as 1.4.2.

Like Java Web Start, the JNLPAppletLauncher uses an extension's .jnlp file to locate the native resources for a given extension. The applet developer only needs to specify the platform-independent .jar files containing the .class files for the extension. The platform-specific "nativelib" .jar files are downloaded automatically from the same server that hosts the extension's Java Web Start binaries.

Extensions that support JNLPAppletLauncher include Java 3D, JOGL, and JOAL."

It seems more convenient to use JNLPAppletLaunched instead of JoglAppletLauncher which was used in Breakdancer applet. So I created a copy of Breakdancer using JNLPAppletLauncher at this URL. That version of applet is a bit enlarged to display the whole body-parts tree.