beginContour() for cutting out negative space shapes
https://editor.p5js.org/XXHYZ/sketches/iunfhPrb7s
https://editor.p5js.org/ima_ml/sketches/hyxD1BVVn
Using WebGL (3D Renderer) in createCanvas() disables flipping options
create keypoints (points) array, then create another triangle with each 3 points as a set
beginShape(TRIANGLES)
function setup() {
createCanvas(100, 100);
background(200);
// Start drawing the shape.
// Draw a series of triangles.
beginShape(TRIANGLES);
// Left triangle.
vertex(30, 75);
vertex(40, 20);
vertex(50, 75);
// Right triangle.
vertex(60, 20);
vertex(70, 75);
vertex(80, 20);
// Stop drawing the shape.
endShape();
describe('Two white triangles drawn on a gray background.');
}
texture() to warp 2D tex into 3D via UV
textureMode(NORMAL): normalized UV coord 0-1, useful for 3D mapping instead of “revealing” image underneath
OR just load a custom UV map (list of UV coord)
https://editor.p5js.org/jackbdu/sketches/O6BB8iRHv
https://projector.tensorflow.org/
T-SNE algorithm: visualize high dimension space by clustering points into a 3D space
https://experiments.withgoogle.com/ai/drum-machine/view/
Sigmoid Function: gets any math values and maps it to 0-1