1 / 29

Computer Graphics

Computer Graphics. 第6回 モデリング2 曲線・曲面,その他の表現手法. 芝浦工業大学情報工学科 青木 義満. 曲面の例. 曲線・曲面. 曲線・曲面 コンピュータ内部では,全て数式として表現 立体の稜線を表現するための曲線の式 面を表現するための曲面の式 曲線・曲面の分類 数式の形式により,以下の 3 種類に分類 陰関数形式 パラメータ形式 陽関数形式 . パラメトリック曲線・曲面 工業製品設計 フォント( TrueType Font ) ベジェ曲線・曲面

marlee
Télécharger la présentation

Computer Graphics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computer Graphics 第6回 モデリング2 曲線・曲面,その他の表現手法 芝浦工業大学情報工学科 青木 義満

  2. 曲面の例 曲線・曲面 • 曲線・曲面 • コンピュータ内部では,全て数式として表現 • 立体の稜線を表現するための曲線の式 • 面を表現するための曲面の式 • 曲線・曲面の分類 • 数式の形式により,以下の3種類に分類 • 陰関数形式 • パラメータ形式 • 陽関数形式 Computer Graphics

  3. パラメトリック曲線・曲面 • 工業製品設計 • フォント(TrueType Font) • ベジェ曲線・曲面 • 1966年、ルノーの車体設計を行うための曲面としてBezierによって提案 Computer Graphics

  4. パラメトリック曲線・曲面の利用 Computer Graphics

  5. xy平面上の原点中心,半径rの円 原点中心,半径rの球面 陰関数形式 •  平面曲線: f(x, y) = 0 •  曲面: f(x, y, z) = 0 •  空間曲線: f(x, y, z) = g(x, y, z) = 0 • (曲面fと曲面gの交線) Computer Graphics

  6. 交点 直線: 球面: レイトレーシング法(光線追跡法)に適している (後述) 陰関数形式表現の特徴 • 長所 • 交点計算に適している • 例) 球面と,直線との交点 tに関する2次方程式 ↓ 交点 Computer Graphics

  7. f(x,y,z)<0 (球の内部) f(x,y,z)=0 (境界面) 陰関数形式表現の特徴 • 長所 • 数式で曲線,曲面の領域を区分可能 • 位置,衝突判定に適する f(x,y)=0 f(x,y)>0 f(x,y)<0 f(x,y,z)>0 (球の外部) Computer Graphics

  8. y x 陰関数形式表現の特徴 • 短所 • 座標値を計算により求める必要 • 適当な間隔でサンプリングするのに適さない • 格子状の点列から多面体を形成 • パラメータ形式,陽関数形式の方が適する 曲線・曲面上の点列計算 → 各軸に平行な格子線との     交点を計算 Computer Graphics

  9. パラメータ形式 • パラメータ(媒介変数)を介して,曲線・曲面を定義する方法 • 曲線:1つのパラメータtに対して,2D,3D空間内の点を対応させる • 曲面:2つのパラメータ(u, v)に対して3D 空間内の点を対応させる 平面曲線: x=f(t), y=g(t) 空間曲線: x=f(t), y=g(t), z=h(t) 曲 面  : x=f(u,v), y=g(u,v), z=h(u,v) Computer Graphics

  10. パラメータtを変化させることで, 円を記述 パラメータu, vを変化させることで, 球面を記述 c.f. 陰関数形式 パラメータ形式表現の例 • 円のパラメータ形式表現 • 球面のパラメータ形式表現 パラメトリック曲線,パラメトリック曲面 Computer Graphics

  11. パラメトリック形式の特徴 • CGで最も多用される曲線,曲面 • 長所 • 曲線・曲面上の点列を求めることが容易 • 曲線の場合 • 曲面の場合 曲線のパラメータ形式表現 x=f(t), y=g(t), z=h(t) パラメータ値を繰り返し代入 → 曲線・曲面上の点列 曲面のパラメータ形式表現 x=f(u,v), y=g(u,v), z=h(u,v) Computer Graphics

  12. 直線: 連立 パラメトリック形式の特徴 • 短所 • 交点計算に適さない (レイトレーシングには適さず) 3元1次連立方程式 → 解きにくい式 Computer Graphics

  13. t+Δt t+3Δt t+2Δt t t+4Δt t+5Δt パラメトリック曲線の描画アルゴリズム Δt = 1/n ; t = 0 ; x1 = f(0); y1 = g(0); for( i=1; i <= n; i++ ){ t = t + Δt ; x2 = f(t); y2 = g(t); DrawLine ( x1, y1) to ( x2, y2); x1 = x2; y1 = y2; } Computer Graphics

  14. z 陽関数形式 • 1つの座標値の関数として他の座標値を求める形式 • 平面曲線: y = f(x) • 曲面: z = f(x,y) x → y x , y → z 放物線(陽関数形式) 放物線(陰関数形式) (x,y) 放物線(パラメータ形式) 回転放物面(陽関数形式) 回転放物面(陰関数形式) 回転放物面(パラメータ形式) Computer Graphics

  15. 2次曲線 • 2次多項式(陰関数形式) • 円錐面の断面線 • 楕円, 放物線, 双曲線 • 楕円 • 陰関数形式 • パラメータ形式 • 放物線 • 陽関数形式 • 双曲線 • 陰関数形式 Computer Graphics

  16. パラメトリック曲線 • パラメータの陽関数形式: C=F(t) • CGで用いられる曲線 • エルミート(Hermite)曲線 • ベジエ(Bezier)曲線 • Bスプライン(B-spline)曲線 • 有理ベジエ(Rational Bezier)曲線 • 非一様有理Bスプライン曲線(NURBS) Computer Graphics

  17. p1 p0 p2 ベジエ曲線 • 与えられた点(制御点)に沿って,滑らかな曲線を描く方法 • 例)3点 p0, p1, p2に沿った曲線を描く Computer Graphics

  18. p1 pi p2 p0 pi+1 pN ベジェ曲線 曲線上の点P(t)は,制御点Piの加重平均 として表される Computer Graphics

  19. バーンスタイン関数 (Bernstein) 重み係数 ベジェ曲線 3次ベジェ曲線 Computer Graphics

  20. Bernstein関数 3次係数 0次係数 1次係数 2次係数 t=0 t=1 ベジェ曲線 3次ベジェ曲線 Computer Graphics

  21. 2次曲面 • 2次多項式によって表現される代数曲面 • 点対称: 2次曲面の中心 • 中心有り: 有心 • 中心無し: 無心 • 9種類 • 楕円面,一葉双曲面,二葉双曲面,楕円錐面 楕円放物面,双曲放物面,楕円柱面,双曲柱面,   放物柱面 Computer Graphics

  22. 二次曲面 楕円面     一葉双曲面     二葉双曲面 Computer Graphics

  23. 二次曲面 • 楕円錐面  楕円放物面  双曲放物面 Computer Graphics

  24. 楕円柱面 双曲柱面   放物柱面 二次曲面 Computer Graphics

  25. パラメトリック曲線・曲面 • Bezier 曲線・曲面 • B-Spline 曲線・曲面 • 有理 B-Spline, NURBS • 細分割曲線・曲面 Computer Graphics

  26. Bezier曲面 Computer Graphics

  27. m x n 次 Bezier曲面式 Computer Graphics

  28. 【参考資料】曲線・曲面描画ソフト • Function View(フリーソフト) • 作者:和田 啓助 • http://hp.vector.co.jp/authors/VA017172/ • Bezier Curve Generator Ver.2.0(フリーソフト) • http://www.dsgn.im.hiroshima-cu.ac.jp/~shimbara/program/ • ISURFACE version 1.0.6 (フリーソフト) • 作者:戸野恵太 • http://www.rimath.saitama-u.ac.jp/lab.jp/fsakai/tono.html Computer Graphics

  29. Bスプライン曲線 • 制御点{Pi}とノット列{ti}によって曲線を定義 • 複数の多項式曲線を接続して一本の曲線を作る • 接続点でのパラメータをノットで指定 • 制御点の重み付けにBスプライン関数を用い,関数の定義にノット列を使用 • ノット値が一定間隔:一様Bスプライン曲線 • そうでないもの:非一様Bスプライン曲線 Computer Graphics

More Related