Drawing a circle with triangles WebGL
问题 I'm new to WebGL and was trying to draw a circle with triangle_fan. I set up the variables var pi = 3.14159; var x = 2*pi/100; var y = 2*pi/100; var r = 0.05; points = [ vec2(0.4, 0.8) ]; //establish origin And then drew the circle using this for loop. for(var i = 0.4; i < 100; i++){ points.push(vec2(r*Math.cos(x*i), r*Math.sin(y*i))); points.push(vec2(r*Math.cos(x*(i+1)), r*Math.sin(y*(i+1)))); } The issue is that I am actually pushing in the second point again when i increases which I don't