Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
p5js-week-07 [2022/06/11 07:23] renickp5js-week-07 [2022/06/11 07:44] renick
Line 2: Line 2:
  
 {{:dark-toast.jpg?600|}} {{:dark-toast.jpg?600|}}
 +
 +(photo from https://www.trustedreviews.com/reviews/hotpoint-si9-s8c1-sh-ix-h)
  
 We're halfway through our course. We've talked a lot about toast and JavaScript, so it's a good time to review before we take on some new techniques for improving our coding and our drawing. After we review, we want to try once more to polish up these drawings that we've been working on recently: We're halfway through our course. We've talked a lot about toast and JavaScript, so it's a good time to review before we take on some new techniques for improving our coding and our drawing. After we review, we want to try once more to polish up these drawings that we've been working on recently:
Line 47: Line 49:
  
 =====big ideas===== =====big ideas=====
 +
 +{{:french-toast-syrup.jpg?600|}}
 +
 +(photo from https://www.flickr.com/photos/djwtwo/14033143291)
  
 Let's review the really big ideas first! Let's review the really big ideas first!
Line 96: Line 102:
 ===== JavaScript review ===== ===== JavaScript review =====
  
-Let's take quick look at the various JavaScript that we have learned.+{{:toast-closeup.jpg?600|}} 
 + 
 +(photo from https://upload.wikimedia.org/wikipedia/commons/a/af/DryToast.jpg) 
 + 
 +Now we want do the more close-up review of the various JavaScript that we have learned.
  
 ==== assigning variables ==== ==== assigning variables ====
 +
 +{{:two-pieces-of-toast.png?600|}}
 +
 +(photo from https://www.flickr.com/photos/91261194@N06/51708375114)
  
 Remember, variables are names that we can give to pieces of data, like this: Remember, variables are names that we can give to pieces of data, like this:
Line 157: Line 171:
 howMuchToast3(numberOfPiecesOfToast) howMuchToast3(numberOfPiecesOfToast)
 </code> </code>
 +
 +All of these functions can tell us how much toast we're having for breakfast.
 +
 +{{:beautiful-breakfast_toast.jpg?600|}}
 +
 +(photo from https://pxhere.com/en/photo/872146)
  
 ====various operators==== ====various operators====
Line 458: Line 478:
 ===== a full example ===== ===== a full example =====
  
-Then we can use our shapeFromPoints function to draw it.+Then we can use our shapeFromPoints function to draw it. You'll notice that we still sometimes get a self-intersecting polygon, but it's much less common. We could keep working on this algorithm to get one that is perfect, but let's stop here for this lesson.
  
 <HTML> <HTML>
  • p5js-week-07.txt
  • Last modified: 13 months ago
  • by reina.chen