Skip to content

Commit

Permalink
Added none colormap option
Browse files Browse the repository at this point in the history
  • Loading branch information
rjc8237 committed Aug 30, 2024
1 parent 201db0b commit ebd220b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions py/optimize_impl/energies.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ def get_vertex_energy(
uv_embed[:,:2] = uv[:,:2]

# Get energy
if (colormap == 'none'):
energy = 0.25 * np.ones(len(v))
if (colormap == 'scale_factors'):
energy = best_fit_conformal_vf(v, f, uv_embed, fuv)
if (colormap == 'sym_dirichlet'):
Expand Down Expand Up @@ -293,6 +295,8 @@ def get_face_energy(
energy = arap_vf(v, f, uv_embed, fuv)
if (colormap == 'quadratic_sym_dirichlet'):
energy = quadratic_sym_dirichlet_vf(v, f, uv_embed, fuv)
if (colormap == 'none'):
energy = 0.25 * np.ones(len(f))

# Optionally use face weighting
if (use_face_weight):
Expand Down
4 changes: 2 additions & 2 deletions scripts/optimization_scripts/pipeline.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os, sys
script_dir = os.path.dirname(__file__)
module_dir = os.path.join(script_dir, '..', 'py')
module_dir = os.path.join(script_dir, '..', '..', 'py')
sys.path.append(module_dir)

import numpy as np
Expand Down Expand Up @@ -100,4 +100,4 @@
args = script_util.overwrite_args(args_default, args_spec)

# Run method
method_func(args)
method_func(args)

0 comments on commit ebd220b

Please sign in to comment.