<commit_before><!doctype html>
<html>
	<head>
		<title>Asterank - 3D Asteroid Orbit Space Simulation</title>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
		<link  href="css/main.css" rel="stylesheet"/>
	</head>
<body>
  <noscript>Sorry, this page requires Canvas/WebGL, so you'll need to enable JavaScript.</noscript>

  <script type="x-shader/x-vertex" id="vertexshader">
    #define pi 3.141592653589793238462643383279

    varying vec2 vUv;

    attribute vec3 value_color;
    varying vec3 vColor;

    attribute float size;

    uniform float earth_i;
    uniform float earth_om;

    uniform float jed;

    attribute float a;
    attribute float e;
    attribute float i;
    attribute float o;
    attribute float P;
    attribute float ma;
    attribute float n;
    attribute float w;
    attribute float epoch;

    attribute float locked;
    varying float vLocked;

    vec3 getAstroPos() {
      float i_rad = (i - earth_i) * pi/180.0;
      float o_rad = (o - earth_om) * pi/180.0; // longitude of ascending node
      float p_rad = w * pi/180.0; // longitude of perihelion
      float ma_rad = ma * pi/180.0;
      float n_rad;
      if (P > 0.) {
        n_rad = 2.0 * pi / P;
      }
      else {
        n_rad = n * pi/180.0; // mean motion
      }

      float d = epoch - jed;
      float M = ma_rad + n_rad * d;

      // Estimate eccentric and true anom using iterative approx
      float E0 = M;
      // converted do/while:
      float E1 = M + e * sin(E0);
      float lastdiff = abs(E1-E0);
      E0 = E1;
      for (int foo=0; foo < 6; foo++) {
        E1 = M + e * sin(E0);
        lastdiff = abs(E1-E0);
        E0 = E1;
        if (lastdiff > 0.0000001) {
          break;
        }
      }
      float E = E0;
      float v = 2.0 * atan(sqrt((1.0+e)/(1.0-e)) * tan(E/2.0));

      // radius vector, in AU
      float r = a * (1.0 - e*e) / (1.0 + e * cos(v)) * {{PIXELS_PER_AU}};

      // heliocentric coords
      float X = r * (cos(o_rad) * cos(v + p_rad - o_rad) - sin(o_rad) * sin(v + p_rad - o_rad) * cos(i_rad));
      float Y = r * (sin(o_rad) * cos(v + p_rad - o_rad) + cos(o_rad) * sin(v + p_rad - o_rad) * cos(i_rad));
      float Z = r * (sin(v + p_rad - o_rad) * sin(i_rad));
      return vec3(X, Y, Z);
    }

    void main() {
      vColor = value_color;
      vLocked = locked;

      vec3 newpos = getAstroPos();
      vec4 mvPosition = modelViewMatrix * vec4(newpos, 1.0);
      gl_Position = projectionMatrix * mvPosition;
      gl_PointSize = size;
    }
  </script>
  <script type="x-shader/x-fragment" id="fragmentshader">
    varying vec2 vUv;
    varying vec3 vColor;
    varying float vLocked;
    uniform vec3 color;
    uniform sampler2D small_roid_texture;
    uniform sampler2D small_roid_circled_texture;

    void main() {
      if (vLocked == 0.0) {
      gl_FragColor = vec4(vColor, 1.0) * texture2D(small_roid_texture,
        vec2(gl_PointCoord.x, 1.0 - gl_PointCoord.y));
      }
      else {
      gl_FragColor = vec4(vColor, 1.0) * texture2D(small_roid_circled_texture,
        vec2(gl_PointCoord.x, 1.0 - gl_PointCoord.y));
      }
    }
  </script>

  <div id="sidebar">
    <p>
    <a href="/">&laquo; Main site</a>
    </p>
    <div class="fb-like" data-href="http://www.asterank.com/3d" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false"></div>
    <a style="font-size:10px;" href="https://twitter.com/share" class="twitter-share-button" data-lang="en">Tweet</a>
<div>
    <g:plusone size="small" count="false"></g:plusone>
