{"id":44448081,"url":"https://github.com/takana671/terracedterrainmodel","last_synced_at":"2026-03-01T15:07:48.926Z","repository":{"id":307817774,"uuid":"1024951490","full_name":"taKana671/TerracedTerrainModel","owner":"taKana671","description":"A repository  to create a 3D model of spherical or flat terraced terrain","archived":false,"fork":false,"pushed_at":"2026-01-20T14:29:01.000Z","size":81,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-20T22:52:27.341Z","etag":null,"topics":["meandering","noise-algorithms","panda3d","python3","terrain-generation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taKana671.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-23T13:48:21.000Z","updated_at":"2026-01-20T14:29:21.000Z","dependencies_parsed_at":"2025-08-26T21:41:57.625Z","dependency_job_id":"4978d250-b004-4ae3-8720-9bdc5a0cb392","html_url":"https://github.com/taKana671/TerracedTerrainModel","commit_stats":null,"previous_names":["takana671/terracedterrain","takana671/terracedterrainmodel"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/taKana671/TerracedTerrainModel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taKana671%2FTerracedTerrainModel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taKana671%2FTerracedTerrainModel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taKana671%2FTerracedTerrainModel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taKana671%2FTerracedTerrainModel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taKana671","download_url":"https://codeload.github.com/taKana671/TerracedTerrainModel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taKana671%2FTerracedTerrainModel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29371395,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T08:51:36.827Z","status":"ssl_error","status_checked_at":"2026-02-12T08:51:26.849Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["meandering","noise-algorithms","panda3d","python3","terrain-generation"],"created_at":"2026-02-12T16:01:32.401Z","updated_at":"2026-02-12T16:01:34.098Z","avatar_url":"https://github.com/taKana671.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TerracedTerrainModel\n\nThis repository uses the meandering triangles algorithm to create a 3D model of spherical or flat terraced terrain. \nFor spherical terrain, a base sphere is created by repeatedly subdividing each face of the cube into triangles and normalizing the distance from the center to each vertex. For flat terrain, a ground is created by repeatedly dividing a polygon into triangles.\nAnd noise such as simplex and cellular is used to calculate the height of each vertex. \nThen, the meandering triangles algorithm is used to form a staircase-like terrain.\nThe terrain is colored by setting color information directly to the vertices.\nIn addition, by running `terraced_terrain_editor.py`, you can create a 3D model while checking how the terrain changes depending on the parameters.\n\u003cbr/\u003e\u003cbr/\u003e\n\n\u003cimg width=\"985\" height=\"678\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/f9554fae-68ef-46ca-b633-55b7da3addb7\" /\u003e\n\u003cimg width=\"990\" height=\"688\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/6ebe960b-382e-4df1-aee9-a740138969dc\" /\u003e\n\n# References\n\nThe meandering triangles algorithm is based on below:\n* https://icospheric.com/blog/2016/07/17/making-terraced-terrain/\n* https://blog.lslabs.dev/posts/ttg\n  \n# Requirements\n\n* Panda3D 1.10.16\n* numpy 2.2.6\n* Cython 3.2.3\n* opencv-contrib-python 4.12.0.88\n* opencv-python 4.12.0.88\n  \n# Environment\n\n* Python 3.13\n* Windows11\n* Ubuntu 24.04.3\n\n# Usage\n\n### Clone this repository with submodule.\n```\ngit clone --recursive https://github.com/taKana671/TerracedTerrainModel.git\n```\n\n### Build cython code.\n\nIf cytnon code is not built, noise is calculated using python code.\n```\ncd TerracedTerrainModel\npython setup.py build_ext --inplace\n```\n\nIf the error like \"ModuleNotFoundError: No module named ‘distutils’\" occurs, install the setuptools.\n```\npip install setuptools\n```\n\n### Code sample\n\nCreate an instance of SphericalTerracedTerrain or FlatTerracedTerrain and call the create method to return the panda3D's NodePath of the terrain's 3D model. \n\n```\nfrom terraced_terrain.spherical_terraced_terrain import SphericalTerracedTerrain\n\ngenerator = SphericalTerracedTerrain.from_simplex()     # SimplexNoise is specified.\n# generator = SphericalTerracedTerrain.from_cellular()  # CellularNoise is specified.\n# generator = SphericalTerracedTerrain.from_perlin()    # PerlinNoise is specified.\n\nmodel = generator.create()\n```\n\n### Usage of terraced_terrain_editor.py\n\nRun terraced_terrain_editor.py and select the terrain type(Flat or Sphere), noise and theme. \nIf you want to change the parameters, edit the values in the entry boxes and click the [Reflet Changes] button.\n\n```\npython terraced_terrain_editor.py\n```\n\n\u003cimg width=\"1195\" height=\"623\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/d312c6db-cb1a-4d30-94d5-4a5a7c98e437\" /\u003e\n\n\n### Parameters\n\n* _noise: func_\n  * Function that generates noise.\n\n* _noise_scale: float_\n  * The smaller this value is, the more sparse the noise becomes.\n    \n* _segs_s: int_\n  * Only for flat terraced terrain.\n  * The number of vertices in the polygon that forms the ground; minimum is 3; defalut is 5.\n\n* _radius: float_\n  * Only for flat terraced terrain.\n  * Length from the center of the polygon forming the ground to each vertex; default is 3.\n\n* _terrace_scale: float_\n  * Only for spherical terraced terrain.\n  * Scale of sphere.\n\n* _max_depth: int_\n  * The number of times that triangles are further divided into triangles.\n\n* _octaves: int_\n  * The number of times to apply the noise algorithm. Each iteration represent an octave.\n\n* _amplitude: float_\n  * Noise strength.\n\n* _frequency: float_\n  * Basic frequency of terrain.\n\n* _persistence: float_\n  * At the end of each iteration, the amplitude is decreased by multiplying itself by persistence, less than 1.\n\n* _lacunarity: float_\n  * At the end of each iteration, the frequency is increased by multiplying itself by lacunarity, greater than 1.\n\n* _theme: str_\n  * one of \"mountain\", \"snow\" and \"desert\".\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakana671%2Fterracedterrainmodel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftakana671%2Fterracedterrainmodel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakana671%2Fterracedterrainmodel/lists"}