Skip to content

Commit

Permalink
modify comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yfeng95 committed Jul 19, 2018
1 parent 94e93a1 commit 54e2c9f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion face3d/mesh/vis.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from skimage import measure
from mpl_toolkits.mplot3d import Axes3D

# TODO
def plot_mesh(vertices, triangles, subplot = [1,1,1], title = 'mesh', el = 90, az = -90, lwdt=.1, dist = 6, color = "grey"):
'''
plot the mesh
Expand All @@ -21,3 +20,5 @@ def plot_mesh(vertices, triangles, subplot = [1,1,1], title = 'mesh', el = 90, a
ax.view_init(elev = el, azim = az)
ax.dist = dist
plt.title(title)

### -------------- Todo: use vtk to visualize mesh? or visvis? or VisPy?
8 changes: 4 additions & 4 deletions face3d/mesh_cython/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ def rasterize_triangles(vertices, triangles, h, w):
h, w)

def render_colors(vertices, triangles, colors, h, w, c = 3, BG = None):
''' render mesh with colors by z buffer
''' render mesh with colors
Args:
vertices: [nver, 3]
triangles: [ntri, 3]
colors: [nver, 3]
h: height
w: width
c: channel
BG: back ground image
BG: background image
Returns:
image: [h, w, c]. rendered image.
image: [h, w, c]. rendered image./rendering.
'''

# initial
Expand All @@ -83,7 +83,7 @@ def render_colors(vertices, triangles, colors, h, w, c = 3, BG = None):


def render_texture(vertices, triangles, texture, tex_coords, tex_triangles, h, w, c = 3, mapping_type = 'nearest', BG = None):
''' render mesh with texture map by z buffer
''' render mesh with texture map
Args:
vertices: [3, nver]
triangles: [3, ntri]
Expand Down

0 comments on commit 54e2c9f

Please sign in to comment.