</div>

    <hr/>
    <div id="objects-of-interest-container" style="text-align:center;display:none;">
      <span>Significant Objects (est. value)</span>
      <table id="objects-of-interest">
        <tr id="sun-selector" data-full-name="sun" style="background-color:green;">
          <td colspan="2"><a href="#">Sun</a> (default view)</td>
        </tr>
        <tr id="earth-selector" data-full-name="earth">
          <td colspan="2"><a href="#">Earth</a></td>
        </tr>
      </table>

    </div>
  </div>
	<!-- three.js container -->
  <div id="container"></div>
	<!-- info on screen display -->
  <div id="loading">
    <img src="/images/loader.gif"/> Loading <span id="loading-text"></span>...
  </div>
  <div id="not-supported" style="display:none;">
    <p>
    <strong>Sorry, your computer or browser doesn't support webgl.  Most features of the simulation will not be available.</strong>
    </p>
    <p>
    You may be able to see the simulation if you..
    </p>
    <h2><a href="http://google.com/chrome">Get Chrome</a><br>or<br><a href="http://getfirefox.com">Get Firefox</a></h2>
    <p>
    <input type="submit" onClick="$('#not-supported').hide();return false;" value="Ignore for now"/>
    </p>
  </div>
	<div id="info">
    <div id="caption-container">
      <div id="main-caption" class="top">
      </div>
      <div id="other-caption" class="top">
      </div>
    </div>
		<div class="bottom" id="inlineDoc" >
      <span style="font-size:12px;color:#fff">
      <strong>Rotate</strong>: left click + drag; <strong>Pan</strong>: right click + drag
      <br>
      <strong>Zoom</strong>: scroll/middle click + drag; <strong>Fullscreen</strong>: press f
      <br>
      The location of all objects shown is scientifically accurate.</span>
		</div>
	</div>
  <script src="vendor/vendor.min.js"></script>
  <!--<script src="vendor/three.js/Stats.js"></script>-->
  <!--<script src="../js/lib/jquery.min.js"></script>-->
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
  <script src="js/Worker.js"></script>
  <script src="js/ephemeris.js"></script><commit_msg>specify need for gfx card support<commit_after><!doctype html>
<html>
	<head>
		<title>Asterank - 3D Asteroid Orbit Space Simulation</title>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
		<link  href="css/main.css" rel="stylesheet"/>
	</head>
<body>
  <noscript>Sorry, this page requires Canvas/WebGL, so you'll need to enable JavaScript.</noscript>

  <script type="x-shader/x-vertex" id="vertexshader">
    #define pi 3.141592653589793238462643383279

    varying vec2 vUv;

    attribute vec3 value_color;
    varying vec3 vColor;

    attribute float size;

    uniform float earth_i;
    uniform float earth_om;

    uniform float jed;

    attribute float a;
    attribute float e;
    attribute float i;
    attribute float o;
    attribute float P;
    attribute float ma;
    attribute float n;
    attribute float w;
    attribute float epoch;

    attribute float locked;
    varying float vLocked;

    vec3 getAstroPos() {
      float i_rad = (i - earth_i) * pi/180.0;
      float o_rad = (o - earth_om) * pi/180.0; // longitude of ascending node
      float p_rad = w * pi/180.0; // longitude of perihelion
      float ma_rad = ma * pi/180.0;
      float n_rad;
      if (P > 0.) {
        n_rad = 2.0 * pi / P;
      }
      else {
        n_rad = n * pi/180.0; // mean motion
      }

      float d = epoch - jed;
      float M = ma_rad + n_rad * d;

      // Estimate eccentric and true anom using iterative approx
      float E0 = M;
      // converted do/while:
      float E1 = M + e * sin(E0);
      float lastdiff = abs(E1-E0);
      E0 = E1;
      for (int foo=0; foo < 6; foo++) {
        E1 = M + e * sin(E0);
        lastdiff = abs(E1-E0);
        E0 = E1;
        if (lastdiff > 0.0000001) {
          break;
        }
      }
      float E = E0;
      float v = 2.0 * atan(sqrt((1.0+e)/(1.0-e)) * tan(E/2.0));

      // radius vector, in AU
      float r = a * (1.0 - e*e) / (1.0 + e * cos(v)) * {{PIXELS_PER_AU}};

      // heliocentric coords
      float X = r * (cos(o_rad) * cos(v + p_rad - o_rad) - sin(o_rad) * sin(v + p_rad - o_rad) * cos(i_rad));
      float Y = r * (sin(o_rad) * cos(v + p_rad - o_rad) + cos(o_rad) * sin(v + p_rad - o_rad) * cos(i_rad));
      float Z = r * (sin(v + p_rad - o_rad) * sin(i_rad));
      return vec3(X, Y, Z);
    }

    void main() {
      vColor = value_color;
      vLocked = locked;

      vec3 newpos = getAstroPos();
      vec4 mvPosition = modelViewMatrix * vec4(newpos, 1.0);
      gl_Position = projectionMatrix * mvPosition;
      gl_PointSize = size;
    }
  </script>
  <script type="x-shader/x-fragment" id="fragmentshader">
    varying vec2 vUv;
    varying vec3 vColor;
    varying float vLocked;
    uniform vec3 color;
    uniform sampler2D small_roid_texture;
    uniform sampler2D small_roid_circled_texture;

    void main() {
      if (vLocked == 0.0) {
      gl_FragColor = vec4(vColor, 1.0) * texture2D(small_roid_texture,
        vec2(gl_PointCoord.x, 1.0 - gl_PointCoord.y));
      }
      else {
      gl_FragColor = vec4(vColor, 1.0) * texture2D(small_roid_circled_texture,
        vec2(gl_PointCoord.x, 1.0 - gl_PointCoord.y));
      }
    }
  </script>

  <div id="sidebar">
    <p>
    <a href="/">&laquo; Main site</a>
    </p>
    <div class="fb-like" data-href="http://www.asterank.com/3d" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false"></div>
    <a style="font-size:10px;" href="https://twitter.com/share" class="twitter-share-button" data-lang="en">Tweet</a>
