def growZweig(self, cLtPBk): assert cLtPBk <= 1 if self.fGerm: self.becomeInact() dMnMx = self.dIA['dMinMax'] # draw a value for the length of this "Zweig" lenZw = Fkt.drawVRel(self.dLenZw, self.nKZw, self.sDirN, self.cM, dMnMx['LenZw'], dMnMx['NKZw'], self.dFAd['LenZw'], self.dITp['dDist']['NKZw']) # adjust the "Zweig" length according to the available light if self.dIA['lvlDbg'] > 0 and cLtPBk < 1: print('lenZw (before):', lenZw, '- current light propagated in block:', cLtPBk) lenZw *= cLtPBk if self.dIA['lvlDbg'] > 0: print('lenZw (after):', lenZw) # TODO - change if lenZw < 10: return 0 dInfo = { 'VertZ': self.cAnVZ, 'RelPZw': self.cAnRZ, 'RelPKt': self.pKR, 'LenZw': self.lenZ, 'AgeZw': 1, 'AgeBm': self.ageB } # draw a value for the number of "Knoten" on this "Zweig" nKZw = Fkt.drawDict(self.dITp, dInfo, dMnMx, 'dDist', 'NKZw', 'dNumNKZw', 'dBndAr', 'dCtWt', self.sDirN, self.cM) # # adjust the number of "Knoten" according to the available light # nKZw = max(1, round(nKZw*cLtPBk)) lFDstK = Fkt.drawLVRel(self.dFPKZw, nKZw, self.sDirN, self.cM, dMnMx['FctPKZw'], self.dITp['dDist']['NKZw']) return Zweig(self.dIA, self.dITp, self.cMk, self.dFAd, self.dFPEZw, self.dAnEPlr, self.dAnEAzm, self.IDKs, self.pathID, self.yrG, self.ageB, self.pKC, self.sDirN, self.vDirZw, self.vDir, self.cAnVZ, self.cAnRZ, lenZw, lFDstK)