forked from charlesq34/frustum-pointnets
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6b0bf59
commit ae6e5b6
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#/bin/bash | ||
# Install Mayavi (scientific data visualization and plotting in Python) on Ubuntu | ||
# Ref: http://docs.enthought.com/mayavi/mayavi/installation.html | ||
sudo apt-get install python-vtk python-qt4 python-qt4-gl python-setuptools python-numpy python-configobj | ||
sudo pip install mayavi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import numpy | ||
from mayavi.mlab import * | ||
|
||
def test_plot3d(): | ||
"""Generates a pretty set of lines.""" | ||
n_mer, n_long = 6, 11 | ||
pi = numpy.pi | ||
dphi = pi / 1000.0 | ||
phi = numpy.arange(0.0, 2 * pi + 0.5 * dphi, dphi) | ||
mu = phi * n_mer | ||
x = numpy.cos(mu) * (1 + numpy.cos(n_long * mu / n_mer) * 0.5) | ||
y = numpy.sin(mu) * (1 + numpy.cos(n_long * mu / n_mer) * 0.5) | ||
z = numpy.sin(n_long * mu / n_mer) * 0.5 | ||
|
||
l = plot3d(x, y, z, numpy.sin(mu), tube_radius=0.025, colormap='Spectral') | ||
return l | ||
|
||
test_plot3d() | ||
raw_input() |