Skip to content

Instantly share code, notes, and snippets.

@timothyhahn
Last active December 16, 2015 11:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timothyhahn/5431599 to your computer and use it in GitHub Desktop.
Save timothyhahn/5431599 to your computer and use it in GitHub Desktop.
// Circle
vec3 circle_vert[CIRCLE_SIZE];
for(int i = 0; i < CIRCLE_SIZE; i++) {
circle_vert[i] = vec3( radius * cos(i * twoPi / 360) + .5, radius * sin(i * twoPi / 360) + .7, 0);
}
vec4 circle_col[CIRCLE_SIZE];
for(int i = 0; i < CIRCLE_SIZE; i++) {
circle_col[i] = vec4(i / 360.0, 0.0, 0.0, 1.0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment