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.
- パラメータ:
- radius
float
, default: 0.5 球の半径.
- centersequence[
float
], default: (0.0, 0.0, 0.0) [x, y, z]
の中心座標ベクトル.- theta_resolution
int
, default: 30 方位角方向の点の数を設定します(
start_theta
からend_theta
までの範囲).- phi_resolution
int
, default: 30 極方向の点の数を設定します(
start_phi
からend_phi
まで).- start_theta
float
, default: 0.0 度単位の方位開始角度
[0, 360]
.- end_theta
float
, default: 360.0 度単位の方位終了角度
[0, 360]
.- start_phi
float
, default: 0.0 度単位の極開始角度
[0, 180]
.- end_phi
float
, default: 180.0 度単位の極終了角度
[0, 180]
.
- radius
参考
pyvista.Icosphere
正20面体の投影から作られた球体.
pyvista.SolidSphere
3D空間を満たす球体.
例
デフォルトのパラメータで球体を作成します.
>>> import pyvista as pv >>> sphere = pv.SphereSource() >>> sphere.output.plot(show_edges=True)
end_theta
を設定して,1/4の球体を作ります.>>> sphere = pv.SphereSource(end_theta=90) >>> out = sphere.output.plot(show_edges=True)
end_phi
を設定して,1/2の球体を作ります.>>> sphere = pv.SphereSource(end_phi=90) >>> out = sphere.output.plot(show_edges=True)
メソッド
アトリビュート
[x, y, z]
の中心を取得します.終了極角を度単位で取得
[0, 360]
.終了角度を度単位で取得
[0, 360]
.このアルゴリズムのポートの出力データオブジェクトを取得します.
極方向の点の数を取得します。
球の半径を取得。
開始極角を度単位で取得
[0, 360]
.開始角度を度単位で取得
[0, 360]
.方位角方向の点の数を取得します。