From 8a106372edf9256ee2ff43328c0bef8993b97f6f Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Tue, 14 Sep 2021 12:17:33 -0500 Subject: lecture fun :^) --- csci4611/lec/hexagon/hexagon.pde | 14 ++++++++++++++ csci4611/lec/triangles/triangles.pde | 10 ++++++++++ 2 files changed, 24 insertions(+) create mode 100644 csci4611/lec/hexagon/hexagon.pde create mode 100644 csci4611/lec/triangles/triangles.pde diff --git a/csci4611/lec/hexagon/hexagon.pde b/csci4611/lec/hexagon/hexagon.pde new file mode 100644 index 0000000..46eaf2e --- /dev/null +++ b/csci4611/lec/hexagon/hexagon.pde @@ -0,0 +1,14 @@ +void setup() { + size(800,800); +} + +void draw() { + background(255); + noFill(); + beginShape(); + float lineCount=1000; + for (float i = 0; i<=lineCount; i++) { + vertex(i,400+200*cos(i/80)); + } + endShape(); +} \ No newline at end of file diff --git a/csci4611/lec/triangles/triangles.pde b/csci4611/lec/triangles/triangles.pde new file mode 100644 index 0000000..6c7306b --- /dev/null +++ b/csci4611/lec/triangles/triangles.pde @@ -0,0 +1,10 @@ +void draw() { + fill(255); + noStroke(); + beginShape(TRIANGLE_FAN); + vertex(50,50); + for (int x=0;x<=8;x++) { + vertex(50+cos(x*PI/5)*30,50+sin(x*PI/5)*30); + } + endShape(CLOSE); +} \ No newline at end of file -- cgit v1.2.3