random
VEX function
generate a random number based on the position in N dimensional space (where N is 1 to 4 dimensions).
Contexts: image3d, chop, cop, pop, sop, surface, displace, fog, light, shadow, photon, cvex
-
float random(int position) -
vector random(int position) -
vector4 random(int position) -
float random(float position) -
vector random(float position) -
vector4 random(float position) -
float random(vector position) -
vector random(vector position) -
vector4 random(vector position) -
float random(vector4 position) -
vector random(vector4 position) -
vector4 random(vector4 position) -
float random(int xpos, int ypos) -
vector random(int xpos, int ypos) -
vector4 random(int xpos, int ypos) -
float random(float xpos, float ypos) -
vector random(float xpos, float ypos) -
vector4 random(float xpos, float ypos)
generate a random number based on the position in N dimensional space (where N is 1 to 4 dimensions). Unlike the noise functions, the random functions do not smoothly interpolate the random values between integer lattice points. The random() functions are very efficient ways of doing something like noise(floor(position)).