Wednesday, April 21, 2010

Work Progress - Apr 22 - Apr 29

Web Deployment

Web version of GG app: http://www.rpi.edu/~laut/GG/

The web deployment package now works with JDK version 1.6.0_15 or later. The updated files are available here. The reason why the old deployment files no longer works can be read from here.

From the main menu, click on Create->TimeStepAction to create a spraycan object. It will show up as a square labelled "1" at the top of the render window. To insert action, select the "OnTriggerTimeStep" event for the time being.

From the main menu, click on Create->DrawingModule to create a drawingModule object. It will show up a a square labelled "Module1" at the bottom of the render window. To insert action, select the "OnCall" event for the time being.

To call a drawing module in some part of the script, use the "InvokeModule" codelet available in the TimeStepAction/spraycan object. Give the name of the Module you want to call as the parameter.

You may check my previous entries for some examples.


Sample drawing modules

Sample drawing modules for letter "R", "P" and "I".

Create the following script in a TimeStepAction's OnTimeStepAction() event.

Then start the simulation.



NOTE: One can click on the module's OnCall method to edit the script there.


TODO
  • Incorporate border to the drawing
  • Set "paint on" as default
  • Correct the angle specification - now 90 degree points downwards but we expect it to point upward (But it is related to pointing-downward y-coordinate in Java drawing canva)
  • Abolish those codelets with change-width-on-moving counterparts
  • Method clean-up
  • Find a mechanism to give default parameters to the codelet dragged

Sunday, April 18, 2010

Work Progress - Apr 15 - Apr 22

Able to specify the total width change for a MoveBy/DrawArc action.



In progress: web deployment - http://www.rpi.edu/~laut/GG/

Thursday, April 8, 2010

Work Progress - Apr 7 - Apr 14

Instead of drawing line-by-line, now it is able to draw pixel-by-pixel. So we now have drawing animation.



TODO: change width when drawing the line, set up pre-defined module of drawing alphabets

Tuesday, April 6, 2010

Work Progress - Apr 1 - Apr 6

* Able to draw the line segments one at a time, while the UI remains responsive.



* TODO: May be able to create drawing animation by progressing the line drawing action a little at a time.

Wednesday, March 24, 2010

Work Progress - Mar 24 - Mar 31

* Implement "Drawing module/template", which encapsulates some common drawing logic. Below shows the logic of drawing a square. This is done by editing the OnCall() event of Module1 (a Drawing Module).


* Make Drawing module callable by main Hand object. Below shows the logic of the main Hand object. You can see the "Call Drawing Module codelet" is there after the Hand moves to certain locations (100,100), (200,200).


* Below is the result of the simulation.

Sunday, March 21, 2010

Work Progress - Mar 15 - Mar 23

Graffiti Grapher: Refactoring the original implementation, now able to do basic drawing. (Click to enlarge the screenshots)



Possible Extensions:
  • Creating GraffitiTemplate class, which allows users to edit the drawing logic of some commonly-used complicated shapes (like pentagon) using codelet drag-and-drop and store as some template objects. It can called again and again by TimestepAction object, so users need not repeat the drawing logic to draw shapes of the same kind.
  • Implement repetition for TimestepAction/GraffitiTemplate by fitting in a RepeatTime attribute storing the number of times its action is repeated. Then on simulation and when it is triggered to do something, the actions in the corresponding statement tree is executed for that number of times.
  • Changing how the spray stroke is rendered so it looks closer to what is really happening in reality.
  • Try occlusion between the spray can and the wall

Wednesday, March 3, 2010

Work Progress - Mar 1 - Mar 14

Update pCSDT.Presentation.Graphics2D to support
  • Periodic update of PObjects in the simulation canvas without flickers (Demo: Run GG application, create a SprayCan object, adjust its position - you can see it move to a new position without leaving trace at its previous position.

To do:
  • Complete migrating drawing action code from the GG Engine to SprayCan PObject.
  • Change the paradigm of drawing: The drawing actions should change the pixel colors of a Wall PObject, which has a BufferedImage representing the drawing result so far. The Wall renders itself when the simulation runs.
  • Visualize the sequential applications of multiple SprayCans: The difficulty is that the actions of different SprayCans are specified in different statement trees, but not a single tree.
  • Abandon the custom command parsing system in existing GG and move it to the one implemented in the core: The challenge is how we can visually build the repeat...end in the statement tree by codelet drag-and-drop.