-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathslope_vis.html
16 lines (15 loc) · 1.17 KB
/
slope_vis.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<html>
<head>
<meta charset="UTF-8">
<script language="javascript" type="text/javascript" src="libraries/p5.js"></script>
<!-- uncomment lines below to include extra p5 libraries -->
<script language="javascript" src="libraries/p5.dom.js"></script>
<!--<script language="javascript" src="libraries/p5.sound.js"></script>-->
<script language="javascript" type="text/javascript" src="slope_vis.js"></script>
<!-- this line removes any default padding and style. you might only need one of these values set. -->
<style> body {padding: 0; margin: 0;} </style>
</head>
<body>
<p>The average slope is calculated by summing the slopes between adjacent points and dividing by the total number of points. So, for this example, the five slopes between the six adjacent points are calculated and averaged to determine the overall slope of the points. This slope is then visualized with a line with the center of the line being the average height of all of the points, and the end points of the line calculated based on the change in height from the average slope. The six points can be dragged to change their vertical position, and show the change in slope.
</body>
</html>