diff options
author | Braxton Hall | 2022-11-17 07:11:16 +0000 |
---|---|---|
committer | GitHub | 2022-11-17 07:11:16 +0000 |
commit | d77304ded560e1a7d467e322b0f280f5df0cb3b6 (patch) | |
tree | 5b445fd4cee240977ba9dbbd1c4f599f93621bcf | |
parent | 36ddffec9fc05b0a3c99d30efa4d5b26bbde8c13 (diff) | |
parent | c3ad989c8e7a2636da82e36d68f677c15a270438 (diff) |
Merge pull request #84 from themaskedtaquito/main
Mari's fib entry
-rw-r--r-- | entries/themaskedtaquito/fib.js | 26 | ||||
-rw-r--r-- | people.json | 12 |
2 files changed, 38 insertions, 0 deletions
diff --git a/entries/themaskedtaquito/fib.js b/entries/themaskedtaquito/fib.js new file mode 100644 index 0000000..6708630 --- /dev/null +++ b/entries/themaskedtaquito/fib.js @@ -0,0 +1,26 @@ +//p5.js
+
+let fib1 = 0;
+let fib2 = 1;
+let loopNumber = 1;
+function setup() {
+ createCanvas(600, 600);
+ frameRate(3);
+}
+
+function draw() {
+ background(220);
+ fill('#'+str(hex(fib2)));
+ noStroke();
+ rect(50,70,500,500);
+ textSize(20);
+ text('#'+str(hex(fib2)),53,57);
+ fill(0);
+ text('Fibonacci ' +str(loopNumber) + ': '+ str(fib2),200,57);
+ fib2 = fib1 + fib2;
+ fib1 = fib2 - fib1;
+ loopNumber +=1;
+ if(fib2>420196140727489660){
+ noLoop();
+ }
+}
\ No newline at end of file diff --git a/people.json b/people.json index fdfd52d..f1b99d4 100644 --- a/people.json +++ b/people.json @@ -676,6 +676,18 @@ ] }, { + + "github": "themaskedtaquito", + "name": "Mari Allison", + "title": "MASLIS, UBC", + "entries": [ + { + "name": "color", + "link": "./entries/themaskedtaquito/fib.js" + } + ] + }, + { "github": "skairunner", "name": "Skye Im", "title": "Software Engineer", |