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.

0 件のコメント:

コメントを投稿