当前位置: 首页>>代码示例>>Python>>正文


Python Operators.recursive_split方法代码示例

本文整理汇总了Python中freestyle.types.Operators.recursive_split方法的典型用法代码示例。如果您正苦于以下问题:Python Operators.recursive_split方法的具体用法?Python Operators.recursive_split怎么用?Python Operators.recursive_split使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在freestyle.types.Operators的用法示例。


在下文中一共展示了Operators.recursive_split方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: NotUP1D

# 需要导入模块: from freestyle.types import Operators [as 别名]
# 或者: from freestyle.types.Operators import recursive_split [as 别名]
    ConstantThicknessShader,
    SamplingShader,
    TextureAssignerShader,
    TipRemoverShader,
    pyNonLinearVaryingThicknessShader,
    pySamplingShader,
    )
from freestyle.types import IntegrationType, Operators


Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))
## Splits strokes at points of highest 2D curavture 
## when there are too many abrupt turns in it
func = pyInverseCurvature2DAngleF0D()
Operators.recursive_split(func, pyParameterUP0D(0.2, 0.8), NotUP1D(pyHigherNumberOfTurnsUP1D(3, 0.5)), 2)
## Keeps only long enough strokes
Operators.select(pyHigherLengthUP1D(100))
## Sorts so as to draw the longest strokes first
## (this will be done using the causal density)
Operators.sort(pyLengthBP1D())
shaders_list = [
    pySamplingShader(10),
    BezierCurveShader(30),
    SamplingShader(50),
    ConstantThicknessShader(10),
    pyNonLinearVaryingThicknessShader(4, 25, 0.6),
    TextureAssignerShader(6),
    ConstantColorShader(0.2, 0.2, 0.2,1.0),
    TipRemoverShader(10),
    ]
开发者ID:BlueLabelStudio,项目名称:blender,代码行数:33,代码来源:japanese_bigbrush.py

示例2: lines

# 需要导入模块: from freestyle.types import Operators [as 别名]
# 或者: from freestyle.types.Operators import recursive_split [as 别名]
#  Author   : Stephane Grabli
#  Date     : 04/08/2005
#  Purpose  : Draws the visible lines (chaining follows same nature lines)
#             (most basic style module)

from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.functions import pyInverseCurvature2DAngleF0D
from freestyle.predicates import (
    NotUP1D,
    QuantitativeInvisibilityUP1D,
    TrueUP1D,
    pyHigherLengthUP1D,
    pyParameterUP0D,
    )
from freestyle.shaders import (
    ConstantThicknessShader,
    IncreasingColorShader,
    )
from freestyle.types import Operators


Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))
func = pyInverseCurvature2DAngleF0D()
Operators.recursive_split(func, pyParameterUP0D(0.4, 0.6), NotUP1D(pyHigherLengthUP1D(100)), 2)
shaders_list = [
    ConstantThicknessShader(10),
    IncreasingColorShader(1, 0, 0, 1, 0, 1, 0, 1),
    ]
Operators.create(TrueUP1D(), shaders_list)
开发者ID:Aligorith,项目名称:blender,代码行数:32,代码来源:split_at_highest_2d_curvatures.py


注:本文中的freestyle.types.Operators.recursive_split方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。