I created an activity I’m really proud of!
In the activity, students are allowed to cut a “cake” (a square) with a given number of straight cuts (i.e., lines).
I wrote some complex code to calculate each and every piece of cake that the students get from their cuts (that’s the part I’m particularly proud of).
I also discovered that it’s possible to disable certain geometry tools if specific conditions are met (for example, when the students have made enough cuts).
Here’s where I need help:
On the final slide, I want to ask students to write the formula for the maximum number of pieces that can be obtained with n cuts. I know about patterns, but is there a way to parse the students’ answers to check if they’re correct?
You can use simpleFunction defined in terms of n and evaluate their answers against your expression at a given arbitrary value. I like to use 999. Something like this:
Thank you!!! I was thinking about evaluating the two functions for the values 1,2,3,4,5 but that’s risky … while if the two functions coincide at 999 then it is very unlikely that they are different.
Yes, I’m very happy about the geometry calculations … I had this idea in mind for some days and started thinking that it could actually be possible to write a formula that finds all the polygons you get … I was very pleased to see that it works fine handling all possible scenarios and that it is not that slow. The only possible situation where there might be some glitches is when 3 lines intersect on the same point. I could add checks for this situation but in the end I don’t think they’re necessary.