Skip to content

Instantly share code, notes, and snippets.

@Mesparza99
Created September 29, 2017 15:51
Show Gist options
  • Save Mesparza99/fe9332f85c5807f1b7c3b788ba205c2e to your computer and use it in GitHub Desktop.
Save Mesparza99/fe9332f85c5807f1b7c3b788ba205c2e to your computer and use it in GitHub Desktop.
Rotate ellipse with a radius along the x axis. #13 // source http://jsbin.com/pifuhog
<!DOCTYPE html>
<html>
<head>
<title> Rotate ellipse with a radius along the x axis. #13</title>
<script data-require="p5.js@0.5.7" data-semver="0.5.7" src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.7/p5.min.js"></script>
<link rel="stylesheet" href="style.css" />
<script src="script.js"></script>
</head>
<body>
<h1>Rotate ellipse with a radius along the x axis. #13 </h1>
<script id="jsbin-javascript">
x = 10; // variable x intialized at 10
y = 60; // variable y intialized at 6
function setup() {
canvas = createCanvas(480, 120);
}
function draw() {
background(200);
ellipse (x+=1,46,55, 55,);
if (x > 240) {
x = 0; }
}
</script>
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html>
<html>
<head>
<title> Rotate ellipse with a radius along the x axis. #13</title>
<script data-require="p5.js@0.5.7" data-semver="0.5.7" src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.7/p5.min.js"><\/script>
<link rel="stylesheet" href="style.css" />
<script src="script.js"><\/script>
</head>
<body>
<h1>Rotate ellipse with a radius along the x axis. #13 </h1>
</body>
</html>
</script>
<script id="jsbin-source-javascript" type="text/javascript">x = 10; // variable x intialized at 10
y = 60; // variable y intialized at 6
function setup() {
canvas = createCanvas(480, 120);
}
function draw() {
background(200);
ellipse (x+=1,46,55, 55,);
if (x > 240) {
x = 0; }
}
</script></body>
</html>
x = 10; // variable x intialized at 10
y = 60; // variable y intialized at 6
function setup() {
canvas = createCanvas(480, 120);
}
function draw() {
background(200);
ellipse (x+=1,46,55, 55,);
if (x > 240) {
x = 0; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment