Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Perlin noise
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Dot product=== [[File:PerlinNoiseDotProducts.svg|alt=|none|thumb|256x256px|The dot product of each point with its nearest grid node gradient value. The dot product with the other three nodes in the cell is not shown.]] For working out the value of any candidate point, first find the unique grid cell in which the point lies. Then, identify the {{math|2<sup>''n''</sup>}} corners of that cell and their associated gradient vectors. Next, for each corner, calculate an offset vector. An offset vector is a displacement vector from that corner to the candidate point. For each corner, we take the [[dot product]] between its gradient vector and the offset vector to the candidate point. This dot product will be zero if the candidate point is exactly at the grid corner. For a point in a two-dimensional grid, this will require the computation of four offset vectors and dot products, while in three dimensions it will require eight offset vectors and eight dot products. In general, the algorithm has {{math|''O''(2<sup>''n''</sup>)}} [[Big O notation|complexity]] in {{mvar|n}} dimensions.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)