# Mathober2023_Counting&Quadratic

# Rect+Pegs

For this combinational prompt, I will be taking my submission for **Quadratic:** Rect ^ 2 and merging it with a new coded entry for **Counting**. The counting occurs through different iterations of assessing the time variable

**Overlaid sketches that were coded in LiveCodeLab**

## Poem

```ocaml
Rectangles roaming
Rotating & rolling
Running & rimming along
Reciting the rhymes that belong
Twirling and twisting
Avoiding the mistakes that were tripping
As the angles of the others are tilting
Tiling and tipping
Tipping to the ways as the rectangles are roaming
```

## Video

### Rects+Pegs

<iframe width="560" height="315" src="https://www.youtube.com/embed/qNKF2bxzqx0?si=b7Y-OH4PMQ6K9h1z"></iframe>

Rects+Pegs Infused

<iframe width="560" height="315" src="https://www.youtube.com/embed/4JyAFd7VmkQ?si=cYcT0dAGJcHXkupa"></iframe>

## Code

### **Code for Rect^2:** [https://blog.illestpreacha.com/mathober2023quadratic](https://blog.illestpreacha.com/mathober2023quadratic)

```javascript
background orange

scale Math.pow((time % 6 + 1)/11,2)

23 times
    rotate Math.pow(time % 8,2), Math.pow(sin(time),2), Math.pow(cos(time),2)
    move 0, Math.pow(wave(0.003), 2),Math.pow(wave(0.004),2)
    rect
```

### **Counting Code**

```javascript
ringDetail = abs(75- Math.cbrt(time % 30))

scale Math.cbrt(sin(time)) + 0.3


time % 30 times with i
	rotate (time / 5) + i , wave
	ringDetail times
		rotate cos(time)/sin(time % 6), 0
		move 2 * (time % 4 + 1),0,0
			rect 1, 0.3 + (1 / ringDetail)
```
