Mercurial > ift6266
changeset 63:7949f46b03e0
Bug a propos de complexity=0 corrige
author | SylvainPL <sylvain.pannetier.lebeuf@umontreal.ca> |
---|---|
date | Tue, 09 Feb 2010 11:43:09 -0500 |
parents | bab98bb47616 |
children | 1afa95285b9c ab70fbca513c |
files | transformations/Rature.py |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/transformations/Rature.py Tue Feb 09 11:41:17 2010 -0500 +++ b/transformations/Rature.py Tue Feb 09 11:43:09 2010 -0500 @@ -45,10 +45,14 @@ self.orientation=1 else: self.orientation=2 - - self.largeur=min(32,max(1,int(numpy.ceil(complexity*5)*numpy.random.normal(1,float(complexity)/2)))) - self.clarte=min(1,max(0,complexity*numpy.random.normal(1,float(complexity)/2))) - self.faire=numpy.random.binomial(1,float(complexity)) + if float(complexity) > 0: + self.largeur=min(32,max(1,int(numpy.ceil(complexity*5)*numpy.random.normal(1,float(complexity)/2)))) + self.clarte=min(1,max(0,complexity*numpy.random.normal(1,float(complexity)/2))) + self.faire=numpy.random.binomial(1,float(complexity)) + else: + self.largeur=0 + self.clarte=0 + self.faire=0 #On ne fait rien !!! return self._get_current_parameters()