-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
MattiaSuisse
authored and
MattiaSuisse
committed
May 23, 2020
0 parents
commit d50db8a
Showing
81 changed files
with
71,218 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "getmdl-select"] | ||
path = getmdl-select | ||
url = https://github.com/CreativeIT/getmdl-select |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Written in 2020 by Mattia Rüfenacht <[email protected]>. | ||
|
||
Based on GPL-licensed example code by Mike Bostock. | ||
|
||
|
||
This program is free software: you can redistribute it and/or modify | ||
|
||
it under the terms of the GNU General Public License as published by | ||
|
||
the Free Software Foundation, either version 3 of the License, or | ||
|
||
(at your option) any later version. | ||
|
||
|
||
This program is distributed in the hope that it will be useful, | ||
|
||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
|
||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
|
||
GNU General Public License for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# OpenKDV | ||
D3js-based data visualization of homogenized temperature data provided by MeteoSchweiz. | ||
|
||
Inspired by [Ed Hawkins](http://www.climate-lab-book.ac.uk/spirals/) and [Robert Gieseke and Malte Meinshausen](https://github.com/openclimatedata/climate-spirals). | ||
|
||
Based on GPL-licensed D3 example code by [Mike Bostock](https://github.com/mbostock). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
// A Mover object | ||
Mover mover; | ||
|
||
void setup() { | ||
size(800,360); | ||
mover = new Mover(); | ||
} | ||
|
||
void draw() { | ||
background(255); | ||
|
||
// Update the location | ||
mover.update(); | ||
// Display the Mover | ||
mover.display(); | ||
} | ||
|
||
|
||
|
||
|
||
/** | ||
* Acceleration with Vectors | ||
* by Daniel Shiffman. | ||
* | ||
* Demonstration of the basics of motion with vector. | ||
* A "Mover" object stores location, velocity, and acceleration as vectors | ||
* The motion is controlled by affecting the acceleration (in this case towards the mouse) | ||
*/ | ||
|
||
|
||
class Mover { | ||
|
||
// The Mover tracks location, velocity, and acceleration | ||
PVector location; | ||
PVector velocity; | ||
PVector acceleration; | ||
// The Mover's maximum speed | ||
float topspeed; | ||
|
||
Mover() { | ||
// Start in the center | ||
location = new PVector(width/2,height/2); | ||
velocity = new PVector(0,0); | ||
topspeed = 5; | ||
} | ||
|
||
void update() { | ||
|
||
// Compute a vector that points from location to mouse | ||
PVector mouse = new PVector(mouseX,mouseY); | ||
PVector acceleration = PVector.sub(mouse,location); | ||
// Set magnitude of acceleration | ||
acceleration.setMag(0.2); | ||
|
||
// Velocity changes according to acceleration | ||
velocity.add(acceleration); | ||
// Limit the velocity by topspeed | ||
velocity.limit(topspeed); | ||
// Location changes by velocity | ||
location.add(velocity); | ||
} | ||
|
||
void display() { | ||
stroke(255); | ||
strokeWeight(10); | ||
fill(74, 51, 162); | ||
ellipse(location.x,location.y,48,48); | ||
} | ||
|
||
} |
Oops, something went wrong.