-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from basimr/release/v0.2
Release/v0.2
- Loading branch information
Showing
35 changed files
with
766 additions
and
15,980 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 @@ | ||
RewriteEngine On | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteRule ^([^\.]+)$ $1.html [NC,L] |
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 @@ | ||
v0.2 |
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,129 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="description" content=""> | ||
<meta name="author" content=""> | ||
<link rel="icon" type="image/png" sizes="96x96" href="img/favicon.png"> | ||
|
||
<title>Finding earthquake epicenters | Project Lovelace</title> | ||
|
||
<!-- Bootstrap core CSS with Jumbotron Theme --> | ||
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> | ||
<link href="css/jumbotron.css" rel="stylesheet"> | ||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> | ||
|
||
<!-- MathJax --> | ||
<script type="text/x-mathjax-config"> | ||
MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}}); | ||
</script> | ||
<script type="text/javascript" async src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_CHTML"></script> | ||
</head> | ||
|
||
<body> | ||
<nav class="navbar navbar-inverse navbar-fixed-top"> | ||
<div class="container"> | ||
<div class="navbar-header"> | ||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> | ||
<span class="sr-only">Toggle navigation</span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
</button> | ||
<a class="navbar-brand" href="/">Project Lovelace</a> | ||
</div> | ||
<div id="navbar" class="navbar-collapse collapse"> | ||
<ul class="nav navbar-nav"> | ||
<li><a href="about">About</a></li> | ||
<li><a href="problems">Problems</a></li> | ||
<li><a href="tutorials">Tutorials</a></li> | ||
</ul> | ||
<form class="navbar-form navbar-right"> | ||
<div class="form-group"> | ||
<input type="text" placeholder="Email" class="form-control"> | ||
</div> | ||
<div class="form-group"> | ||
<input type="password" placeholder="Password" class="form-control"> | ||
</div> | ||
<button type="submit" class="btn btn-success">Sign in</button> | ||
</form> | ||
</div> | ||
</div> | ||
</nav> | ||
|
||
<div class="jumbotron"> | ||
<div class="container"> | ||
<h1>Finding earthquake epicenters</h1> | ||
|
||
<h2 data-toggle="collapse" data-target="#background"><a href="#">Background</a></h2> | ||
<div id="background" class="collapse"> | ||
<p><b>Required maths</b>: Equation of a circle.</p> | ||
|
||
<p>An earthquake is a shaking of the surface of the Earth due to sudden movements in tectonic plates. The plates are always moving but could get stuck at places due to friction, accumulating pent up elastic strain energy. The sudden movements | ||
release this energy as seismic waves that travel through the Earth away from the earthquake. These seismic waves are detected by seismographs and come in two forms; P-waves and S-waves. P (primary or pressure) waves are longitudinal | ||
waves formed from alternating compressions and are detected first by the seismograph. S (secondary or shear) waves are transverse waves. P-waves are detected first because longitudinal waves travel faster than the transverse S-waves | ||
in the Earth. (This is a general result as Poisson’s ratio is below 1 for most naturally occurring materials.)</p> | ||
|
||
<p>Knowing the velocities of the P and S-waves, and the difference in the arrival times of the P and S-waves, a seismograph station can determine how far away an earthquake's epicenter is. The epicenter is the point on the Earth's surface | ||
where the earthquake originated, but not its exact location as earthquakes could occur deep underground. Two seismographs can pinpoint the epicenter down to two possible locations and three are required to determine the epicenter uniquely.</p> | ||
</div> | ||
|
||
<h2 data-toggle="collapse" data-target="#question"><a href="#">Question</a></h2> | ||
<div id="question" class="collapse in"> | ||
<p>An earthquake occurs at some unknown location $(x,y), -100 | ||
< x,y < 100 \; [\mathrm{km}]$. Modeling the Earth | ||
's surface as a flat 2D plane, the earthquake emits seismic waves which travel through the Earth and are detected by three seismographs. Given the arrival times of the faster P-waves and slower S-waves, and the locations of the three seismographs, determine the earthquake's source or epicenter $(x,y)$. Assume P-waves travel at a constant 6 km/s and S-waves travel at a constant 3 km/s. We | ||
're also assuming that the earthquake happens very close to the surface and that the seismographs are close to each other so the Earth's curvature is negligible.</p> | ||
</div> | ||
|
||
<h2 data-toggle="collapse" data-target="#input"><a href="#">Input</a></h2> | ||
<div id="input" class="collapse"> | ||
<p>One line for each earthquake event, containing the x and y-coordinates of the seismograph and the difference in arrival times of the P and S-waves.</p> | ||
|
||
<div class="panel panel-default"> | ||
<div class="panel-heading">Example input</div> | ||
<div class="panel-body" style="font-family: monospace;"> | ||
x1 y1 t1 x2 y2 t2 x3 y3 t3<br> 8.38235322677 -58.0037208141 12.8607541935 -13.590571819 73.976069096 22.8474885484 77.2911723706 7.50876445638 5.76780978383 | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<h2 data-toggle="collapse" data-target="#output"><a href="#">Output</a></h2> | ||
<div id="output" class="collapse"> | ||
<p>A single line for each earthquake event giving the (x,y) coordinate of the earthquake in kilometers.</p> | ||
|
||
<div class="panel panel-default"> | ||
<div class="panel-heading">Example output</div> | ||
<div class="panel-body" style="font-family: monospace;"> | ||
79.0674612756 -27.0524778103 | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<!-- <h3>Submit Your Answer</h3> | ||
<div class="input-group"> | ||
<span class="input-group-addon" id="basic-addon3"><span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span></span> | ||
<input type="text" class="form-control" id="basic-url" aria-describedby="basic-addon3"> | ||
</div> --> | ||
|
||
<h3>Submit Your Code</h3> | ||
<input id="input-1" type="file" class="file"> | ||
</div> | ||
</div> | ||
|
||
<div class="container"> | ||
<footer> | ||
<p style="text-align: center;">© 2016 Project Lovelace, Inc.</p> | ||
</footer> | ||
</div> | ||
|
||
<!-- Bootstrap core JavaScript & jQuery --> | ||
<!-- Placed at the end of the document so the pages load faster --> | ||
<script src="https://code.jquery.com/jquery-3.1.1.js" integrity="sha256-16cdPddA6VdVInumRGo6IbivbERE8p7CQR3HzTBuELA=" crossorigin="anonymous"></script> | ||
<script> window.jQuery || alert("jQuery could not be loaded."); </script> | ||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> | ||
</body> | ||
</html> |
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
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,97 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="description" content=""> | ||
<meta name="author" content=""> | ||
<link rel="icon" type="image/png" sizes="96x96" href="img/favicon.png"> | ||
|
||
<title>First-order equation: The Euler method | Project Lovelace</title> | ||
|
||
<!-- Bootstrap core CSS with Jumbotron Theme --> | ||
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> | ||
<link href="css/jumbotron.css" rel="stylesheet"> | ||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> | ||
|
||
<!-- MathJax --> | ||
<script type="text/x-mathjax-config"> | ||
MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}}); | ||
</script> | ||
<script type="text/javascript" async src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_CHTML"></script> | ||
</head> | ||
|
||
<body> | ||
<nav class="navbar navbar-inverse navbar-fixed-top"> | ||
<div class="container"> | ||
<div class="navbar-header"> | ||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> | ||
<span class="sr-only">Toggle navigation</span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
</button> | ||
<a class="navbar-brand" href="/">Project Lovelace</a> | ||
</div> | ||
<div id="navbar" class="navbar-collapse collapse"> | ||
<ul class="nav navbar-nav"> | ||
<li><a href="about">About</a></li> | ||
<li><a href="problems">Problems</a></li> | ||
<li><a href="tutorials">Tutorials</a></li> | ||
</ul> | ||
<form class="navbar-form navbar-right"> | ||
<div class="form-group"> | ||
<input type="text" placeholder="Email" class="form-control"> | ||
</div> | ||
<div class="form-group"> | ||
<input type="password" placeholder="Password" class="form-control"> | ||
</div> | ||
<button type="submit" class="btn btn-success">Sign in</button> | ||
</form> | ||
</div> | ||
</div> | ||
</nav> | ||
|
||
<div class="jumbotron"> | ||
<div class="container"> | ||
<h1>First-order equations: The Euler method</h1> | ||
|
||
<h2 data-toggle="collapse" data-target="#background"><a href="#">Background</a></h2> | ||
<div id="background" class="collapse in"> | ||
<p><b>Required maths</b>: Differential calculus.</p> | ||
|
||
<p>The laws of nature are often written down in terms of differential equations. A differential equation in a dependent variable $x(t)$ is any equation containing $x(t)$ and its derivatives $\frac{dx}{dt}, \frac{d^2x}{dt^2}, \ldots$. For | ||
example, if $P = P(t)$ denoted the population of rabbits on a university campus as a function of time then the population can be modelled by the differential equation $$ \frac{dP}{dt} = \left( 1 - \frac{P}{K} \right) rP $$ where $K$ | ||
is the "carrying capacity" or the maximum number of rabbits allowed the campus can sustain according to the model and $r$ is the growth rate of the rabbits.</p> | ||
|
||
<p>Most differential equations you encounter cannot be solved analytically (this one can though!) and so we turn to computers. The first step is to approximate the derivative $$ \frac{\Delta P}{\Delta t} = \left( 1 - \frac{P(t - \Delta t}{K} | ||
\right) rP(t - \Delta t) $$</p> | ||
|
||
</div> | ||
|
||
<!-- <h3>Submit Your Answer</h3> | ||
<div class="input-group"> | ||
<span class="input-group-addon" id="basic-addon3"><span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span></span> | ||
<input type="text" class="form-control" id="basic-url" aria-describedby="basic-addon3"> | ||
</div> --> | ||
|
||
<h3>Submit Your Code</h3> | ||
<input id="input-1" type="file" class="file"> | ||
</div> | ||
</div> | ||
|
||
<div class="container"> | ||
<footer> | ||
<p style="text-align: center;">© 2016 Project Lovelace, Inc.</p> | ||
</footer> | ||
</div> | ||
|
||
<!-- Bootstrap core JavaScript & jQuery --> | ||
<!-- Placed at the end of the document so the pages load faster --> | ||
<script src="https://code.jquery.com/jquery-3.1.1.js" integrity="sha256-16cdPddA6VdVInumRGo6IbivbERE8p7CQR3HzTBuELA=" crossorigin="anonymous"></script> | ||
<script> window.jQuery || alert("jQuery could not be loaded."); </script> | ||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> | ||
</body> | ||
</html> |
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,75 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="description" content=""> | ||
<meta name="author" content=""> | ||
<link rel="icon" type="image/png" sizes="96x96" href="img/favicon.png"> | ||
|
||
<title>About | Project Lovelace</title> | ||
|
||
<!-- Bootstrap core CSS with Jumbotron Theme --> | ||
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> | ||
<link href="css/jumbotron.css" rel="stylesheet"> | ||
</head> | ||
|
||
<body> | ||
<nav class="navbar navbar-inverse navbar-fixed-top"> | ||
<div class="container"> | ||
<div class="navbar-header"> | ||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> | ||
<span class="sr-only">Toggle navigation</span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
</button> | ||
<a class="navbar-brand" href="/">Project Lovelace</a> | ||
</div> | ||
<div id="navbar" class="navbar-collapse collapse"> | ||
<ul class="nav navbar-nav"> | ||
<li class="active"><a href="about">About</a></li> | ||
<li><a href="problems">Problems</a></li> | ||
<li><a href="tutorials">Tutorials</a></li> | ||
</ul> | ||
<form class="navbar-form navbar-right"> | ||
<div class="form-group"> | ||
<input type="text" placeholder="Email" class="form-control"> | ||
</div> | ||
<div class="form-group"> | ||
<input type="password" placeholder="Password" class="form-control"> | ||
</div> | ||
<button type="submit" class="btn btn-success">Sign in</button> | ||
</form> | ||
</div> | ||
</div> | ||
</nav> | ||
|
||
<!-- Main jumbotron for a primary marketing message or call to action --> | ||
<div class="jumbotron"> | ||
<div class="container"> | ||
<h1>About</h1> | ||
|
||
<h2>What is Project Lovelace?</h2> | ||
<p>Lovelace is a collection of computational science problems taken from all branches of the natural and social sciences. Each problem requires the use of scientific insight and some programming skills to solve. Whether you're looking to know | ||
more about science or improve your coding skills, we hope you have fun solving the problems!</p> | ||
|
||
<p>Lovelace draws inspiration from similar projects such as <a href="https://projecteuler.net/">Project Euler</a> and <a href="http://rosalind.info/">Rosalind</a>. The name commemorates <a href="https://en.wikipedia.org/wiki/Ada_Lovelace">Ada Lovelace</a> who proposed the first algorithm to be run on a computer in the 1840's.</p> | ||
|
||
<!-- By tackling problems we hope that you learn more about science as well as the compuational methods used in the different sciences. Most importantly however, we hope that the time you spend leads to a greater understanding of the world we live in and how we study it. --> | ||
|
||
<h2>What will I get out of this?</h2> | ||
<p>If you are a student, programmer, or are just interested in science, we hope these problems will satisfy your scientific curiosity while allowing you to hone your programming skills in a fun way.</p> | ||
<p>If you are a researcher, we also hope the computational methods you learn shed some insight into how other scientists solve problems and might even inspire you to implement what you learn in your research.</p> | ||
</div> | ||
</div> | ||
|
||
<!-- Bootstrap core JavaScript & jQuery --> | ||
<!-- Placed at the end of the document so the pages load faster --> | ||
<script src="https://code.jquery.com/jquery-3.1.1.js" integrity="sha256-16cdPddA6VdVInumRGo6IbivbERE8p7CQR3HzTBuELA=" crossorigin="anonymous"></script> | ||
<script> window.jQuery || alert("jQuery could not be loaded."); </script> | ||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.