pyvista.SphereSource

目次

pyvista.SphereSource#

class SphereSource(
radius: float = 0.5,
center: VectorLike[float] | None = None,
theta_resolution: int = 30,
phi_resolution: int = 30,
start_theta: float = 0.0,
end_theta: float = 360.0,
start_phi: float = 0.0,
end_phi: float = 180.0,
)[ソース]#

球体ソースアルゴリズムクラス

Added in version 0.44.0.

パラメータ:
radiusfloat, default: 0.5

球の半径.

centersequence[float], default: (0.0, 0.0, 0.0)

[x, y, z] の中心座標ベクトル.

theta_resolutionint, default: 30

方位角方向の点の数を設定します( start_theta から end_theta までの範囲).

phi_resolutionint, default: 30

極方向の点の数を設定します( start_phi から end_phi まで).

start_thetafloat, default: 0.0

度単位の方位開始角度 [0, 360]

end_thetafloat, default: 360.0

度単位の方位終了角度 [0, 360]

start_phifloat, default: 0.0

度単位の極開始角度 [0, 180]

end_phifloat, default: 180.0

度単位の極終了角度 [0, 180]

参考

pyvista.Icosphere

正20面体の投影から作られた球体.

pyvista.SolidSphere

3D空間を満たす球体.

デフォルトのパラメータで球体を作成します.

>>> import pyvista as pv
>>> sphere = pv.SphereSource()
>>> sphere.output.plot(show_edges=True)
../../../_images/pyvista-SphereSource-1_00_00.png

end_theta を設定して,1/4の球体を作ります.

>>> sphere = pv.SphereSource(end_theta=90)
>>> out = sphere.output.plot(show_edges=True)
../../../_images/pyvista-SphereSource-1_01_00.png

end_phi を設定して,1/2の球体を作ります.

>>> sphere = pv.SphereSource(end_phi=90)
>>> out = sphere.output.plot(show_edges=True)
../../../_images/pyvista-SphereSource-1_02_00.png

メソッド

アトリビュート

SphereSource.center

[x, y, z] の中心を取得します.

SphereSource.end_phi

終了極角を度単位で取得 [0, 360]

SphereSource.end_theta

終了角度を度単位で取得 [0, 360]

SphereSource.output

このアルゴリズムのポートの出力データオブジェクトを取得します.

SphereSource.phi_resolution

極方向の点の数を取得します。

SphereSource.radius

球の半径を取得。

SphereSource.start_phi

開始極角を度単位で取得 [0, 360]

SphereSource.start_theta

開始角度を度単位で取得 [0, 360]

SphereSource.theta_resolution

方位角方向の点の数を取得します。