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

  1. float random(int position)

  2. vector random(int position)

  3. vector4 random(int position)

  4. float random(float position)

  5. vector random(float position)

  6. vector4 random(float position)

  7. float random(vector position)

  8. vector random(vector position)

  9. vector4 random(vector position)

  10. float random(vector4 position)

  11. vector random(vector4 position)

  12. vector4 random(vector4 position)

  13. float random(int xpos, int ypos)

  14. vector random(int xpos, int ypos)

  15. vector4 random(int xpos, int ypos)

  16. float random(float xpos, float ypos)

  17. vector random(float xpos, float ypos)

  18. 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)).