Wednesday, December 31, 2008

Bye 2008, Hi 2009

29 December 2008

I tested the toggle feature(mouse version) in Cocoa as soon as I reached the office. However it does not work as the Cocoa application doesn't read the mouse position from the Quartz Composition. Ming Hong said that perhaps mouse events are needed to be passed over to the Cocoa application. After much consideration, I decided to just work with the OSC version because the last time when I tested the 4PP(OSC version) on Cocoa, it was working.

After lunch, I ran the Cocoa application on the Mac Pro. However, the Cocoa application was unable to build. So I wasn't able to test it. I then decided to move on to the next feature, idle and remove. I used the stop watch patch as the timer. The idea for this function is when the laser is off the object, it will be in an idling state. After 30 seconds, the object will be removed from the screen.

I worked on this function and managed to finish it at the end of the day. I guess I'll do the testing tomorrow when I get back to the office.


30 December 2008

As soon as I got to the office, I integrated the idle/remove function with Ryan for testing. The integration took up most of the morning and when I finally tested, the function was working well. However, it interfered with Ryan's trashing/removing function.

After lunch, I went through the patches with Ryan and we managed to solve the problem. After a second round of testing, we found another problem. The thrashing/removing function only hides the object from view, not removing it. So the rest of the day was spent googling on how to remove the object.


31 December 2008

It's a half day today as it is the last day of 2008. I spent the day researching on how to remove the object. However, I wasn't able to find any helpful information. I guess I got to think of another idea on how to prevent the object from getting selected after it is removed from the screen.


1 January 2009

HAPPY NEW YEAR!


2 January 2009

First day back at work for the year 2009! Kevin and Bernard is also back from their leave.

We updated Kevin with our progress then headed back to do our own stuff. I brainstormed on how to prevent the object from being selected after it is removed from the screen before going for lunch.

After lunch, I started to implement my idea on how to prevent the object from being selected after removal from screen and tested it. It was working fine. We then stop our work for a moment to discuss about how we were going to do the integration. However, Leonard's and You Hock's feature only near completion. So Ryan and I went to help Leonard and You Hock on their feature for the rest of the day.


Reflection for the week:

Moving onto a new year, the things I've done here at IHPC is still the same. However, the things I've learnt here at IHPC is just priceless. For example on the last day of 2008, besides the research done, I've also learnt about hardware interfaces and how it affects the performance of the computer.

Quoted from Harold, "What differentiates good programmers and programmers is their knowledge of hardware." This sentence made an impact on me as my knowledge for hardware isn't strong. I guess I'll start reading up about the different types of hardware and their functions.

Tuesday, December 23, 2008

Christmas Week

22 December 2008

It's either the Monday blues or it's the holiday season that made me feel rather lazy when I reached the 'working space'. Still, I managed to kick-start my engine and started working on the feature which I am assigned to - to toggle the application on/off.

I needed to get some help from Ming Hong as his 'Drawing Board' application is similar to ours. However, I found out that Ming Hong wouldn't be back till tomorrow. I guess I'll try to figure it out how he manages to toggle his application and ask him tomorrow.

I fiddled with Lightdraw and Ming Hong's application, I realized that Lightdraw was actually using X11 and when the application launches it uses OSC. I tried to figure out how he manages to change Lightdraw's mode to OSC when his application launches. You Hock then told me that one method was to use the application to set Lightdraw's mode to X11 first before launching.

After lunch, I went to help Ryan on his feature for the rest of the day.


23 December 2008

I asked Ming Hong about how his toggling logic work and he told me that his application was built on Lightdraw, using its memory. Therefore, there wasn't any mode switching. After asking, I went on to work on toggling the overlay. In the process of doing, I've also taught the rest how to store a variable by using the Maths patch as Quartz Composer itself was running on a while loop, which makes it almost impossible to store a variable.

Not too long after, I managed to complete my toggling feature and Ming Hong came in and taught us a little about 3D graphics before going for lunch.

After lunch, I tested my feature on the big screen with X11, which was working fine. I tried testing it with OSC and found out that the OSC receiver patch wasn't working as well as the coordinates for the laser could not be read. After debugging with Ryan, we realized that we forgot to copy 1 patch. Before we finished our day, we tested our applications and are pleased to say that it was working fine.


24 December 2008

It's Christmas eve and we are here for half a day. I tried to integrate my application in Cocoa, but it could not be loaded. So I re-did the Cocoa application for the overlay which took up the rest of the half day. I guess I'll test the Cocoa application on Monday when we get back. At around 11.15am, we went to the pantry for a mini-celebration before leaving. It's going to be a long weekend!(Yay)


25 December 2008

Merry Christmas!


26 December 2008

We were given a day off by Kevin!(Woots)


Reflection for the week:

