Today we’ll be working to create a block called “BullseyeColorChange” that will change the pen’s color to make rings shapes emanating from the center of the work space. To pull that off we’ll need to make some other custom blocks for it to use.
- DistanceFromCenter block: This block will report the distance from the origin (0,0) and the sprite’s current position using the Pythagorean Theorem linked above.
- Is (x) Between (y) & (z) block: A true/false reporter block that will evaluate if the value of x is between y and z.
- A Rings List: It should look something like this:
Once you have those three components, you’ll use them to create your BullseyeColorChange block, which you can use to update the RandomCurve block like so:
Notice how ‘Rings’ is an input into BullseyeColorChange? How might that information be used inside the BCC block?