Sunday, December 16, 2012

NIght at the Movies: The Hobbit: An Unexpected Journey

   I can go on and on about how happy I am that the epic adventure of Bilbo finally got brought to life on screen, but then that is hardly worth reading about, is it? Simply saying I enjoyed  every bit the movie is all to be expected from a Tolkien fan. No, this will not do. What is interesting is the things that are... well... "unexpected."

(Warning: mild spoilers ahead.)

  First of all, beside the familiar main characters, the addition of Radagast the brown is a magical one. I thought he might be a rather boring character when I first saw him in the Trailer. Radagast was just a kind little old man that concerned himself only with his animals. It seemed he would not contribute much to the plot. And here I must say, Mr. Sylvester McCoy is a very good actor. He portrayed the wizard's loving nature to such a profound level that event the audience would forget about the hobbit, the ring, or indeed anything else and think that the wellness of Radagast's forest is the most important matter in the would. When he ran around his house in a frenzy to save his hedgehog, I find myself praying that he would succeed. The scene made the coming of the Necromancer seem more fearful and abominable because the audience has developed feelings for the would that is at stake of destruction from the villain.
   Anther good portray of character is that of Smaug the dragon. Peter Jackson did it subtly. The downfall of the magnificent dwarf city Erebor is all we know of Smaug. When reading the book, we learned about Erenor mainly from all the eccentric description given by the dwarves. We understand that the halls were grand, the treasures piled high, and all is in awe who looked upon the great city..... from a dwarf's view. It is difficult to feel the eagerness to go on perilous journeys for it. The amazing thing about movies is that they give us the chance to really "see" things for ourselves, and let us be the judge. And when I saw Erebor, with its high pillars and bright marbles glimmering in torchlight and the all the precious gold and gems it contained.... It was spectacular beyond words! The magnificence filled me with longing. In that magical moment, I feel like I would have done anything just to go there. Now I almost sounded like a dwarf myself! To have all that wealth taken so suddenly by a great big bully of a dragon, it would have filled anyone with anger. What was more, that bully really had no need of any of it. He just buried himself in the treasures and sleep his time away! No doubt without giving the audience the feeling of the greatness of Erebor, Smaug would not seem as detestable.
    Lastly, it's about the humor. Although The Hobbit is a cheerful story meant for entertainment, I did not expect Peter Jackson to stretch it to such extent because the movies are, after all, the prologue of the dark Lord of the Rings trilogy. One would have though he'd go for a similar style. He must have lost some of the audience because of all the fantasy and fun. At some point, The Hobbit is almost like a cheerful animated children's film from Dreamworks. But that made the movie much more lighthearted and enjoyable. There is less suffering and the audience are spared from heartache.
   When a great book become a major motion picture, we get to sit back and fondly remember the events like our own memory. Not only that, but we are invited to look at things in a different point of view. We find emotions that were not present before and think thoughts that are new to us. The audiences are swept off their feet an into their own, unexpected journey.

*  *  *

"True courage is about not knowing when to take a life, but when to spare one." -- Gandalf, The Hobbit

Monday, July 23, 2012

Leadership Program: The Journey Starts

July 21st, 2012 -- day 0
We had a long flight, from TPE to LAX, DFW, and ORD, and finally getting to IPFW on a 4hr bus ride.
Since the trip started at midnight, we were able to first see the stary night sky, the sunrise, and then, just before touch down in Los Angeles, the sunset again. Even though night is falling over LA, the amount of activity in the city was amazing. There were several hot air balloons floating near the airport. From the sky, they look like little orange fairies, gracefully and unhurried.

We were tired after such a long flight, but we were not at our final destination yet. There was still a long way to go to get from Chicago to Fort Wayne. We made a brief stop at an Japanese grocery store for lunch. The place was flooded with Asians. It felt strange to be there, knowing that we are already on the other side of the planet, yet surrounded by everything NOT American.

Continue on our way, we get a glimpse of the Chicago skyline from the highway. The city looks much less awkward from the ground. From the sky, she rose from the ground like a city in a desert. Her surroundings are flat compared to the immense height of the skyscrapers.
I was hoping that I can overcome my jet leg as soon as possible, but tiredness got the better of me and I slept the rest of the way to the school. We get to sort our things out as soon as we arrive. Our rooms are very nice. With two bedrooms, two bathrooms, a living room, and kitchen. After refreshing ourselves, we joined in the lobby to have pizza and coke for dinner. The volunteers who would be accompanying us throughout the weeks are great people. It was the first time that I met people near my age who share so much interests with me that is not Taiwanese. To exchange views with them was a great delight. I was sorry when the little party ends. Cannot wait to see them again next day.

Friday, March 23, 2012

The Beauty of Life

A couple of weeks ago I encountered this talk of Neil deGrasse Tyson. What is the most astonishing fact about the universe? I would thought the warping and such phenomena would be on the list. But No! He talked about how we all, came from the universe. How true, yet how easily forgotten. It reminds me of another video that I've seen  not so long before this. 



It is an animation of the human cells in working. It shows everything we've learned in high school: the making of DNAs and RNAs, the blood cells working their way though the bloodstream.... They are so familiar yet the view is alien to the eyes. How little do we know about ourselves. We are no less alien than the imaginings of our minds. But then again, we are like the stars, we know of its existence,  but little of anything else. We can only do our best to try to understand the work that has been going on in the cosmos since the beginning of time.


