Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                
              
            
!

CSS

              
                body {
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #6b502f;
}
              
            
!

JS

              
                //#wccchallenge for 90s math textbook. I am not proud of this. 
//comments are here for your pleasure.
let sunflower;//This is clearly a flower of mathematical influence
function preload(){//we preload just like we do our homework before class
  sunflower = loadImage("https://assets.codepen.io/4559259/IMG_1.jpeg");
  angleMode(DEGREES); //just trolling here
}
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); //Plainly a rotation 
        circle(x,y,5); //How many lines of symmetry does this circle have? 
        pop()
      }
  }
  //Obviously this is where the Title is made
  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
}

//for errata, google
//for answers, use a photo math application
//to learn, treat math like a verb and toss this book. 





              
            
!
999px

Console