Saori Yoshimoto work notes since 2018

Tuesday, March 5, 2019

[VEX] Random Functions

--rand: setting float in seed

float  rand(float seed)
vector2  rand(float seed)
vector  rand(float seed)
vector4  rand(float seed)
float  rand(float seed, float seed2)
vector2  rand(float seed, float seed2)
vector  rand(float seed, float seed2)
vector4  rand(float seed, float seed2)
float  rand(vector2 seed)
vector2  rand(vector2 seed)
vector  rand(vector2 seed)
vector4  rand(vector2 seed)
float  rand(vector seed)
vector2  rand(vector seed)
vector  rand(vector seed)
vector4  rand(vector seed)
float  rand(vector4 seed)
vector2  rand(vector4 seed)
vector  rand(vector4 seed)
vector4  rand(vector4 seed)

ex1).

vector        pos = 1;
float        seed = 0;
pos *= rand(seed);

ex2).

vector        pos = 1;
float        seed = 0;
pos *= float(rand(seed)); 



ex3).
rand(@ptnum+0.46513523135) ;

 
--random: setting integer in seed

float  random(float|int position)
vector  random(float|int position)
vector2  random(int position)
vector4  random(float|int position)

Generate 1D, 2D, 3D, or 4D noise based on a 1D position.

float  random(float|int xpos, float|int ypos)
vector  random(float|int xpos, float|int ypos)
vector4  random(float|int xpos, float|int ypos)
Specify a 2D position in the noise field using two numbers.
float  random(vector position)
vector  random(vector position)
vector4  random(vector position)

Specify a 3D position in the noise field using a vector.
float  random(vector4 position)
vector  random(vector4 position)
vector4  random(vector4 position)
Specify a 4D position in the noise field using a vector4.


ex1).
random(@ptnum+46213) ;