MayaVi

MayaViはPythonで書かれた科学データビジュアライザで、 Visualization Toolkit (VTK) を使用し、 Tkinter経由でGUIを提供する。MayaVi…

MayaVi
Mayavi
A screenshot of the main window, with an example visualization
開発元 Enthought
初版 2019年 (7年前) (2019)
最新版
4.8.2 / 2024年5月24日 (2年前) (2024-05-24)
リポジトリ ウィキデータを編集
プログラミング
言語
Python, VTK, wxPython/Qt
対応OS GNU/Linux, Mac OS X, Microsoft Windows
対応言語 英語
サポート状況 Active
種別 データ可視化
ライセンス BSD License
公式サイト docs.enthought.com/mayavi/mayavi/
テンプレートを表示

MayaViPythonで書かれた科学データビジュアライザで、 Visualization Toolkit (VTK) を使用し、 Tkinter経由でGUIを提供する。MayaViはPrabhu Ramachandranによって開発され、 BSD Licenseの下で無料で配布されている。 クロスプラットフォームであり、PythonとVTKの両方が利用可能なすべてのプラットフォームで動作する(ほとんどすべてのUNIXMac OS X、またはWindows )。 MayaViは単一の名前として発音される。 "Ma-ya-vee"は、サンスクリットで「魔法」を意味する。MayaViのコードは、MayaテキストエディタViとは関係ない[1]

Mayavi2と呼ばれるMayaViの最新バージョンは、科学的なPythonプログラムのEnthoughtスイートのコンポーネントである。オリジナルのMayaViとの違いは、インタラクティブなプログラムだけでなく、Pythonでの3Dプロット用の再利用可能なコンポーネントの作成にも重点を置いている点である。公開されるインタフェースとAPIはオリジナルのMayaViとは若干異なるが、より多くの機能が追加されている[2][3]

主な機能

  • 計算グリッド、スカラー、ベクトル、テンソルデータの視覚化。
  • 使いやすいGUI
  • 他のPythonプログラムからPythonモジュールとしてインポート、Pythonインタプリタからスクリプトを作成。
  • テクスチャおよびレイキャストマッパによるデータのボリューム可視化。
  • VTKデータ形式を使用する任意のVTKデータセットのサポート
  • PLOT3D データのサポート
  • 複数のデータセットを同時に使用可能
  • VTKパイプライン内のオブジェクトを参照および編集できるパイプラインブラウザ
  • シンプルなVRMLおよび3D Studioシーンのインポート
  • カスタム・モジュールおよびデータ・フィルタの追加
  • PostScriptファイル、PPM/BMP/TIFF/JPEG/PNG画像、Open InventorGeomview OOGLVRMLファイル、Wavefront .obj file、またはRenderMan RIBファイルの出力

球面調和関数

球面調和関数
from numpy import linspace, meshgrid, array, sin, cos, pi, abs
from scipy.special import sph_harm
from mayavi import mlab

theta_1d = linspace(0,   pi,  91) 
phi_1d   = linspace(0, 2*pi, 181)

theta_2d, phi_2d = meshgrid(theta_1d, phi_1d)
xyz_2d = array([sin(theta_2d) * sin(phi_2d),
                sin(theta_2d) * cos(phi_2d),
                cos(theta_2d)]) 
l = 3
m = 0

Y_lm = sph_harm(m, l, phi_2d, theta_2d)
r = abs(Y_lm.real) * xyz_2d

mlab.figure(size=(700, 830))
mlab.mesh(r[0], r[1], r[2], scalars=Y_lm.real, colormap="cool")
mlab.view(azimuth=0, elevation=75, distance=2.4, roll=-50)
mlab.savefig("Y_%i_%i.jpg" % (l, m))
mlab.show()

参考文献

  1. ^ MayaVi project page”. SourceForge. 2016年5月4日閲覧。
  2. ^ MayaVi2 wiki page”. 2016年5月4日閲覧。
  3. ^ MayaVi2 project page”. 2018年4月13日閲覧。

外部リンク

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.