# trivial example with a single triangle positioned cp = CreasePattern(n_steps = 3) cp.nodes = [[ 0, 0, 0 ], [ 1, 0, 0 ], [ 0.5, -0.5, 0 ], [ 0.5, 0.5, 0], ] cp.crease_lines = [[ 0, 2 ], [ 2, 1 ], [ 0, 3 ], [ 3, 1 ], [ 2, 3]] cp.facets = [[0, 3, 2], [1, 2, 3]] cp.cnstr_lhs = [[(0, 0, 1.0)], [(0, 1, 1.0)], [(0, 2, 1.0)], [(1, 1, 1.0)], [(1, 2, 1.0)], ] cp.cnstr_rhs = [0.0, 0.0, 0.0, 0.0, 0.0, ] cp.tf_lst = [[caf, [2, 3]], ] x0 = np.zeros((cp.n_dofs), dtype = float)
cp.crease_lines = [[ 0, 2 ], [ 2, 1 ], [ 0, 3 ], [ 3, 1 ], [ 2, 3], [1, 4], [3, 4], [1, 5], [4, 5], [0, 6], [3, 6]] cp.facets = [[0, 3, 2], [1, 2, 3], [1, 3, 4], [1, 4, 5], [0, 3, 6]] cp.cnstr_lhs = [[(0, 0, 1.0)], [(0, 1, 1.0)], [(0, 2, 1.0)], # [(1, 1, 1.0)], # [(1, 2, 1.0)], ] cp.cnstr_rhs = [0.0, 0.0, 0.0, ]# 0, 0, 0, ] cp.tf_lst = [(caf, [1, 2, 3, 4, 5, 6])] x0 = np.zeros((cp.n_dofs), dtype = float)
caf = CnstrTargetFace( # F=[r_, s_, 0.01 + t_ * (r_ ** 2 * s_ ** 2 + 0.2 * r_)] F=[r_, s_, t_] ) # trivial example with a single triangle positioned cp = CreasePattern(n_steps=1) if False: cp.nodes = [[0, 0, 0], [1, 0, 0], [0.5, 0.5, 0]] cp.crease_lines = [[0, 1], [1, 2], [2, 0]] cp.facets = [[0, 1, 2]] else: cp.nodes = [[0, 0, 0], [1, 0, 0], [1, 1, 0], [0, 1, 0], [0.5, 0.5, 0]] cp.crease_lines = [[0, 1], [1, 2], [3, 0], [0, 4], [1, 4], [2, 4], [3, 4]] cp.facets = [[0, 1, 4], [1, 2, 4], [4, 3, 0]] cp.tf_lst = [(caf, [0, 1, 4])] cp.cnstr_lhs = [ [(0, 0, 1.0)], [(0, 1, 1.0)], # [(1, 1, 1.0)], # [(1, 2, 1.0)], ] cp.cnstr_rhs = [0.0, 0.0] # , 0.0, ]# 0, 0, 0, ]