From 014dd0c6cc510a225b60a93ca65326824140bdf3 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Wed, 6 Oct 2021 18:46:16 +0200 Subject: Update --- projects/shooting_the_apple/index.html | 43 +++++++++++++++++++++++++ projects/shooting_the_apple/index.js | 58 ++++++++++++++++++++++++++++++++++ projects/shooting_the_apple/name.txt | 1 + 3 files changed, 102 insertions(+) create mode 100644 projects/shooting_the_apple/index.html create mode 100644 projects/shooting_the_apple/index.js create mode 100644 projects/shooting_the_apple/name.txt (limited to 'projects/shooting_the_apple') diff --git a/projects/shooting_the_apple/index.html b/projects/shooting_the_apple/index.html new file mode 100644 index 0000000..b82d084 --- /dev/null +++ b/projects/shooting_the_apple/index.html @@ -0,0 +1,43 @@ +
+
+
+
\(x_0\)
+ +
\(m\)
+
+
+
+
+
\(y_0\)
+ +
\(m\)
+
+
+
+
+
\(v_{0,x}\)
+ +
\(m.s\)
+
+
+
+
+
\(v_{0,y}\)
+ +
\(m.s\)
+
+
+
+
+
\(g\)
+ +
\(m.s^{-2}\)
+
+
+
+ +
+
+


+ +
TODO
diff --git a/projects/shooting_the_apple/index.js b/projects/shooting_the_apple/index.js new file mode 100644 index 0000000..7e3e185 --- /dev/null +++ b/projects/shooting_the_apple/index.js @@ -0,0 +1,58 @@ + +let t=0; +let vy0=50 +let vx0=vy0 +let x0=140 +let y0=80 +let g=9.81 + +let shooting_the_apple= function (p){ + let width=800 + let height=300 + + p.setup = function() { + c=p.createCanvas(Math.min(window.innerWidth,width), height); + + + }; + + + p.draw = function() { + p.clear() + p.textSize(width/8) + p.text("TODO",width/5,height/1.5) + + }; + + p.windowResized = function(){ + p.resizeCanvas(Math.min(window.innerWidth,width), height); + } +}; + +refresh=function(){ + t=0 + x0=parseFloat(app.x0) + y0=parseFloat(app.y0) + vx0=parseFloat(app.vx0) + vy0=parseFloat(app.vy0) + g=parseFloat(app.g) + p5Load() +} + + + +project_init=function(){ + app = new Vue({ + el: '#app', + data :{ + x0:x0, + y0:y0, + vy0:vy0, + vx0:vx0, + g:g + } + }) + p5Load() + +} + diff --git a/projects/shooting_the_apple/name.txt b/projects/shooting_the_apple/name.txt new file mode 100644 index 0000000..cde367a --- /dev/null +++ b/projects/shooting_the_apple/name.txt @@ -0,0 +1 @@ +Shooting the apple -- cgit v1.2.3