Skip to content

Commit

Permalink
Visualization scripts input files path update
Browse files Browse the repository at this point in the history
  • Loading branch information
Onur R. Bingol committed Jan 20, 2018
1 parent f410490 commit 70d1c5a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions visualization/mpl_scatter_wframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
os.chdir(os.path.dirname(os.path.realpath(__file__)))

# Read surface and control points, @ref: https://stackoverflow.com/a/13550615
cpgrid = np.genfromtxt('ctrlpts03_orig.csv', delimiter=',', skip_header=1, names=['x', 'y', 'z'])
surf = np.genfromtxt('surfpts03_orig.csv', delimiter=',', skip_header=1, names=['x', 'y', 'z'])
cpgrid = np.genfromtxt('../surface/ctrlpts03_orig.csv', delimiter=',', skip_header=1, names=['x', 'y', 'z'])
surf = np.genfromtxt('../surface/surfpts03_orig.csv', delimiter=',', skip_header=1, names=['x', 'y', 'z'])

# Reshape surface points array for plotting, @ref: https://stackoverflow.com/a/21352257
cols = surf['x'].shape[0]
Expand Down
4 changes: 2 additions & 2 deletions visualization/mpl_wframe_trisurf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
os.chdir(os.path.dirname(os.path.realpath(__file__)))

# Read surface and control points, @ref: https://stackoverflow.com/a/13550615
cpgrid = np.genfromtxt('ctrlpts02_orig.csv', delimiter=',', skip_header=1, names=['x', 'y', 'z'])
surf = np.genfromtxt('surfpts02_orig.csv', delimiter=',', skip_header=1, names=['x', 'y', 'z'])
cpgrid = np.genfromtxt('../surface/ctrlpts02_orig.csv', delimiter=',', skip_header=1, names=['x', 'y', 'z'])
surf = np.genfromtxt('../surface/surfpts02_orig.csv', delimiter=',', skip_header=1, names=['x', 'y', 'z'])

# Arrange control points grid for plotting, @ref: https://stackoverflow.com/a/21352257
cols = cpgrid['x'].shape[0]
Expand Down
8 changes: 6 additions & 2 deletions visualization/mpl_wframe_wframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@
* NumPy v1.13.3
* Matplotlib v2.1.0
"""
import os
import numpy as np
import matplotlib
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt

# Fix file path
os.chdir(os.path.dirname(os.path.realpath(__file__)))

# Read surface and control points, @ref: https://stackoverflow.com/a/13550615
cpgrid = np.genfromtxt('ctrlpts01_orig.csv', delimiter=',', skip_header=1, names=['x', 'y', 'z'])
surf = np.genfromtxt('surfpts01_orig.csv', delimiter=',', skip_header=1, names=['x', 'y', 'z'])
cpgrid = np.genfromtxt('../surface/ctrlpts01_orig.csv', delimiter=',', skip_header=1, names=['x', 'y', 'z'])
surf = np.genfromtxt('../surface/surfpts01_orig.csv', delimiter=',', skip_header=1, names=['x', 'y', 'z'])

# Arrange control points grid for plotting, @ref: https://stackoverflow.com/a/21352257
Xc = cpgrid['x'].reshape(-1, cpgrid['x'].shape[0])
Expand Down

0 comments on commit 70d1c5a

Please sign in to comment.