Wolfram言語

ユーザインターフェースの拡張

オブジェクトに特有のクリッピング平面

単一のオブジェクトに特有のクリッピング平面を設定する.

In[1]:=
Click for copyable input
Graphics3D[{Sphere[{0, 0, 0}], Style[Sphere[{1, 0, 0}], ClipPlanes -> InfinitePlane[{{0, 0, -1}, {0, 1, 0}, {1, 0, 0}}]]}]
Out[1]=

オブジェクトのリストに対するクリッピング平面を設定する.

In[2]:=
Click for copyable input
spheres1 = Table[Sphere[2 {Quotient[n, 3], Mod[n, 3], 0}], {n, 0, 9, 2}]; spheres2 = Table[Sphere[2 {Quotient[n, 3], Mod[n, 3], 0}], {n, 1, 8, 2}];
In[3]:=
Click for copyable input
plane1 = InfinitePlane[{{0, 0, 0.4}, {1, 0, 0.4}, {0, 1, 0.4}}]; plane2 = InfinitePlane[{{0, 0, -0.4}, {0, 1, -0.4}, {1, 0, -0.4}}];
In[4]:=
Click for copyable input
Graphics3D[{Cyan, Style[spheres1, ClipPlanes -> plane1], Yellow, Style[spheres2, ClipPlanes -> plane2]}]
Out[4]=

クリッピング平面を使って,ノイズの多い点クラウドをきれいにする過程を可視化する.

完全なWolfram言語入力を表示する
In[5]:=
Click for copyable input
bunny = RandomChoice[ ExampleData[{"Geometry3D", "StanfordBunny"}, "VertexData"], 2000]; noise = Point[RandomReal[{-.1, .2}, {10000, 3}]];
In[6]:=
Click for copyable input
Manipulate[ Graphics3D[{Point[bunny], Style[noise, ClipPlanes -> Dynamic[InfinitePlane[{{0, 0, z}, {1, 0, z}, {0, 1, z}}]]]}, PlotRange -> {{-.1, .1}, {-0.1, .1}, {0, 0.2}}], {z, 0, 0.2}]
動画を開始
動画を中止

関連する例

de en es fr ko pt-br ru zh