OLD | NEW |
(Empty) | |
| 1 # ##### BEGIN GPL LICENSE BLOCK ##### |
| 2 # |
| 3 # This program is free software; you can redistribute it and/or |
| 4 # modify it under the terms of the GNU General Public License |
| 5 # as published by the Free Software Foundation; either version 2 |
| 6 # of the License, or (at your option) any later version. |
| 7 # |
| 8 # This program is distributed in the hope that it will be useful, |
| 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 # GNU General Public License for more details. |
| 12 # |
| 13 # You should have received a copy of the GNU General Public License |
| 14 # along with this program; if not, write to the Free Software Foundation, |
| 15 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 16 # |
| 17 # ##### END GPL LICENSE BLOCK ##### |
| 18 |
| 19 # Filename : blueprint_ellipses.py |
| 20 # Author : Emmanuel Turquin |
| 21 # Date : 04/08/2005 |
| 22 # Purpose : Produces a blueprint using elliptic contour strokes |
| 23 |
| 24 from Freestyle import ChainPredicateIterator, ConstantThicknessShader, ContourUP
1D, IncreasingColorShader, \ |
| 25 Operators, QuantitativeInvisibilityUP1D, SameShapeIdBP1D, TextureAssignerSha
der, TrueUP1D |
| 26 from PredicatesU1D import pyHigherLengthUP1D |
| 27 from logical_operators import AndUP1D, NotUP1D |
| 28 from shaders import pyBluePrintEllipsesShader, pyPerlinNoise1DShader |
| 29 |
| 30 upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ContourUP1D()) |
| 31 bpred = SameShapeIdBP1D() |
| 32 Operators.select(upred) |
| 33 Operators.bidirectional_chain(ChainPredicateIterator(upred, bpred), NotUP1D(upre
d)) |
| 34 Operators.select(pyHigherLengthUP1D(200)) |
| 35 shaders_list = [ |
| 36 ConstantThicknessShader(5), |
| 37 pyBluePrintEllipsesShader(3), |
| 38 pyPerlinNoise1DShader(0.1, 10, 8), |
| 39 TextureAssignerShader(4), |
| 40 IncreasingColorShader(0.6, 0.3, 0.3, 0.7, 0.3, 0.3, 0.3, 0.1), |
| 41 ] |
| 42 Operators.create(TrueUP1D(), shaders_list) |
OLD | NEW |