{"id":50732363,"url":"https://github.com/pepijn-devries/opensimplex2","last_synced_at":"2026-06-10T10:01:06.099Z","repository":{"id":343582630,"uuid":"1178078299","full_name":"pepijn-devries/opensimplex2","owner":"pepijn-devries","description":"R package to create n-dimensional open simplex noise","archived":false,"fork":false,"pushed_at":"2026-03-26T09:27:36.000Z","size":5090,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-26T19:37:40.804Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pepijn-devries.github.io/opensimplex2/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pepijn-devries.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2026-03-10T17:02:10.000Z","updated_at":"2026-03-26T09:25:28.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pepijn-devries/opensimplex2","commit_stats":null,"previous_names":["pepijn-devries/opensimplex2"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pepijn-devries/opensimplex2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepijn-devries%2Fopensimplex2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepijn-devries%2Fopensimplex2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepijn-devries%2Fopensimplex2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepijn-devries%2Fopensimplex2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pepijn-devries","download_url":"https://codeload.github.com/pepijn-devries/opensimplex2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepijn-devries%2Fopensimplex2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34146870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-06-10T10:01:05.323Z","updated_at":"2026-06-10T10:01:06.091Z","avatar_url":"https://github.com/pepijn-devries.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"400px\"\n)\nknitr::knit_hooks$set(fullbleed = function(before, options, envir) {\n  if (before) {\n    par(mar = c(0,0,0,0), oma = c(0,0,0,0))\n  }\n})\nlibrary(ragg)\nlibrary(gifski)\n```\n\n## opensimplex2\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/pepijn-devries/opensimplex2/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/pepijn-devries/opensimplex2/actions/workflows/R-CMD-check.yaml)\n![cranlogs](https://cranlogs.r-pkg.org/badges/opensimplex2)\n[![version](https://www.r-pkg.org/badges/version/opensimplex2)](https://CRAN.R-project.org/package=opensimplex2)\n[![cran checks](https://badges.cranchecks.info/worst/opensimplex2.svg)](https://cran.r-project.org/web/checks/check_results_opensimplex2.html)\n[![opensimplex2 status badge](https://pepijn-devries.r-universe.dev/badges/opensimplex2)](https://pepijn-devries.r-universe.dev/opensimplex2)\n[![Codecov test coverage](https://codecov.io/gh/pepijn-devries/opensimplex2/graph/badge.svg)](https://app.codecov.io/gh/pepijn-devries/opensimplex2)\n\u003c!-- badges: end --\u003e\n\n\u003ca href=\"https://pepijn-devries.github.io\"\u003e\u003cimg src=\"https://github.com/pepijn-devries/opensimplex2/blob/main/man/figures/logo.gif?raw=true\" align=\"right\" width=\"120\" height=\"139\" alt=\"opensimplex2 website\" /\u003e\u003c/a\u003e\n\nThis package provides a high-performance implementation of OpenSimplex2,\nthe successor to the original OpenSimplex noise. It is designed to produce\nsmooth, organic-looking procedural content with fewer directional artefacts\n(streaking) than traditional Perlin noise.\n\n## Installation\n\nInstall CRAN release:\n\n``` {r install-cran, eval=FALSE}\ninstall.packages(\"opensimplex2\")\n```\n\nInstall latest developmental version from R-Universe:\n\n``` {r install, eval=FALSE}\ninstall.packages(\"opensimplex2\", repos = c('https://pepijn-devries.r-universe.dev', 'https://cloud.r-project.org'))\n```\n\n## Example\n\nThis library offers two primary methods for generating noise:\n\n### N-Dimensional Noise Arrays\n\nGenerate a complete grid of noise values in a single call. This is ideal\nfor pre-computing textures, terrain heightmaps, or static displacement maps.\nThere are two variants available:\n\n * OpenSimplex2F (Faster): Optimized for speed, providing a classic\n   OpenSimplex look.\n * OpenSimplex2S (Smoother): A \"SuperSimplex\" variant that prioritizes\n   higher visual quality and reduced grid-alignment artefacts at a slight\n   performance cost.\n\n```{r example-array, fig.width=10, fig.height=10, fig.dpi=10, out.width=\"200px\", animation.hook='gifski', interval=0.05, message=FALSE, fullbleed=TRUE}\nlibrary(opensimplex2)\n## Set seed to obtain reproducible data\nset.seed(0)\n## Create simplex noise in 3 dimensions:\narr \u003c- opensimplex_noise(\"S\", 100, 100, 100, frequency = 1.5)\n\n## Plot 2D noise while looping the third dimension:\nfor (i in 1:100) {\n  image(arr[,,i],\n        axes = FALSE, ann = FALSE, xaxs = \"i\", yaxs = \"i\",\n        zlim = c(-1, +1), col = hcl.colors(palette = \"Terrain\", 10))\n}\n```\n\n### Continuous Gradient Fields\nBeyond static arrays, the library provides a sampleable gradient field.\nInstead of just returning a single noise value, this allows you to query\nthe vector gradient at any precise n-dimensional coordinate.\nThis is demonstrated in the example below, where the noise is\nsampled across the surface of a sphere.\n\n```{r example-sample}\n## Let's create a raster of polar coordinate:\nr \u003c- .5\nlon \u003c- seq(-180, 180)\nlat \u003c- seq(-90, 90)\ncoords \u003c-\n  expand.grid(\n    lon = lon,\n    lat = lat)\n## Now convert the polar coordinates to Cartesian coordinates:\ncoords$x \u003c- r*cos(pi*2*coords$lat/360)*sin(pi*2*coords$lon/360)\ncoords$y \u003c- r*cos(pi*2*coords$lat/360)*cos(pi*2*coords$lon/360)\ncoords$z \u003c- r*sin(pi*2*coords$lat/360)\n\n## Set seed to make the example reproducible:\nset.seed(0)\n\n## Let's create a noise gradient 3-dimensional space:\nspace \u003c- opensimplex_space(\"S\", 3L)\n\n## Sample the space at the coordinates on the sphere:\ncoords$value \u003c- space$sample(coords$x, coords$y, coords$z)\n\n## Plot the sampled matrix:\nmat \u003c- matrix(coords$value, length(lon), length(lat))\nimage(x= lon, y = lat, z = mat)\n```\n\nUnlike an array, the field is mathematically continuous. You can sample at\nany scale or offset without losing precision. This is useful for physics\nsimulations (like flow fields or wind), surface normals for lighting, or\ncalculating the \"slope\" of procedural terrain for erosion and placement logic.\n\n## Acknowledgements\n\nThis package wraps the C-code by [Marco Ciaramella](https://github.com/MarcoCiaramella/opensimplex2),\nwhich in turn is a translation of the original Java code by\n[KdotJPG](https://github.com/KdotJPG/OpenSimplex2).\n\n## Code of Conduct\n\nPlease note that the opensimplex2 project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpepijn-devries%2Fopensimplex2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpepijn-devries%2Fopensimplex2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpepijn-devries%2Fopensimplex2/lists"}