<div>
    <g:plusone size="small" count="false"></g:plusone>
</div>

    <hr/>
    <div id="objects-of-interest-container" style="text-align:center;display:none;">
      <span>Significant Objects (est. value)</span>
      <table id="objects-of-interest">
        <tr id="sun-selector" data-full-name="sun" style="background-color:green;">
          <td colspan="2"><a href="#">Sun</a> (default view)</td>
        </tr>
        <tr id="earth-selector" data-full-name="earth">
          <td colspan="2"><a href="#">Earth</a></td>
        </tr>
      </table>

    </div>
  </div>
	<!-- three.js container -->
  <div id="container"></div>
	<!-- info on screen display -->
  <div id="loading">
    <img src="/images/loader.gif"/> Loading <span id="loading-text"></span>...
  </div>
  <div id="not-supported" style="display:none;">
    <p>
    <strong>Sorry, your browser or graphics card doesn't support webgl.  Most features of the simulation will not be available.</strong>
    </p>
    <p>
    You may be able to see the simulation if you..
    </p>
    <h2><a href="http://google.com/chrome">Get Chrome</a><br>or<br><a href="http://getfirefox.com">Get Firefox</a></h2>
    <p>
    <input type="submit" onClick="$('#not-supported').hide();return false;" value="Ignore for now"/>
    </p>
  </div>
	<div id="info">
    <div id="caption-container">
      <div id="main-caption" class="top">
      </div>
      <div id="other-caption" class="top">
      </div>
    </div>
		<div class="bottom" id="inlineDoc" >
      <span style="font-size:12px;color:#fff">
      <strong>Rotate</strong>: left click + drag; <strong>Pan</strong>: right click + drag
      <br>
      <strong>Zoom</strong>: scroll/middle click + drag; <strong>Fullscreen</strong>: press f
      <br>
      The location of all objects shown is scientifically accurate.</span>
		</div>
	</div>
  <script src="vendor/vendor.min.js"></script>
  <!--<script src="vendor/three.js/Stats.js"></script>-->
  <!--<script src="../js/lib/jquery.min.js"></script>-->
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
  <script src="js/Worker.js"></script>
  <script src="js/ephemeris.js"></script>
{'fraction_non_alphanumeric': 0.169921027510197, 'fraction_numerical': 0.02464635945500304, 'mean_word_length': 2.6273213723638653, 'pattern_counts': {'":': 0, '<': 231, '<?xml version=': 0, '>': 233, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5491677', 'n_tokens_mistral': 4286, 'n_tokens_neox': 4099, 'n_words': 973}