CodingTrain / CodingTrain/Suggestion-Box

[Challenge] Tileable 2D Noise (2D Polar Noise)

Offen
#1,374 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Challenge
Vorherrschende Sprache
Keine Sprachdaten
Sterne
570
Forks
85
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

# Challenge: Tileable 2D Noise (2D Polar Noise)

Hi @shiffman, after seeing your video about **polar noise** ([Coding Challenge #136.1: Polar Perlin Noise Loops](https://www.youtube.com/watch?v=ZI1dmHv3MeM)), where the end of a line matches the start, I've decided to make an Library to help making tileable noise that can be used to make seamless looping textures.

### Here's the link, and an example: [TileableNoise.js](https://github.com/DaviAMSilva/TileableNoise.js)
![example_simple](https://user-images.githubusercontent.com/53585493/63202597-d1288d80-c060-11e9-82f5-1a4669d38580.png)

So, I think this could make a awesome coding challenge, because most of the code can be copied over from that polar noise video, or even if you want, from my library, and this can really be useful for some people.

The technical part is really simple, you only need to make two circles from two angles given by the two Cartesian coordinates of the point you're calculating the noise. Then you can simply use the 4 coordinates of the 2 circles in a 4D noise space and voilà, you have tileable 2D noise. Unfortunately *you will need an 4D noise function to do that*.

### Here's an example code:
```
let angle1 = "Relative to x position";
let angle2 = "Relative to y position";

let X = r * cos(angle1);
let Y = r * sin(angle1);
let Z = r * cos(angle2);
let W = r * sin(angle2);

return noise4D(X, Y, Z, W);
```

**Btw, I love your videos.**

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Überprüfe zuerst die verlinkte Bibliothek TileableNoise.js und das referenzierte Video Polar Perlin Noise Loops. Definiere die Herausforderung rund um kachelbares 2D-Rauschen und verifiziere, dass ein ausführbares Beispiel mithilfe des beschriebenen Ansatzes mit 4D-Rauschen nahtlos wiederholende Texturen erzeugt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript
Bereich
computer-graphics
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.