This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Set canvas size | |
| size(640, 640); | |
| // Draw a circle in the center of the canvas | |
| circle(width / 2, height / 2, width); | |
| // Define variables | |
| int circleCenterX = width / 2; | |
| int circleCenterY = height / 2; | |
| int outsidePoints = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import random | |
| import math | |
| # Define radius of circle | |
| r = 200.0 | |
| # Initialize variables | |
| insideCirc = 0 | |
| totalCirc = 0 | |
| diff = 1.0 |