It has been a very short week for me. Luckily, I managed to finish the toggling feature(I will feel bad if I didn't). I had also learnt a little about 3D graphics, which is pretty interesting.

Thursday, December 18, 2008

Overlay in QC/Cocoa

15 December 2008

We did our dry runs when we got to the office. Kevin arrived at 11.30am and we discussed about the "Drawing Board" application before we presented to him. Kevin gave us comments on our presentations and a few more tips before going for lunch.

After lunch, we collected the stuff from SIGGRAPH Asia 2008 from Kevin's desk and brought it back to our "working space". After bringing back the stuff, I studied the Overlay example to see how the overlaying is done in Quartz Composer for the rest of the day.


16 December 2008

It's a rainy day today, which made most of us pretty sleepy. We started the day by having breakfast in the pantry, where we met Kevin and his parents. After breakfast, we went back to our "working space" to continue researching on the overlay. Before lunch, we had a short discussion with Kevin regarding what we would be doing on Friday. It was decided that Ryan, Leonard and You Hock would be presenting to the kids while I toggle between the applications.

After lunch, Ming Hong got a call that the Lightdraw at Fusionworld had some problems. So we went there to get it fixed. After troubleshooting, we realized that the projector's setting was changed. Ming Hong adjusted the projector's setting and the application was working fine.

Went back to our "working space" to continue researching on the overlay. After much research, the overlay is actually done by making the application's window transparent. At the end of the day, I managed to find the codes to make the window look transparent in Cocoa. Shall implement the codes tomorrow.


17 December 2008

Reached the office as usual and continued with the overlay. We managed to make the application's window background to be semi-transparent and set it to full screen upon running before lunch. This was done with the help of this website.

After lunch, I tested the application to see if I could load a OSC-based Quartz Composer application in Cocoa with my 'CaterpillarOSC' application. However, it isn't working as expected. So I did some research and found out that I may require an OSC framework plugin to be added to the Cocoa application. Found the plugin from this website and downloaded it.

I tested the application again by loading another OSC-based Quartz Composer application, '4 Player Pong', in Cocoa to test it. This time it worked. However, the positioning of the application is off. So I guess we have to revise the positioning of the application.

At the end of the day, we were able to make the 'Overlay' application to be on top of all the applications by specify the window’s level to NSScreenSaverWindowLevel. We were also able to set the position for the Quartz Composer application in Cocoa by setting some properties in Cocoa.

On a side note, I've changed my wallpaper and the dock's position. Here's a picture of my new wallpaper and the overlay running on it:




18 December 2008

We planned for the 'Whiteboard' application when we arrived and here are our assigned tasks - Leonard is in-charge of the palette design, Ryan is in-charge of dragging the image, thrashing, idling and removing of image, You Hock is in-charge of integrating the application with OSC, the drawing and erasing while I am in-charge of toggling the application/overlay on and off. However, Leonard and I would help both Ryan and You Hock once we are done with our parts.

After the planning, we went ahead to do with our individual task(s). I brainstormed for ways for toggling the application and managed to come up with 2 ways before lunch. First way is by using Apple's hot spots, but we have to toggle 'Lightdraw' to X11 mode in order to make use of the hot spots. The second way is to assign a small space in the corner of the screen to just toggle the overlay. I guess I'll have to wait for Ming Hong to be back so that I could get a brief idea on how he toggle his 'Drawing' application.

After lunch, we experimented with out of body experience. However, we did not get the expected result. So we googled for some experiments and learnt more about the out of body experiences. Here's a video on one of the experiments:



A short while later, Kevin came in and informed us that all of us needed to present tomorrow instead of the initial 3 person. So we spent the rest of the day doing dry runs of the presentation and set up the applications needed for the demo.


19 December 2008

It's Friday and IHPC has a Project Reachout 'Back-To-School Celebration' with Beyond Social Services. Kevin came in early to pass us our name tags and taught us how we should present to them. We also received the schedule for the day, the first demo is starting at 10.15am. This timing was earlier than expected because the past demo are mostly after lunch. Luckily we did our dry runs for the presentation yesterday.


The kids reached around 10am and were seated in the Visualization Chamber Hall.


We demo-ed from 10.15am to 12.15pm(Kevin did most of the talking) and helped the kids with their crossword puzzle before going to the pantry for lunch. IHPC ordered McDonalds and it was delivered in a huge box. It's my first time seeing McDonald's Delivery delivering in boxes.




After lunch, we helped to transport the gifts for the kids down to the seminar room in level 15 and arranged them. We ushered the kids to the seminar room and the staff began distributing the gifts to the kids before watching the movie 'Surf's Up'.


We headed back to our lab because we wanted to rest. After the movie, the kids came back down to the Visualization Chamber Hall to take a group photo before heading to the pantry for tea-break. And this was how we spent the day.


Reflection for the week:

This week has been a rather fruitful week for me. I've learnt how to adjust the windows properties in Cocoa and even did an overlay in Quartz Composer. However, what left a better impression on me was what we did on Friday.

Unlike in secondary school, which community service was a compulsory thing, we hardly get to do community service work in Polytechnic. Luckily for me, I've done some community work through my 3 years in Polytechnic. This would be the first local community work as the community work I've done so far in my Polytechnic are overseas. One of the volunteers told us that we were very lucky to help out as this was a 'once-in-a-year thing'. I guess we are. We were also able to make use of this chance to work on our presentation skills by practicing and trying to pick up more tips from Kevin.

Friday, December 12, 2008

SIGGRAPH Asia 2008 Week

8 December 2008

No work today as it's a public holiday. Selamat Hari Raya Haji!


9 December 2008

Met up with Kevin after breakfast to discuss about our plans for this week as Kevin, Ming Hong and Bernard would be busy with SIGGRAPH Asia 2008. We would be working on our presentation slides as well as brainstorm for our new application. Leonard and You Hock would be learning Quartz Composer too.

After the planning, we received the installation disc for iWork and Microsoft Office for Mac so that we could work on our presentation slides. After the installation, we went over to try out the Smartboard to get inspiration for our new application. Here's a picture of what we drew on the Smartboard before going for lunch:


After lunch, we watched videos on Steve Jobs on iTunes because Leonard did not watch it with us the last time. We were told to take note especially on how Steve Jobs present. Here's on of the video we watched:



Passed my Quartz Composer notes to Leonard after watching the video so that he could start picking up Quartz Composer as soon as possible. We then brainstormed for our new application for the rest of the day. Will share what we had brainstormed on our new application to Kevin next week after SIGGRAPH Asia 2008.


10 December 2008

We worked on our presentation slides for the entire day. I decided to use Keynote instead of Microsoft Powerpoint because:

  1. I wanted to try out Keynote.

  2. I prefer the animations in Keynote to the ones in Microsoft Powerpoint

  3. Keynote is not as complex as Microsoft Powerpoint

Had some trouble of getting used to Keynote as it was new to me. However, I managed to adapt to it quickly as it was pretty user-friendly. Here's a sneak peak at my presentation for Monday:



11 December 2008

Attended SIGGRAPH Asia 2008 at Suntec Singapore International Convention & Exhibition Centre. It is the first ACM SIGGRAPH Conference and Exhibition on Computer Graphics and Interactive Techniques in Asia. There were lots of projects there, mainly animations and visualization. I guess I'll let the pictures do the talking:












12 December 2008

Worked on our presentations for the entire day. I finished doing my presentation slides before lunch and did a dry run of our presentations. After the dry run, I realized that I should prepare a script. Wrote my script and practiced it for a few times before we ended our day.


Reflection for the week:

It had really been an eye-opening experience for me at SIGGRAPH Asia 2008, experiencing some of the technologies which I haven't had the slightest idea of. I had learnt quite some stuff about computer graphics such as rendering of 3D models and how NVIDIA® Quadro® is build for providing better rendering in Adobe® Creative Suite® 4.

Presentation-wise, I've chosen to use iWork Keynote to Microsoft Powerpoint. Keynote provides better animation, visual effects and is user-friendly. The animation and visual effects from Keynote would help in my presentation by allowing my listeners to remember what I had presented better.

On a side note, I think I'm becoming more a an Apple fan after using the iMac for almost 2 months. iMac's OS have always kept me amazed. Here's a screenshot of the interface which amazed me:


The UI for Mac is simply good. It's no wonder the UI for Microsoft's latest OS, Windows 7, looks exactly the same as the Mac's UI.

Friday, December 5, 2008

Completion of 4PP(4 Player Pong)

1 December 2008

Arrived the usual time, but was unable to access the office because the time I reached was not within 'office hours'. Luckily, the pantry auntie saw me and opened the door for me. So I continued doing with the scoring feature of 4PP(the short form for 4 Player Pong). Not long after, the rest arrived. I asked them if they had any problems accessing the office, and they said no. I test my card again during lunch and it works fine. So I guess that our card could only access the office after 8.30am. I guess I need to go find the person in charge to change the card's timing.

For the rest of the day, I worked on checking which paddle has the last touch of the ball.


2 December 2008

In the morning, Ryan and I set up Lightdraw using You Hock's MacBook Pro so that Ryan could continue working on his part.This is because Leonard and You Hock needed the Mac Pro for the 2x3 Tile Display. We used the DV cam instead of the webcam because the webcam is not able to change its settings. After setting up, I continued working on the score function for the rest of the day.


3 December 2008

Showed Kevin our progress for 4PP and continued to work on the score function till lunch. As I was not progressing much due to the limitations of Quartz Composer, I decided to ask Kevin for help. So after Kevin finished his meeting, he came over and taught me how to debug my application by displaying the value. With Kevin's help, I managed to finish the score feature. I also proceed on to display the winning message. You Hock and Leonard suggested that I make the winning message flash. So I managed to make the winning message flash by the end of the day.


4 December 2008

Ryan and I integrated our parts together as soon as we arrived in the morning. We managed to integrate our parts successfully before lunch. Bernard and Ming Hong also tested it before we head out for lunch.

After lunch, Ryan and I help You Hock to set up Lightdraw at the 2x3 tile display as Leonard wasn't here due to his National Service medical check-up. After setting up and testing You Hock's work in the 2x3 tile display side, Kevin called us over and shared about how he presents his work. He also showed us how Steve Jobs influenced him in his presentation by letting us watch a video on how Steve Jobs presented.

After the sharing, Ryan and I showed our integrated 4PP to Kevin. Kevin gave us some comments on how to improve the gameplay. Ryan and I agreed to make the changes and finish it by tomorrow.


5 December 2008

Ryan and I worked on the changes agreed yesterday. We started by doing the display score function. I displayed the score in front of the paddles as suggested by Kevin. However, Leonard and Ryan suggested that the game would look better if we display the score in the 4 corners and use the paddle colors to identify the scores. So I did as what they suggested. While doing so, Ryan and I discovered a bug in our application, the score for the blue paddle was wrong. Spent the whole morning debugging and we managed to solve the bug before lunch.

After lunch, we worked on getting the game to start once the laser is shone on the ball. We managed to finish this feature by mid-afternoon and spent the rest of the day compiling the applications needed for SIGGRAPH Asia 2008 Conference next week. Here's a picture of our final application:



Reflection for the week:

I've learnt how important it is to know how to debug, regardless of the IDE and programming language. For example, if I knew how to debug in Quartz Composer earlier, I could have help Ryan on his part and finish the whole application faster.

I had also picked up quite a handful of tips on how to do a presentation. Apart from what we had learnt in CMSK(a module in school) and the practices we had after every module, what Kevin shared with us would help me in how I am going to present in the future - less words on slides, more talk.

Wednesday, November 26, 2008

4-Player Pong in Quartz Composer

24 November 2008

Met Kevin while I went to collect the keys to open the "working space". He had returned from the Conference in the US and passed me some souvenirs he got for us. These are what he brought back for us:


Rested at my desk after opening until the rest returned from breakfast. I did not join them for breakfast as I was feeling unwell. I continued with the sample application to get a better idea of Quartz Composer. Managed to get the sample application to work the the Lightdraw through the OSC receiver.

After finishing, I helped Ming Hong in setting up the new DV Cam. Here's our new DV Cam:


We had some problems in getting it to work after setting up. So we requested help from Cheng Teng. After fiddling with the camera and its settings, we were able to get it working with Lightdraw before lunch.

After lunch, I continued working on the '4 Player Pong' on Quartz Composer while Ryan tried to modify the existing Lightdraw application,'Coverflow Gestures', for the rest of the day. The interface of the '4 Player Pong' and the modification of the 'Coverflow Gesture'  application were done by the end of the day. Here's the interface for the '4 Player Pong' on Quartz Composer:



25 November 2008

Joined the rest for breakfast today as I was feeling slightly better. Continue to work on the '4 Player Pong' after breakfast. Studied the javascript patches on the examples I had downloaded and tried to do something similar, but was unsuccessful due to the difference in versions. So at around 11.30am, we started setting up the applications we needed for the demo to Kevin before having lunch.

After lunch, we went to check whether the applications we needed were there for the demo. So around 2.30pm, Kevin came over and we showed him the applications we did for the past weeks. We also gave him an update on our progress so far. As soon as we finished the demo, Kevin brought us to visit Fusionworld, a state-of-the-art technology showroom by A*STAR. It's a very cool place. We visited there to check the set up for Lightdraw, so that You Hock and Leonard could get a rough idea on how to set up Lightdraw on the 3x2 Tile Display. We've also tried the "legendary touch table". Shall not comment on it much. Here are some pictures I took there: 



We got back to our work after the tour of Fusionworld. Ryan and I struggled getting the javascript to work for the rest of the day. I hope we could get something to work by tomorrow.


26 November 2008

Breakfast as usual with the rest before heading back to work. I was studying the applications I downloaded and decided to work with the existing patches in Quartz Composer instead of javascript. So by lunch time, I was able to get the ball to move.

After lunch, Bernard and Ming Hong brought us to visit the 'interns level' on level 14 before going to the sky gardens. Level 14 is totally different working environment from the environment we are in. After visiting level 14, I do really feel very lucky to be here working on Lightdraw. And Bernard have been joking about sending us to level 14 if we are unable to complete our tasks on time. Oh wells. Here are some pictures we took there:




Went to look for Kevin to give him an update on our progress after touring the building. Then we continued doing our work. Having some trouble to give the moving ball a constant speed after changing directions. The codes we used in the C++ version of '4 Player Pong' does not work nicely here in Quartz Composer. So I worked on getting the ball to move in a constant speed after changing direction for the entire day. However, I was still unsuccessful at the end of the day. Hopefully, I could complete this task by tomorrow and start doing the collision-checking between the ball and the paddles.


27 November 2008

Kevin and the rest are having their company retreat, so we were left to do our work by ourselves for the rest of the day. I tried getting the ball to move in random directions before lunch, but was unsuccessful. This is due to LFO patch not accepting negative values.

We had lunch by ourselves at the Dover Market nearby. The chicken rice there was great. Headed back to work after lunch. I decided to move on to working on other functions as I do not want to spend too much time on developing the '4 Player Pong' game because we still have other applications to work on. So I did the collision checking between the ball and the paddle for the rest of the day. Managed to check the collision for 1 paddle successfully at the end of the day. Hopefully, I could finish my part of the application by tomorrow so that Ryan and I could integrate our parts together.


28 November 2008

I continued with the paddles' collision checking after breakfast. Managed to finish the collision checking before lunch. On our way out to buy lunch, we 'upgraded' our visitor's pass to a temporary pass(woots!). We packeted our lunch back from the hawker centre opposite Fusionopolis as the weather wasn't looking good.

After lunch, I tried to pause the application after the ball went out of bounds. Did some research, but wasn't able to implement it at the end of the day. Will do it by Monday. Kevin and the rest had a demo on Lightdraw and the 3x2 tile display to the JC students at 2pm. After the demo, we ended the day by having a meeting to update Kevin on our progress so far and the plan for next week.


Reflection for the week:

This week has been quite a struggle with the Quartz Composer. Perhaps I'm still not used to visual programming. Hopefully I'll get used to it by next week. I had also discovered a few things about Quartz Composer, like Quartz Composer is running on a while loop and some limitations like being unable to store a variable after generating a random number. However, all programming languages has its own limitations and we are taught to work around those limitations(at least for me as my Major Project is done in a programming language not taught in school). The journey here at IHPC has been very fruitful so far, and I hope that I will get to learn more in the next few months.

On a side note, I tested out something on the iMac after reading about it on Digital Life. We could actually play 'Tetris' on the Terminal. Here's a screenshot of it and the steps taken:


Steps taken To Play Tetris on Terminal:

  1. Open Terminal(duh)

  2. Type in 'emacs' and press Enter

  3. Once it's loaded, press Esc

  4. Type 'x'(At the bottom of the screen, you'll see M-x)

  5. Type tetris and press Enter(you are ready to play!)

Steps Taken to Exit Tetris on Terminal:

  1. Press Control-X

  2. Press Control-C
Hope this helps. Enjoy!

Tuesday, November 18, 2008

Working with Quartz Composer

17 November 2008

First day of the week again. Kevin is not around as he flew off to the USA for a conference. I started of the day by having breakfast with Bernard opposite Fusionopolis. After breakfast, I tried to make the 'Pong' game start when a laser is detected instead of pressing the spacebar. It doesn't work because Ming Hong said that it is due to the 'cvWaitkey()'. So I used the 'usleep()' method instead of the 'cvWaitkey()' and it worked fine. Ming Hong also showed us a video from a website. Here's the video:



Cool huh? Click here to find out more. Bought lunch from the 'Market Place' after watching the video as it was raining. After lunch, I worked on getting the paddles to move smoother; I reduced the movement to just 2% of the canvas's height. It seems to be moving a lot smoother compared to the last version. However, Leonard commented that the movement seemed a little slow. So I guess I'll fix that tomorrow or something.

Ryan spent the entire day trying to make the paddle move towards the laser while Leonard and You Hock worked on the 3x2 tile display. Here are some pictures of them working on the 3x2 tile display:



By the end of the day, Ryan only managed to make the paddle 'teleport' to where the laser was shone while I managed to read up on 3 chapters of the Quartz Composer notes given by Kevin. Shall try to complete reading and doing the tutorials on Quartz Composer by tomorrow so that we could start working on the application in Quartz Composer.


18 November 2008

Had breakfast with Bernard in the morning again. However, we were joined by Ryan, You Hock and Leonard. After breakfast, I started to do the tutorials for Quartz Composer. I followed the tutorial closely and managed to make my composition into a screensaver and a QuickTime Movie. Here are some screenshots of my work before lunch:





Continued on the tutorials after lunch. Managed to create 3 Cocoa applications based on the tutorials. The first example was fine, but I faced some problems on the second example. After I completed the second example and ran it, the example did not work properly. So I tried re-doing but still faced the same problem. So I decided to skip and move on. So by the end of the day, these are the Cocoa applications that I did:




So I'm left with the last 2 chapters of the tutorial. Shall complete it before lunch tomorrow and start fixing our 'Pong' game before converting it in Quartz Composer.


19 November 2008

Had breakfast with Bernard and the rest again today. After breakfast, I continued with my final 2 chapters of the tutorial. Had some difficulties with the first tutorial because the tutorial did not really give very clear directions on where to find the example files to edit. Managed to find the file and complete the 2 tutorials before lunch.

Wanted to continue fixing our 'Pong' game after lunch. However, I encountered some problems because the function I did 2 days ago, doesn't seem to work. The game does not start when it detects the laser. I still needed to press a key on the keyboard before the game starts. Ming Hong tried to help by using the Lightdraw's key listener for Mac. The game starts when a laser is shone, but is unable to exit because the key listener does not read from the keyboard(according to Ming Hong). At the end of the day, we decided to revert back to the previous version and ignore the laser problem. We had to move on to the Quartz Composer soon. Will start working for the 'Pong' on Quartz Composer by tomorrow.


20 November 2008

Met up with Bernard and the rest for breakfast in the office again. After breakfast, Ryan and I wanted to test and fix the 'Pong' game. However, we were unable to test it because there was a meeting going on. So I tried to get Lightdraw to work with one of the example provided in Quartz Composer. The example application was working fine with the X11, but I would like it to work with the OSC to enable a multi-user mode. With reference from the 'Clouds Multi-User' application, I tried doing it but was unsuccessful when tested.

Had lunch after testing and was asked by Ming Hong to try fixing the existing Quartz Composer's applications to work with the existing Lightdraw. He explained to me what was the difference between the old and the new Lightdraw. Here are the differences:

  • blobCount now sends an int of 0-12 instead of 1-12
  • hold now is a string type instead of a boolean 
After understanding the differences, I tested the Quartz Composer applications with the new Lightdraw. The 'Clouds Multi-User', 'Teapot 3D' and 'RollsRoyce 3D' application are working fine with the new Lightdraw as they do not require the hold function. So I spent the rest of the day studying the 'Fusionworld' application. Hopefully I could fix it by tomorrow before lunch as some kids will be coming over in the afternoon.


21 November 2008

Arrived early, but did not have breakfast with Bernard as he already ate. So I continued to study before modifying 'Fusionworld' application to make it work with the new Lightdraw. Before lunch, I managed to finish modifying the application. Waited till after lunch to test it. The application works with the new Lightdraw(yay!). However, only the 3D models are not displaying properly. The images and videos are all working fine. Ming Hong and Cheng Teng tried to see what was wrong, but was unsuccessful.

We decided to leave the application as it is and set up for 'Bring your kids to work day', where those working in IHPC could bring their kids to work for a day. The applications used for showing Lightdraw to the kids were:

  • Google Earth
  • Cooliris
  • Puzzle Game
  • Drawing Board

Here are the pictures I took for the day:





After the demo, we had some light refreshments in the pantry. After having our fill, I continued working on the sample application. By the end of the day, I was still unable to get the sample application to work with the OSC. I guess I'll continue with on Monday and get it to work by Monday.


Reflection for the week:

Learning a new programming language is never a simple task. Although we were given tutorials and notes, the best approach to learning a new programming language is still hands-on.

So my week was spent on learning the Quartz Composer, a node-based visual programming language provided as part of the Xcode development environment in Mac OS X v10.4 "Tiger" and Mac OS X v10.5 "Leopard" for processing and rendering graphical data(taken from wikipedia). Picking up this programming language is no easy task as "codings" are kept to the minimal. However, I managed to understand it rather quickly as I was given notes and tutorials on it. Moreover, help is easily available online.

I've heard that interns here have a 'special' floor in Fusionopolis where all interns are assigned to that level. However, Ryan, Leonard, You Hock and I are thankful that we were not on the same 'special' floor as them because we get a chance to experience more things than them.

Thursday, November 13, 2008

Making Pong Multi Player

10 November 2008

Upon reaching, I switched on the iMac and ran Linux on it. After some time, I realized that there was a problem with the mouse. The single click in Linux became a double click, which hindered me in doing my work in Linux. At first, I thought that something was wrong with my mouse. So I switched mouse with Ryan and Linux still gave me the same problem. With that, I conclude that there's some problem with the Linux OS.

I then switched back onto the Mac OS and did my work on it. After awhile, Ming Hong said that he had to modify the Lightdraw codes, so we had to wait for him to complete. Read up on some news while waiting for him. Ming Hong did not take long to modify Lightdraw and passed us the new Lightdraw and the codes for his laser-matching algorithm.

We worked on integrating with our current application with the new Lightdraw for the rest of the day as there were several lines of codes that we needed to modify. By the end of the day, we managed to integrate with the newer version of Lightdraw and added in the codes for laser-matching. We will test out the laser-matching function tomorrow.


11 November 2008

Kevin informed me that Ming Hong would not be here for today when I went to take the keys for the 'working space'. So when the rest arrived, I told them the news and we had the same response - "today is going to be a tough day".

Tested the laser-matching after informing them. However, it did not work as well as I expected. So we tried to debug it till Kevin arrived to check on our progress. He informed us that he would be going to the United States for a conference for a week and told us the plans when we are done with our application. Leonard and You Hock would be working on the 3x2 tile display while Ryan and I would be working on an application in Quartz Composer. This means that Ryan and I have to learn how to use the Quartz Composer. Kevin then demo-ed to us the Quartz Composer as none of us had used it before. Here's a screen shot of the Quartz Composer:

After the demo, Kevin left to do his work and we returned to do ours. We struggled throughout the day trying to get the laser-matching method to work.


12 November 2008

Kevin gave Ryan and I some notes to read up for Quartz Composer. Upon receiving, we went to print the notes. Not too long, Ming Hong came and helped us with our application. Within half an hour, our '4 Player Pong' application could be work with multiple lasers.

However, things are not looking so good for You Hock and Leonard as their application is more complicated. You Hock seemed stressed after our application could work with multiple lasers. Tried to get him to relax and stuff while we tidied up the codes for our application. 

After tidying up the codes, we had lunch and went shopping for fruits at 'Market Place'. Learnt quite a bit about fruits from Bernard. Did some testing to check if there's bugs after lunch. Harold then came over and took a peek at our application. He commented that the paddles are rather jumpy and if it moves smoother, our application would be better. We found a few bugs fixed. I guess we will get it done by tomorrow. Here's a picture of Ryan testing out our application on the big screen:



13 November 2008

Read a few pages of the Quartz Composer notes that Kevin gave us yesterday. After reading a few pages, I decided to save the notes for the weekends and started to fix the bugs on our application. By lunch, our application was running fine. However, the paddles are still jumpy and we will have to fix that soon.

We bought instant noodles and potato chips for our lunch from 'Market Place' as it was raining heavily. After lunch, Bernard brought us to see our department's computer cluster and the computers which are powering the 6 projectors for the 3x2 tile display. After the visit, we had a 'lesson' on how the computer cluster work and its architecture. After the short lesson, Bernard demo-ed to us how the 3x2 tile display work.

After the 'lesson', Ryan and I tried to enhance our application by adding sound and changing the winning message for the rest of the day.


14 November 2008

It's been a month since I've been at IHPC, time really flies fast. We started our day by presenting our applications to Kevin, Bernard and Harold and got some comments on how we could improve our presentation and applications. We had also learnt the 2 main important things for Lightdraw is the ease of use of Lightdraw with the applications and the visual effects of the application. Here's a picture of Kevin testing out Leonard's and You Hock's application, the 'Puzzle' game:


Ryan and I were told of the change of plans for us - to develop the '4 Player Pong' game on Quartz Composer first before the blackboard application. We then had lunch at Holland Village and I was taught an important lesson about responsibility and how different it is at work and in school.

After lunch, we were informed that we were supposed to demo our applications to Terence, our department's Programme Manager. So all 4 of us made changes to our applications after the comments we received in the morning. I then proceed to write down the enhancement we need for our application on the whiteboard before presenting our applications to Terence. The presentation went quite well, and Terence gave us his feedback on our applications and how we could improve on it. We also told Terence about what we had learnt so far in IHPC and our plans for the next week weeks.

After Terence left, Ryan and I discussed on what we are our plans for next week. Once the plans were finalized, we went to bind our Quartz Composer notes before calling it a day. It was our first time operating the binding machine, but things were fine as we managed to bind the notes successfully. It was a great and fun experience to operate the binding machine.


Reflection for the week:

I had truly learnt a lot at IHPC in the past 1 month. Apart from just programming language, I had also learnt other stuff such as how to choose a fruit and how to operate the binding machine. We were also given important lessons on how one should be responsible and true to oneself from experiences shared by our supervisor and colleague during lunch.

Even though we had numerous chances to practice our presentation skills in school, we had learnt that presenting during work is totally different as we have to maintain a certain level of professionalism and be prepared for the presentation. I hardly prepare much for presentation in school. However, it is different here as we only need to present our application and have to explain while doing it, which made me realize how important it is to be prepared. I will definitely bear this in mind and will not make the same mistake twice.

Apart from all these, the weeks here at IHPC has been very enjoyable and fruitful.

Monday, November 3, 2008

When Pong Meets OSC

3 November 2008

Monday blues! Got to work early and had breakfast there while reading up on YouTube in Wikipedia. Then started to work on the '4 Player Pong' game. Soon after, Ming Hong came in and told us that Kevin and him had to attend a seminar and won't be around till Wednesday. So there won't be any progress report or disscussion till Wednesday, which means more time to do enhancement to our application before trying to integrate it with Lightdraw.

Had lunch at Crystal Jade today. Most expensive lunch so far during the internship. I guess it should be fine to have lunch at such a place once in a while as we just received our first paycheck.

Headed back to Fusionopolis to continue with our work while Kevin and Ming Hong went to attend their seminar. We did not have much progress because I struggled with understanding the Mathematics calculation for the speed and angle of the ball. However, I manged to fix the bug with the help of Ming Hong during his tea-break. Took a short break and went to the pantry. Here's a few pictures of what our pantry looks like and the view from it:



By the end of the day, the bugs for the ball is fixed and I have also managed increase the speed of the ball after a certain number of hits. Ryan also managed to make the yellow paddle work with the mouse, which is great news. Tomorrow will be the integration with Ryan's part and more enhancement to our '4 Player Pong'.


4 November 2008

Kevin and Ming Hong are busy as they had to attend a course and seminar respectively. So we were left on our own for almost the entire day.

Managed to reflect the ball back to the previous paddle after a number of hits was done in less than 15mins after I reached the 'working space'. Waited for the rest to arrive before I tried to integrate with Ryan's part. As there were some changes and modifying of the codes to be done, we were only able to finish integrating it after lunch.

Took a short break after the integration. During the break, a friend of mine started asking me questions about Linux in aMSN. So I did some research regarding the questions and found this really good website for on Linux. Here's the link for it.

Went back to doing our application and tried to integrate sound into the game using the irrKlang library. By the end of the day, we managed to add the sound in. However, there was like a 2-3 seconds delay when the sound was supposed to be played. I guess we will just ask Kevin for his suggestion when we meet him tomorrow.


5 November 2008

Tried to do the winning message before Kevin came in, but was unsuccessful. So we showed him our progress and what we intend to do. We had also asked him about the sound thing, but he said focus on the OSC and get it working with Lightdraw first. Completed displaying the winning message before lunch. After we finished our parts, we played with the 'Drawing Board' done by Ming Hong. So this is what we drew:


It's the first time we interns had lunch by ourselves. For the past 2 weeks, we joined Kevin, Ming Hong, Harold and Bernard for lunch. However, they had to attend a farewell lunch at Harrys. So You Hock, Leonard and I went to lunch at the Dover Hawker Center nearby. Ryan did not join us as he felt unwell. We had chicken rice there as it was recommended by Bernard. We shared half a chicken and had a plate of vegetables, and we paid like only $4 each! Plus, we had free servings of rice and it tasted good.

Bought congee for Ryan and we got caught in the rain. Ran all the way back to Fusionopolis. Passed Ryan his congee and went to dry ourselves. Rested for a little and we went back to doing our applications. Managed to edit the OSC makefile with the help of You Hock. We had also made some changes to our source codes, with the help of Ming Hong, as some codes did not run on the Mac. In the process of changing some codes, I've learnt that by adding in a few lines of codes, we could make the compiler choose which lines of code to compile in both Mac and Linux.

By the end of the day, we had discovered that our application wasn't running with OSC. I hope that we will be able to integrate our application with the OSC smoothly.


6 November 2008

Tested our application with the OSC when I got to the office. To run the application in OSC, we first have to start Lightdraw. It did not run as smoothly as expected. So we had to modify the codes for our application. Time passes quickly whenever we concentrate on a task. Before Ryan and I know it, it was lunch time.

Went to have lunch with Kevin and the rest at Holland Village. During lunch, we were discussing on social and environmental issues. It was pretty interesting to listen on other people's views on such issue.

Created a C++ class after lunch to store the coordinates of a laser with the help of this website. I also managed to set the starting position of our application to the top left corner as Lightdraw takes in the coordinates of the screen instead of our application. This was done after a quick Google search, and here's the link for the site.

After we told Ming Hong our progress, he suggested for us to use an array of cvPoints instead of the trouble of using a single class. So we changed the codes and commented out the class I created. By the end of the day, our paddle was only able to move upwards. I guess it's all part of my wishful thinking that the integration of our application with the OSC could be done in a day. Hopefully, we would be able to integrate our application and the OSC by tomorrow.


7 November 2008

Reached the 'working space' early today. However, I was feeling rather unwell and rested till the rest arrived. When the rest arrived, we began to work on our applications. Ryan and I tried debugging and realized that we are unable to print out anything when we used the 'cout' function. So we used the 'printf' function and we were able to debug it finally. I've also found out that the 'printf' function could do formatting while the 'cout' function could not. Here's an example on how to format using the 'printf' function:

printf("Here is a number %d and a %s word.\n", number, pointer);

%d %s are the printf format identifiers

Here's a link on the other available printf format identifiers.

After testing and modifying the codes, Ming Hong suggest that we slow down the speed of the application because the our application speed might be faster than what the OSC could receive. So we tried slowing it down and we managed to make the yellow paddle moved.

We then help Ming Hong to clear the projector room to make way for our new projector. While the people where bringing in the new projector, we continued working on our application and did the checking for the collisions between the yellow paddles and the others. After finishing the collisions check, we tried running it on Linux. However, the application did not go well because the screen positioning of our application was different. Kevin suggested that we take a break and had our lunch at VivoCity.

After lunch, the installation of the new projector was done. Here's the pictures of our old and new projector:

Old Projector

New Projector


We waited for Ming Hong to change the settings of the new projector before we tested our application on it. And by the end of the day, we managed to make the other paddles move and checked the paddles collisions with just a single laser. So it wasn't wishful thinking after all.

So by next week, we would be able allow our application to support multi-lasers and invite Mr Yeak over to show him our progress.


Reflection for the week:

This week had been a very productive week for me as I had learnt alot about C++, OpenCV and even the C++ compiler. I'm getting pretty used to typing the codes in the text editor. It feels just like when I was in my first year in polytechnic when we used to do write an application, and only finding out that we forgot to add a semi-colon or close a bracket during compilation. I guess I have been spoiled by the IDEs these days as they would prompt what are the methods/functions available after we entered a '.' and just choose from the list.

I have also been more adapted to travelling from east to west. Spending my time during the journey to keep myself updated with local and world news. After spending so much time with Kevin and our collegues, I found out that by keeping myself updated with the news(this week is about Obama, of course), it is easier for us to find a topic to talk about.

On a side note, I think I would install Linux on my laptop in the future for development purpose.