2010年1月25日月曜日

Implicit Surface

Today, I want to introduce "implicit surface", which is one of the surface expressions.

First, I'm going to explain the concept of implicit expression in a 2 dimensional world. Let's express a circle in mathematical terms. There are 2 ways to express a circle as follows.
  • (x, y) = (cos(t), sin(t))  ... (a)
  • f(x, y) = x^2 + y^2 - 1 = 0 ... (b)
(a) is an explicit expression and (b) is an implicit expression. Each expression has its pros and cons.


With the explicit expression, we can get coordinate values of points on the circle explicitly. If you substitute 0 for t, you can get explicit coordinate values (cos(0), sin(0)) = (1, 0). But, with the implicit expression, we cannot get such coordinate values explicitly. This is a disadvantage of implicit expressions.

However, the implicit expression has a significant advantage. You can tell if an arbitrary point is inside the circle or not very easily with the implicit expression. If the point (x, y) is inside, the value of the implicit function f(x, y) is negative. Otherwise, the value is positive. That is, the inside domain of the circle can be expressed with the following inequality.
  • f(x, y) = x^2 + y^2 - 1 <= 0
Furthermore, Boolean operations are made easier with implicit expressions. Boolean operations mean addition/subtraction/multiplication of shapes. An addition of two circles is shown as follows.


The two operand circles are expressed as follows.
  • f1(x, y) = x^2 + y^2 - 1 <= 0
  • f2(x, y) = (x-1)^2 + y^2 - 1 <= 0
The result of the subtraction can be expressed really simply as follows.
  • f3(x, y) = min{ f1(x, y), f2(x, y) } <= 0
This is a great advantage of implicit expressions.

This concept can be extended to 3 dimensional worlds. We can express spheres or other 3 dimensional shapes with implicit expressions. Of course, we can execute Boolean operations in a 3 dimensional world very easily. We call 3 dimensional surfaces expressed with implicit expressions "implicit surfaces".



The above figure shows an example of a subtraction between a sphere and a cylinder in a 3 dimensional world.

On the other hand, using explicit expressions is mainstream for surface expressions of 3D CAD, and Boolean operations are really difficult and complicated procedures in such CAD. I believe implicit surfaces can be useful for some applications. I'm wondering what kind of applications can take advantage of implicit surfaces.

2010年1月12日火曜日

Happy New Year

Today, I want to write about this New Year's holiday.

I spent this holiday with my mother in my home town, which is in Iwata city, Shizuoka prefecture. Many people living in Tokyo (or other big cities) go back to their family home during New Year's holiday. My brothers and I gathered at our mother's home and we threw a nabe party on New Year's Eve.

That party was extravagant. My uncle sent us a king crab ("taraba-gani" in Japanese). One of my brothers, who had lived in California last year, brought a bottle of California wine. My mother prepared kimchi-nabe (Japanese nabe with Korean pickles), and a bottle of Shimeharizuru-daiginjo, which is one of the best grades of Japanese sake.

I was happy, because my mother seemed happy. My father passed away more than 8 years ago and she had lived alone since then. So, she had been looking forward to the party with her sons.

The party wasn't the only thing that made her happy. She became a grandmother last year because my wife gave birth to a baby girl last October. Every time she saw my baby, she smiled and said she wanted to show my baby to her husband in heaven.



On January 2nd, I went to a doll shop with my mother, my wife, and my wife's mother. It's a custom in Japan that people who have daughters put up hina dolls in their house on March 3rd every year. My wife's mother bought us the dolls below as a present. I'm really grateful for it!



 It was a good holiday. And I wish this year will be a good year.