-
Notifications
You must be signed in to change notification settings - Fork 95
/
index.html
242 lines (218 loc) · 9.94 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>VirtualSky - Canvas Experiment</title>
<!--
VirtualSky <canvas> application
(c) 2010 Stuart Lowe (Las Cumbras Observatory Global Telescope)
-->
<link rel="stylesheet" type="text/css" media="screen" href="extra/prettify.css">
<style>
body {
font-family: 'Trebuchet MS',Tahoma,Helvetica,Verdana,sans-serif;
color: black;
}
h1 { margin-top: 2em; }
ol {
margin: 0px;
padding: 0px;
counter-reset: li; /* Initiate a counter */
list-style: none; /* Remove default numbering */
*list-style: decimal; /* Keep using default numbering for IE6/7 */
}
ol li.example:before{
content: "Example " counter(li) ": ";
counter-increment: li;
font-size: 1.5em;
line-height: 2em;
text-align: left;
font-weight: bold;
display: block;
}
li.example { margin-bottom: 4em; }
.virtualskyhelp li { margin-bottom: 0; }
.planetarium { max-width: 100%; height: 0;}
</style>
<!--[if lt IE 9]><script src="excanvas.min.js"></script><![endif]-->
<script src="jquery-1.10.0.min.js"></script>
<script src="virtualsky.js" type="text/javascript"></script>
<script src="extra/prettify.js" type="text/javascript"></script>
<script>
$(document).ready(function() {
// Set up the prettification of code blocks
prettyPrint();
var planetarium = $.virtualsky({id:'starmap1'});
var planetarium2 = $.virtualsky({id:'starmap2',projection:'stereo',az:225,constellations:true,constellationboundaries:true,boundaries:[
["And",343,34.5,343,52.5,350,52.5,350,50,353.75,50,353.75,48,2.5,48,2.5,46,13,46,13,48,16.75,48,16.75,50,20.5,50,25,50,25,47,30.625,47,30.625,50.5,37.75,50.5,37.75,36.75,30,36.75,30,35,21.125,35,21.125,33,10.75,33,10.75,23.75,12.75,23.75,12.75,21,2.125,21,2.125,22,1,22,1,28,0,28,0,31.33333,356.25,31.33333,356.25,32.08333,352.5,32.08333,352.5,34.5,343,34.5],
["Ori",69.25,0,69.25,15.5,74.5,15.5,74.5,16,80,16,80,15.5,84,15.5,84,12.5,86.5,12.5,86.5,18,85.5,18,85.5,22.83333,88.25,22.83333,88.25,21.5,93.25,21.5,93.25,17.5,94.625,17.5,94.625,12,94.625,10,93.625,10,93.625,0,93.625,-4,87.5,-4,87.5,-11,76.25,-11,76.25,-4,70,-4,70,0,69.25,0]
],clock:new Date("July 17, 2013 18:39:00 GMT")
});
var planetarium3 = $.virtualsky({id:'starmap3', projection:'stereo', mouse:true, keyboard:true, latitude:34.4326, longitude:-119.86286});
var planetarium4 = $.virtualsky({id:'starmap4', projection:'lambert', mouse:true, keyboard:false, az:0, negative:true, constellations:true, latitude:53.5, longitude:-2.5});
var planetarium5 = $.virtualsky({id:'starmap5', projection:'stereo', keyboard:false, mouse:false, az:135, latitude:38.25, longitude:-122.6, meridian: true, clock:new Date("October 25, 1985 01:21:00"), gridlines_gal: true});
var planetarium6 = $.virtualsky({id:'starmap6', projection:'mollweide', showstarlabels:true, az:180, ground:true});
var planetarium7 = $.virtualsky({
id: 'starmap7',
projection: 'stereo',
clock:new Date("July 17, 2013 18:39:00 GMT")
});
planetarium7.addPointer({
'ra':83.8220792,
'dec':-5.3911111,
'label':'Orion Nebula',
'img':'http://server7.sky-map.org/imgcut?survey=DSS2&w=128&h=128&ra=5.58813861333333&de=-5.3911111&angle=1.25&output=PNG',
'url':'http://simbad.u-strasbg.fr/simbad/sim-id?Ident=M42',
'credit':'Wikisky',
colour:'rgb(255,220,220)'
});
});
</script>
</head>
<body>
<div style="max-width:940px;margin:auto;">
<h1>VirtualSky</h1>
<p>VirtualSky a browser-based planetarium from <a href="http://lcogt.net/">LCOGT</a> that lets you see what is visible in the sky from any location on Earth. It can be <a href="http://lcogt.net/virtualsky/embed/custom.html">customized and included on your own website</a>, blog etc. It is provided freely for educational and non-profit use.</p>
<h2>Instructions for embedding</h2>
<p>The <a href="http://lcogt.net/virtualsky/embed/custom.html">easiest way to include VirtualSky</a> on your website is to use the custom form to create an embed link (uses an <code><iframe></code>).</p>
<p>Sometimes an <code><iframe></code> just doesn't give you the flexibility you need (or you might want to include it in an offline page during a public talk). In that case you could download a copy of <a href="https://github.com/slowe/VirtualSky">the source from GitHub</a> and include VirtualSky in your page using Javascript. You will need to include the following code block in the <code><head></code> of your page:</p>
<pre class="prettyprint lang-html lang-js">
<!--[if lt IE 9]><script src="excanvas.min.js"></script><![endif]-->
<script src="jquery-1.10.0.min.js"></script>
<script src="virtualsky.min.js" type="text/javascript"></script>
<script>
$(document).ready(function() {
var planetarium = $.virtualsky({
id: 'starmap1'
});
});
</script>
</pre>
<p>Make sure the scripts point to the correct locations for the Javascript files. In the <code><body></code> you need to include the DOM element you've referenced by ID:</p>
<pre class="prettyprint lang-html">
<div id="starmap1" style="width:400px;height:400px;"></div>
</pre>
<p>The result is:</p>
<div id="starmap1" class="planetarium" style="width:400px;height:400px;"></div>
<p>That is a version of VirtualSky with all the default options. However, one of the great things about VirtualSky is that it can be customised. Here are some examples to give you some ideas:</p>
<ol>
<li class="example">A <code>stereo</code> projection set for Santa Barbara's lat/long:
<pre class="prettyprint lang-js">
$(document).ready(function() {
var planetarium = $.virtualsky({
id: 'starmap',
projection: 'stereo',
latitude: 34.4326,
longitude: -119.86286
});
});</pre>
<pre class="prettyprint lang-html">
<div id="starmap" style="width:100%;height:500px;"></div>
</pre>
<div id="starmap3" class="planetarium" style="width:100%;height:500px;"></div>
</li>
<li class="example">A <code>lambert</code> projection, with constellations shown, no keyboard control and a black-on-white view. It is based in Manchester,UK and facing north:
<pre class="prettyprint lang-js">
$(document).ready(function() {
var planetarium = $.virtualsky({
id: 'starmap',
projection: 'lambert',
mouse: true,
keyboard: false,
az: 0,
negative: true,
constellations: true,
latitude: 53.5,
longitude: -2.5
});
});</pre>
<pre class="prettyprint lang-html">
<div id="starmap" style="width:500px;height:300px;"></div>
</pre>
<div id="starmap4" class="planetarium" style="width:500px;height:300px;"></div>
</li>
<li class="example">A <code>stereo</code> projection with no keyboard or mouse input and with a Galactic grid and the Meridian line displayed. The view is facing south east from Hill Valley, California at 1:21 am on October 25, 1985.
<pre class="prettyprint lang-js">
$(document).ready(function() {
var planetarium = $.virtualsky({
id: 'starmap',
projection: 'stereo',
keyboard: false,
mouse: false,
az: 135,
meridian: true,
latitude: 38.25,
longitude: -122.6,
clock: new Date("October 25, 1985 01:21:00"),
gridlines_gal: true
});
});</pre>
<pre class="prettyprint lang-html">
<div id="starmap" style="width:650px;height:300px;"></div>
</pre>
<div id="starmap5" class="planetarium" style="width:650px;height:300px;"></div>
</li>
<li class="example">A <code>mollweide</code> projection with with star labels drawn and the ground blocking half the sky.
<pre class="prettyprint lang-js">
$(document).ready(function() {
var planetarium = $.virtualsky({
id: 'starmap',
projection: 'mollweide',
showstarlabels: true,
ground: true
});
});</pre>
<pre class="prettyprint lang-html">
<div id="starmap" style="width:920px;height:460px;"></div>
</pre>
<div id="starmap6" class="planetarium" style="width:920px;height:460px;"></div>
</li>
<li class="example">A default view with a <code>stereo</code> projection, constellation lines and two manually specified constellation boundaries (note that RA/Dec for boundaries are assumed to be in B1875).
<pre class="prettyprint lang-js">
$(document).ready(function() {
var planetarium = $.virtualsky({
id: 'starmap',
az: 225,
projection: 'stereo',
constellations: true,
constellationboundaries: true,
boundaries: [
["And",343,34.5,343,52.5,350,52.5,350,50,353.75,50,353.75,48,2.5,48,2.5,46,13,46,13,48,16.75,48,16.75,50,20.5,50,25,50,25,47,30.625,47,30.625,50.5,37.75,50.5,37.75,36.75,30,36.75,30,35,21.125,35,21.125,33,10.75,33,10.75,23.75,12.75,23.75,12.75,21,2.125,21,2.125,22,1,22,1,28,0,28,0,31.33333,356.25,31.33333,356.25,32.08333,352.5,32.08333,352.5,34.5,343,34.5],
["Ori",69.25,0,69.25,15.5,74.5,15.5,74.5,16,80,16,80,15.5,84,15.5,84,12.5,86.5,12.5,86.5,18,85.5,18,85.5,22.83333,88.25,22.83333,88.25,21.5,93.25,21.5,93.25,17.5,94.625,17.5,94.625,12,94.625,10,93.625,10,93.625,0,93.625,-4,87.5,-4,87.5,-11,76.25,-11,76.25,-4,70,-4,70,0,69.25,0]
],
clock:new Date("July 17, 2013 18:39:00 GMT")
});
});
</pre>
<pre class="prettyprint lang-html">
<div id="starmap" style="width:944px;height:400px;"></div>
</pre>
<div id="starmap2" class="planetarium" style="width:944x;height:400px;"></div>
</li>
<li class="example">A default view using <code>stereo</code> projection with a place marker
<pre class="prettyprint lang-js">
$(document).ready(function() {
var planetarium = $.virtualsky({
id: 'starmap',
projection: 'stereo',
});
planetarium.addPointer({
'ra':83.8220792,
'dec':-5.3911111,
'label':'Orion Nebula',
'img':'http://server7.sky-map.org/imgcut?survey=DSS2&w=128&h=128&ra=5.58813861333333&de=-5.3911111&angle=1.25&output=PNG',
'url':'http://simbad.u-strasbg.fr/simbad/sim-id?Ident=M42',
'credit':'Wikisky',
colour:'rgb(255,220,220)'
})
});
</pre>
<pre class="prettyprint lang-html">
<div id="starmap" style="width:944px;height:400px;"></div>
</pre>
<div id="starmap7" class="planetarium" style="width:944x;height:400px;"></div>
</li>
</ol>
</div>
</body>
</html>