Wiki内検索
最近更新したページ
2011-08-24
2010-05-18
2010-05-03
2010-02-18
2010-02-10
2010-02-09
2010-02-08
2010-02-07
2010-02-02
2009-12-24
2009-12-05
2009-07-05
2009-07-03
最新コメント
MenuBar1 by stunning seo guys
MenuBar1 by stunning seo guys
MenuBar1 by stunning seo guys
MenuBar1 by awesome things!
MenuBar1 by awesome things!
MenuBar1 by awesome things!
MenuBar1 by check it out
MenuBar1 by awesome things!
MenuBar1 by check it out
MenuBar1 by stunning seo guys
Menu
Programming Tips
タグ

Plate

平面方程式


平面方程式は平面上の中のある一点と法線の内積で表せます

d = 内積( 点, 法線 );

d = dot(p, n);

C++


平面方程式用のクラス

class TPlane
{
public:
TVector n;
float d;
};

TPlane makePlane(TVector &a, TVector &b, TVector &c)//3つの点は時計回り
{
TPlane ret;
ret.n = normal(a, b, c);
ret.d = dot( a, ret.n );
return ret;
};

各成分で表示する場合の式は(こちらの方が一般的ですが)
ax+by+cz=d
です。
abcは法線、xyzは平面上のある点を表します。
ax+by+czの計算は内積となります。
2008年02月18日(月) 12:28:45 Modified by eruvasu




スマートフォン版で見る