Hello. I would like help implementing this idea from C# code to processing
private Point[] grads = new Point[] {
new Point(0, 1), new Point(1, 1), new Point(1, 0), new Point(1, -1),
new Point(0, -1), new Point(-1, -1), new Point(-1, 0), new Point(-1, 1),};
This is the piece of C# code
A PVector array where i can define a new PVector and set the coordiantes of x and y. i want to make 8 vectors where i define x and y.
i tried this but i do not believe it is correct:
PVector[] gradients = {
new PVector(0, 1),
new PVector(1, 1),
new PVector(1,0),
new PVector(1,-1),
new PVector(0,-1),
new PVector(-1,-1),
new PVector(-1,0),
new PVector(-1,1),
};
if you do println(gradients) in setup you get this output
[ 0.0, 1.0, 0.0 ] [ 1.0, 1.0, 0.0 ] [ 1.0, 0.0, 0.0 ] [ 1.0, -1.0, 0.0 ] [ 0.0, -1.0, 0.0 ] [ -1.0, -1.0, 0.0 ] [ -1.0, 0.0, 0.0 ] [ -1.0, 1.0, 0.0 ]
I don’t believe this is correct because this seems to be a three dimensions.
Thank you for any help.