File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ To download the required libraries, we use a `deps.edn` file with the following
4343 generateme/fastmath {:mvn/version " 3.0.0-alpha4" }
4444 comb/comb {:mvn/version " 1.0.0" }
4545 }
46+ }
4647```
4748
4849We are going to import the following methods and namespaces:
@@ -480,7 +481,7 @@ This is achieved by determining the distance to each random point in all neighbo
480481:::
481482
482483
483- Here a 256 x256 Worley noise tensor is created.
484+ Here a 256 × 256 Worley noise tensor is created.
484485
485486
486487::: {.sourceClojure}
@@ -1001,7 +1002,7 @@ Now one can sample the Perlin noise by performing above computation for the cent
10011002:::
10021003
10031004
1004- Here a 256 x256 Perlin noise tensor is created.
1005+ Here a 256 × 256 Perlin noise tensor is created.
10051006
10061007
10071008::: {.sourceClojure}
@@ -1681,7 +1682,7 @@ We define a method to convert a Java buffer object to a floating point array.
16811682:::
16821683
16831684
1684- The following method reads texture data into a Java buffer and then converts it to a floating point array.
1685+ The following method copies texture data into a Java buffer and then converts it to a floating point array.
16851686
16861687
16871688::: {.sourceClojure}
Original file line number Diff line number Diff line change 4646; ; generateme/fastmath {:mvn/version "3.0.0-alpha4"}
4747; ; comb/comb {:mvn/version "1.0.0"}
4848; ; }
49+ ; ; }
4950; ; ```
5051; ;
5152; ; We are going to import the following methods and namespaces:
259260 (apply wrap-get random-points neighbour))))))
260261 :double ))))
261262
262- ; ; Here a 256x256 Worley noise tensor is created.
263+ ; ; Here a 256 × 256 Worley noise tensor is created.
263264(def worley (worley-noise (make-noise-params 256 8 2 )))
264265
265266; ; The values are inverted and normalised to be between 0 and 255.
501502 (perlin-sample params gradients center)))
502503 :double ))))
503504
504- ; ; Here a 256x256 Perlin noise tensor is created.
505+ ; ; Here a 256 × 256 Perlin noise tensor is created.
505506(def perlin (perlin-noise (make-noise-params 256 8 2 )))
506507
507508; ; The values are normalised to be between 0 and 255.
766767 (.flip buffer)
767768 result))
768769
769- ; ; The following method reads texture data into a Java buffer and then converts it to a floating point array.
770+ ; ; The following method copies texture data into a Java buffer and then converts it to a floating point array.
770771(defn read-texture-2d
771772 [texture width height]
772773 (let [buffer (BufferUtils/createFloatBuffer (* height width 4 ))]
You can’t perform that action at this time.
0 commit comments