-í ½?csEdkZdkTd„Z d„Z:eeeƒdS(N(s*cs>|djp ||jo dSn||dSdS(Nif0.0i(sindexsarrayLensverts(svertssindexsarrayLen((s ./terrain.pys getVertHeights csÊ g}|} |} ||} ||}||} x|t |ƒD]k} | | 7} |} xIt |ƒD]8}| |7} |i| | tid|ƒgƒq‡WqXW |}!xét | ƒD!]Ø} "t|| | ƒ}$|t|| d| ƒ7}&|t|| d| ƒ7}(|t|| || ƒ7}*|t|| || ƒ7}+|d:},||| d<-t|| d|| d|| dƒqäW0xýt || ƒD0]é} 1| d|djoË2t|| d|| d|| d4|| dd|| dd|| dd5|| |dd|| |dd|| |dd6|| |d|| |d|| |dƒ nqÖWdS(s%creates bumpy terrain origin X,Y specify where the southwest corner of the terrain should go width and depth specify how big the terrain should be maxHeight determines the upper bound for the random height values numVerts Wide,Deep specify how many verts should be used to form the terrainf0.0if5.0iiN(svertssoriginXscurrXsoriginYscurrYswidths numVertsWidesincrWsdepths numVertsDeepsincrDsarrayLensrangesisjsappendsrandomsuniforms maxHeightsnewVertss getVertHeights avgHeights vert_insertspoly_insert_quad(soriginXsoriginYswidthsdepths maxHeights numVertsWides numVertsDeeps avgHeightsnewVertsscurrYscurrXsincrWsarrayLensisjsincrDsverts((s ./terrain.pysgenerateTerrain sB           -   / '0<(srandoms pykludge3ds getVertHeightsgenerateTerrainsregister_functions__name__(srandoms getVertHeightsgenerateTerrain((s ./terrain.pys?s   0