code

29
Dec
Blue Flames

Blue Flames

This code was generated by playing around with one of the p5.js examples. It translates and rotates using parametric equations each frame. Codepen is below (it may not run well on some machines). See the Pen blueFlame by Sophia (@fractalkitty) on CodePen.
1 min read
20
Dec
Transformed Magic Squares

Transformed Magic Squares

I got a request from a twitter friend (Sara Resvi) to create a visual for transforming magic squares. A learner can see how one solution is many (or vice versa). Here is what I put together in an afternoon. Click the numbers to change them. Try to find solutions where the rows, columns and diagonals
1 min read
16
Dec
Parametric Waves Morphed into Unstable Charcoal

Parametric Waves Morphed into Unstable Charcoal

Have you ever wished that you had charcoal that is made of particles that randomly leave and come back? Wish the reference frame would rotate so down is up, but not always? Well now you have what you have always wanted – Unstable Charcoal! I created this after playing with a parametric wave visualiz
1 min read
10
Dec
Laced Reflections

Laced Reflections

My mind was on snowflakes tonight, which brought me down a rabbit hole of reflections, lace, and play. The code here is simple but fun. Enjoy making snowflakes, lace, stars, or whatever comes to mind. If you wish to fork the code or play it is here. My CodePen is below. Press the spacebar (or […]
1 min read
24
Nov
Code of the Rings

Code of the Rings

While tinkering with my tree ring code, I created a simpler yet mesmerizing adaptation. Essentially I added a loop, some random multipliers, and changed to radian mode. Sine and cosine are so incredibly beautiful and full of infinite play and wonder. Please play with the code below by clicking to ch
1 min read
11
Oct
Fantasy Maps to Planets

Fantasy Maps to Planets

For those that have created fantasy maps using previous posts here, in classes, or elsewhere in Worldbuilding, D&D, or art, I created a small script to see your maps as spherical planets. You can click to rotate and move the mouse off the canvas to have rotation. You may want to draw a map that […]
1 min read
04
Oct
Random Math Poetry

Random Math Poetry

I think the challenge here is to find the math that can fit the poetry… If you want a browser tab version, click here. You can also edit it and change the words as well. Below is the codepen: See the Pen OJNKQmE by Sophia (@fractalkitty) on CodePen.
1 min read
24
Sep

SA9: Quadrant Play

This Scripting Algebra (SA) activity looks at quadrants, mouse location, and interactive art p5.js. This activity assumes that the skills from SA1-SA8 were introduced (if-else, logical operators, random(), text(), rect(), variables, loop, pow, for, functions, translate, modulo, etc.). This activity
1 min read
24
Sep
Parametric Play!

Parametric Play!

Here are some simple animations with parametric equations. What you see below is a function and its inverse. If you click, you will get another semi-random equation. See the Pen qBZgZvW by Sophia (@fractalkitty) on CodePen.
1 min read
09
Sep
Parallel to a Parabola

Parallel to a Parabola

I received a question today about what curve is parallel to a parabola. I sat for a minute and realized that it wasn’t another parabola. It required parametric equations (at least if you wanted to keep it simple). That of course lead to code: See the Pen jOqzMJb by Sophia (@fractalkitty) on CodePen.
1 min read

Want to become a better programmer? Join the Recurse Center!

Sophia

Mathematics educator and creative coder exploring the beauty of mathematical concepts through interactive visualizations and playful learning.

Mathematics

Education

Creative Coding