• R/O
  • SSH

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

File Info

Rev. 5bf6abb2c1d8bd17c6723d58b792f8f756b17744
Größe 524 Bytes
Zeit 2009-01-29 02:09:19
Autor iselllo
Log Message

I added a simple example showing how one can make a 3D plot of a scalar using numerical data on a
non-regular grid and performing an interpolation.

Content

#! /usr/bin/env python
import numpy as np
from enthought.mayavi import mlab

#generate some artificial data.

L=4.

x=np.random.uniform(0.0,L, 10000 )

y=np.random.uniform(0.0,L,10000 )

z=np.random.uniform(0.0,L,10000 )
#z=np.linspace(0,0.001,10000 )


s=np.random.normal(0.,100.,10000)

mlab.clf()

print "x is, ", x


src = mlab.pipeline.scalar_scatter(x, y, z, s)


field = mlab.pipeline.delaunay3d(src)


mlab.pipeline.iso_surface(field)

#mlab.pipeline.scalar_cut_plane(field)

mlab.show()





print "So far so good"