本文整理汇总了Python中oricrete.folding.CreasePattern.get_cnstr_dR_ff方法的典型用法代码示例。如果您正苦于以下问题:Python CreasePattern.get_cnstr_dR_ff方法的具体用法?Python CreasePattern.get_cnstr_dR_ff怎么用?Python CreasePattern.get_cnstr_dR_ff使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类oricrete.folding.CreasePattern
的用法示例。
在下文中一共展示了CreasePattern.get_cnstr_dR_ff方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: CreasePattern
# 需要导入模块: from oricrete.folding import CreasePattern [as 别名]
# 或者: from oricrete.folding.CreasePattern import get_cnstr_dR_ff [as 别名]
# under the conditions described in the aforementioned license. The license
# is also available online at http://www.simvisage.com/licenses/BSD.txt
#
# Thanks for using Simvisage open source!
#
# Created on Dec 20, 2011 by: rch
# own Modules
from oricrete.folding import \
CreasePattern, FF, x_, y_, z_, t_ , \
CreasePatternView
import numpy as np
if __name__ == '__main__':
cp = CreasePattern(nodes = [[0, 0, 0]], n_steps = 10)
cp.cnstr_lst = [(FF(Rf = z_ - x_ ** 2 - 0), [0]),
(FF(Rf = y_ - x_ ** 2 - 0), [0]),
(FF(Rf = x_ - t_ - 0), [0])]
X0 = np.zeros((cp.n_dofs,), dtype = float)
print 'R_ff', cp.get_cnstr_R_ff(X0, 1)
print 'dR_ff', cp.get_cnstr_dR_ff(X0, 0)
print 'X ff final', cp.solve_ff(X0)
cpv = CreasePatternView(data = cp, show_cnstr = True)
cpv.configure_traits()