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.