Welcome

This is a blog sharing what i have learn and experience from my internship in A*Star IHPC
- Zac Kwan

Wednesday, January 12, 2011

Day 67 - New Functions

As we have almost completed with the rest of the function, clean up have been done, its time to add in more function.

We discuss about the possibility of this project again, with the gesture function almost complete, most of the other stuff left is to how to put file into it and how to make allow upload and download folder. There is database, website, and this and that. But we chosen the new and quite popular 1, dropbox. As we only need a place to read file and download file, setting up database or website is like a lot to do for a small task. We decide to use dropbox api.

The rest of the day, i am analyzing on how to use dropbox api and looking at the example. The api is pretty good, everything that we needed is covered nicely. Although the example is a really brief one, but it is good enough to get started. Most of the time was actually trying to see which delegate is being called, as alot of delegation is used. Most of the it can be tell by the name, but sometime the order in which it is call isn't that easy to tell.

Before leaving office, manage to set up the log in and read the meta data of the file.


Tuesday, January 11, 2011

Day 66 - Translation Translation Translation

After fixing the exploded view to ensure that all the object is being kept on screen, the translation is causing problem again.

Not because of adding the fix that cause the problem but rather the problem existed just that we didn't notice cause the object is near to camera so is hard to tell. But after adding the exploded view and moving the camera away, we notice that the object is actually flying further then the mouse translation.

We cant really think of anyway yet to fix it. I try on looking back the other project and see what wrong with the formula. Can't really tell any differences but it is just not working. After long time, Alex found a problem that is a mistake by me in adding the z axis to the camera z when retrieving the camera value. Is not needed because the camera z value is already added with z axis.

However there is still some problem to fix.

Monday, January 10, 2011

Day 65 - Move the camera back. Translation again..

Monday, back to the office, it started to rain for the past few day. Continue working on understanding the pivot point in the object. Googling for answer on why pivot point does not work even when changed.

After a while finally understand that openGL does not read the pivot point. Pivot point is actually for the object in the modeling software. We also make another discoveries that trying the scene center should work out when rotating. We did that and it work. However the center in the object are unable to be change. Everything seems to be defined when the model was being drawn before importing. Look like we just got to make do with what we have.

On the 2nd half of the day, we work on the zooming out of camera in exploded view. When in exploded view, some object will be cut out of the screen as they are rotated close to there. So we now use a algorithm to actually move the camera out by a number of z axis from the furthest object so that all the object in the scene will be able to see.

After finishing that, as the object is further now we could see that our translation actually is having some bug.

Friday, January 7, 2011

Day 64 - Reinstall OS and 3D modeling software

Its friday, weekend arriving. The last day of the week, no much coding was touch. We did reinstalling on the bootcamp on Mac laptop and also 3ds max studio. This took up about all the hour before lunch time.

After lunch, we started working on the pivot point of the object. We try changing the pivot point of the object in 3ds max and import into code. However is not being change at all when we import it in code.

We tried various way, look up on how to do it and still not getting the expected result. We suspected that there is problem with the plugin to export to pod file. Did some research online and found out that there are a few people also have such problem when trying to export to another format and import it into another application.

So now the question is, is it the application, the plugins, or just that we are doing it wrongly.

Thursday, January 6, 2011

Day 63 - Clean up and modification

Still having the same problem with the label, asked kevin over to discuss about it. Updated him about everything we have done so far, the way we done it and the problem that is occurring.

We decided to do some clean up on code. Make some changes to our program to look better. So spend the day cleaning up code and writing comment. Some of the changes made are added a button to reset the clipping plane.

Once clip, the plane will stay there on screen. Decided to add in clipping plane rotation and also translation. Now the clipping plane can rotate and translate on different axes. It looked much better now, i think because when u shown the clipping plane, naturally the user would want to manipulate the plane rather than the object.


Tuesday, January 4, 2011

Day 62 - Changing of Plan

Kevin came over today and discuss with us again about the label. He thought that the label with a line was not worth the amount of effort to get that effect. Although it was difficult to implement, but it was actually difficult to maintain the code as well. He decide to use the tap and show label method.

I did try to tell him to use this label, but i didn't say it in the way that he did. When he say it this way, it seems to be more convincing to change it to this way. Look like i still have to be clearer on bring my point across.

So, we now started working on the longpress to show label, it wasnt that difficult i believe. But the mkannonation class that we thought we could use, it can only apply on the mapview. UIView does not allow any of it. There is undocumented apply api, callout, but is really not a good idea to do it. We are now still looking at way to work around.

Monday, January 3, 2011

Day 61 - Happy New Year.

Its 2011, happy new year everyone =)

Started my first day of work in 2011 now. Enjoy a lot of fun and laugher with friends. But now is time to get back to serious stuff.. WORK.

Back to working on showing the label on the node. Discussed on various way to do it. We then went online to research on what are the possible way to do it. After hours of research, is actually not being done by much people yet.

We decided to make use of our own algorithm to try and tackle this problem. Our plan is to make use of a circle algorithm to separate the label apart according to number of node. Next use the distance to get the nearest node to the label position. Then following by drawing a line and translate it to the same position.