Skip to content

Commit

Permalink
Updates to code and readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
QC20 committed May 14, 2024
1 parent 792d8be commit 1745133
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,8 @@ This browser-based simulation of a polar coordinate Etch-A-Sketch offers an inte

## Compatibility

The Non-Cartesian Etch-A-Sketch is compatible with modern web browsers and devices. Whether you're using a desktop computer, laptop, tablet, or smartphone, you can enjoy this simulation on a wide range of platforms.
The Non-Cartesian Etch-A-Sketch is compatible with modern web browsers and devices. Whether you're using a desktop computer, laptop, tablet, or smartphone, you can enjoy this simulation on a wide range of platforms.

## Acknowledgement

I would like to express my gratitude to [mitxela](https://mitxela.com) for their innovative work on the Polar Coordinate Etch-a-Sketch project. Upon encountering their project, I was truly inspired by its creativity and ingenuity. It motivated me to embark on my own journey to recreate and modernize this concept. While I have replicated the background photo, the code for my version was developed independently. Thank you, mitxela, for sparking this creative endeavor!
4 changes: 2 additions & 2 deletions src/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function draw() {
// Check if the position has changed significantly and fill a circle if so
if (Math.abs(px - x) + Math.abs(py - y) > 10) {
ctx.beginPath();
ctx.arc(232, 232, 155, 0, 6.283185307179586);
ctx.arc(232, 232, 155, 0, Math.TAU);
ctx.fill();
}
px = x;
Expand Down Expand Up @@ -179,5 +179,5 @@ if (window.DeviceMotionEvent) {

// Function to calculate the magnitude of acceleration
function pythag(a) {
return Math.sqrt(a.x * a.x + a.y * a.y + a.z * a.z);
return Math.sqrt(a.x^2 + a.y^2 + a.z^2);
}

0 comments on commit 1745133

Please sign in to comment.