What I love about these videos is that they reminds me of the wonderfulness of our existence. To stand on earth, or to be here, at this moment, is a blessing. Sometimes when I feel down, I'd like to remind myself that life is a miracle, and it is worth every second that we cherish it, and love it. When I felt happy, thinking about these facts, I found power in pursuing my dreams. I want to know more! We shouldn't be aliens to ourselves. Sometimes I even believe that, if we work hard enough, if we have enough passion, we would eventually found all answers to our questions.

No matter what the future is installed for us, I want to live it to the fullest. And these videos give me the best reasons to tell people why.

Sunday, March 11, 2012

[Scilab] Plotting with Colors

There had been much frustration when I attempted to plot several locus lines of a four-bar linkage in a single graph. I struggled with the color settings. Searching around the web I find that much of the information given about the use of the plot and plot2d function failed to address how plotting single dots works.

Searching the Scilab online help, we get

plot



LineSpec
This option may be used to specify, in a short and easy manner, how the curves are drawn. It must always be a string containing references to LineStyle, Marker and Color specifiers.
These references must be set inside the string (order is not important) in an unambiguous way. For example, to specify a red long-dashed line with the diamond mark enabled, you can write : 'r--d' or '--dire' or '--reddiam' or another unambiguous statement... or to be totally complete 'diamondred--' (seeLineSpec).
Note that the line style and color, marks color (and sizes) can also be (re-)set throught the polyline entity properties (see polyline_properties).

plot2d



style
This option may be used to specify how the curves are drawn. If this option is specified, the associated value should be a vector with as many entries as curves.
  • if style(i) is strictly positive, the curve is drawn as plain line and style(i) defines the index of the color used to draw the curve (see getcolor). Note that the line style and the thickness can be set through the polyline entity properties (see polyline_properties).
    Piecewise linear interpolation is done between the given curve points.
  • if style(i) is negative or zero, the given curve points are drawn using marks, abs(style(i))defines the mark with id used. Note that the marks color and marks sizes can be set through the polyline entity properties (see polyline_properties).

Pretty clear. So what's the problem?
If I were to do a plot consisting of three "points," say, (1,2), (3,4), and (5,6). They are to be presented as (1) a dot with default color, (2)a red default mark, and (3)a red dot. Using plot, the commend lines would be:
plot(1,2,'.')
plot(3,4,'r')
plot(5,6,'r.')
Whereas using plot2d the commend lines should, according to most tutorials,
plot2d(1,2,style=0), plot2d(1,2,style(0), or plot2d(1,2,0)
X plot2d(3,4,style=1), plot2d(3,4,style(1)), or plot2d(3,4,1)
X plot2d(5,6, style=[0,1], or plot(5,6,[0,1])

The second line is fine if I were plotting lines. (The figure shows the results of the first four commends.) However, not setting the mark style will result in an empty plot. To solve this problem, we would have to change the global property of the plot. I have not yet managed this part, but I shall update it as soon as I figure out how. Stay tuned.

Friday, January 13, 2012

[C/C++] Solar System Model

This was a CG project I did for my finals. The result was quite successful although there wasn't much fancy commends or tricks. It primly consists of the glutSolidSphere commend from OpenGL, which is relatively easy to control. To see the program in action, feel free to download it here. The main difference of my model to the ones usually seen is that I have included the asteroid belt and the moons of both Jupiter and Saturn. To make the result even more dramatic (and this is an idea I was so proud of) is that the Sun changes colors! This is to simulate the burning fire ball that it should have been. It successfully caught the attentions of my teacher and peers, which is the goal of our projects. Another notable thing about my model is the scale. The speed of the planets are in scale with the real system. The actual size and distance of the planets, on the other hand, differs greatly from one another. To fit all planets into the frame without shrinking the Earth-like planets and moons into dots is impossible. This is the reason why few models have the right scale for these data. Therefore, to get the model as accurate as possible, I grouped the Earth-like planets and Jupiter-like planets, and scale the two groups differently.  This is the only inaccuracy of my model, I even had the planets rotating in the correct orbital plane angle (see figure below).

The only pity is that I failed notice the massiveness of my rendering method. First of all, all of my spheres were set with the same number of slices and stacks. In my negativeness, I have also chosen to use the LIFO* data construction type instead of vertex array or the VBO*. This slows down my program tremendously and limited the amount of objects I can put into it. The tragedy only presented itself when I attempted to construct the background and fill them with distant suns:

Snapshot of the output
Output with distant suns in the background

It made the overall scene much interesting, but sadly I was out of time and so I did not change any of the original codes regarding the rendering of the planets. It also prevented me from putting any other object into my model. I had plans about putting in a couple of comets to add up complexity. The calculations had even been finished:

From the above figure, we can see that, the tail length and direction differs with the position of the comet with respect to the sun. I thought the idea was pretty neat, and it was depressing that it never got a chance to be put into practice.

I would like to remind all who happens to see this post of mine that, if, by any chance, you happened to need to right a graphic program with dynamic outputs, please learn from my faults. No matter how the simple and friendly pushing-and-popping seems, never consider your program simple enough that acceleration can be neglected. It can't. Life wouldn't ever be easier that way.

------------------------------

*LIFO - Last In First Out, here it refers to the method of data construction. The transformation matrices needed for the rendering of the planets are "stacked" one on top of another. Like stacking books in the corners of our bedrooms, we would have to retrieve the top most book first if we don't want to end up with a pile of paper chaos!

*VBO - Vertex Buffer Object. It is an OpenGL feature that provides methods for uploading data to the video device for non-immediate-mode rendering. (courtesy to Wikipedia)