テトラ内外判定をテストする。 乱数で発生させた点群に対して判定を行う。 テスト用のテトラは単純な形状で、平面の方程式から即座に内外判定が行えるので、これと比較してテストする。
Type | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|
real, | parameter | :: | tetra(3,4) | = | reshape([0., 0., 0., 1., 0., 0., 0., 1., 0., 0., 0., 1.], shape(tetra)) | |
integer, | parameter | :: | imax | = | 10000 | |
real | :: | rand(3,imax) | ||||
real | :: | point(3) | ||||
logical | :: | plane_judge | ||||
logical | :: | tetra_judge | ||||
integer | :: | i |
テスト用テトラの斜面の方程式
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | x | |||
real, | intent(in) | :: | y |