x2 + y2 = 1 is the equation of the unit circle. Most of us go through school mathematics without ever wondering what
xn + yn = 1 looks like for different n. We learn the 'equation for a circle', and move on.
The French mathematician Gabriel Lamé (1795–1870) first explored the xn + yn = 1 equation. The Danish scientist, mathematician, architect, and poet (polymath) popularized a specific shape he called a Superellipse. His superellipse is drawn for n = 2.5. Piet Hein also invented the famous 27-cube puzzle, the Soma cube. The lower left corner of the Scratch project displays his drawing of his cube and his profound statement about problem-solving, well understood by Scratchers.
Here is a shot of the Scratch project screen. The project is interactive and can be seen and downloaded at this link,
As you can see above, n is set in the slider at n = 2 and the algorithm draws the familiar circle (I filled the circle to make the shape stand out more).
The value of n can be set in the slider from n= 1 to n = 20. As is shown below, at n = 20, the equation draws a square with rounded corners!
What does the shape look like for n = 2.5, n-4, and n=1?
This script uses the logarithm definition of basepower = answer to compute exponentiation.
bp = a
log bp = log a
p log b = log a, and by the definition of a logarithm,
10p log b = a
The above equation is used to perform exponentiation.
This project looks at the equation xn + yn = 1.
First, solve the equation for y;
yn = 1 – xn, take the nth root of both sides,
y = (1- xn)1/n [as in √2 = 21/2]
In the computation loop, the script performs these steps in order:
(1) compute xn,
(2) compute (1 – xn), and
(3) compute (1 – xn)1/n
The script actually computes y from x = 0 to x =1 to draw the right half and then uses symmetry to draw the left half of the shape.
If you would like to learn about the Soma cube puzzle, go to my other blog at grandadscience.com and search on Soma. I have written several posts about making and using the Soma puzzle with kids.