fractalkitty looking for math? fractalkitty.com

weekly creative coding

90's Math Textbook Design

#trig#classes#text#image#math#spiral#symmetry#plants#letters#wcc

sunflowerwhere

let sunflower;//This is clearly a flower of mathematical influence
function preload(){//we preload just like we do our homework before class
  sunflower = loadImage("/assets/IMG_1.jpeg");
  angleMode(DEGREES);
}
function setup(){
  createCanvas(400,600);//If this is a model and the actual copy has a width of 8.5 inches, how many centimeters is the length (also known as the height)?
  noLoop();//why would you want to redraw this? Once is enough.
}
function draw(){
  image(sunflower,0,140,width,height-140);//this is clear
  push()//This is a lazy way to move the center of the spiral. What kind of transformation is this? a. translation b. rotation c. reflection d. existential
  translate(260,400);//did you peek at this answer?
  theta=0;//Starting with a natural number - zero. Don't cringe. You know in your heart that zero is natural and free.
  noStroke();//We don't draw the line here
  for(let i=0;i<400;i+=3){//spiral magic
    theta+=(sqrt(5)+1)/2;//a purposeful error, just like this book will most likely have. what is the golden angle? Do you see the error of my ways? - and yet I know how to fudge this, just like skipping the steps in trig identity problems - just hoping no one will notice ( I never grade papers like that ._.)
      x=i*sin(theta)//is this an independent variable?
      y=i*cos(theta)//is this an independent variable?
      for(let j=0;j<5;j++){//fancy not-a-line magic
        push()
        rotate(360/5*j)
        noFill()
        stroke(-100+i,-50+i,-100+i,60)//change color - please plot this function where i is the independent variable and color is the dependent variable...see appendix ZZ-42
        circle(x,y,200)// circles are round
        pop()
      }
    for(let j=0;j<5;j++){
        push()
        fill(0, 255, 64);//painful green will help this book Hulk out
        rotate(360/5*j);
        circle(x,y,5);
        pop()
      }
  }
  pop()
  fill(252, 186, 3);
  strokeWeight(20)
  stroke(204, 122, 0)
  rect(-20,0,width+40,140)
  fill(0)
  stroke(0)
  strokeWeight(2)
  textSize(52)
  textFont('Georgia');//The most arrogant native font
  text("Math",130,70)//duh
  textSize(20)
  text("Clearly | Obviously | Plainly",70,120);//evidently
}