Perlin noise: Difference between revisions
Content deleted Content added
added Factor |
Thundergnat (talk | contribs) m →{{header|C}}: Remove vanity tags |
||
Line 76:
A sign of how close C and Java are is this implementation which differs very little from Perlin's Java implementation. I only removed the static, public and final keywords and the Math class name from the floor calls, and it compiled without errors. Interestingly, in the paper, Perlin says that the benchmark implementation which was used to gauge the algorithm's performance was in C. One important improvement here is that the permutation data is externalized and read from a file. This way different textures and effects can be generated without having to change the source code.
<lang C>
#include<stdlib.h>
#include<stdio.h>
Line 149 ⟶ 147:
Perlin Noise for (3.14,42,7) is 0.13691995878400012
</pre>
=={{header|Common Lisp}}==
<lang lisp>;;;; Translation from: Java
|