-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexoplanet_transits_Simulation.xhtml
1140 lines (996 loc) · 66.5 KB
/
exoplanet_transits_Simulation.xhtml
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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="_ejs_library/css/ejss.css" />
<script src="_ejs_library/scripts/common_script.js"></script>
<script src="_ejs_library/scripts/textresizedetector.js"></script>
<script src="_ejs_library/ejsS.v1.min.js"></script>
<script type="text/javascript"><!--//--><![CDATA[//><!--
/* _inputParameters: an object with different values for the model parameters */
function exoplanet_transits(_topFrame,_libraryPath,_codebasePath, _inputParameters) {
var _model = EJSS_CORE.createAnimationLMS();
var _view;
var _isPlaying = false;
var _isPaused = true;
var _isMobile = (navigator===undefined) ? false : navigator.userAgent.match(/iPhone|iPad|iPod|Android|BlackBerry|Opera Mini|IEMobile/i);
var _stringProperties = {};
var _tools = {
showInputDialog : EJSS_INTERFACE.BoxPanel.showInputDialog,
showOkDialog : EJSS_INTERFACE.BoxPanel.showOkDialog,
showOkCancelDialog : EJSS_INTERFACE.BoxPanel.showOkCancelDialog,
downloadText: EJSS_TOOLS.File.downloadText,
uploadText: function(action) { EJSS_TOOLS.File.uploadText(_model,action); }
};
function _play() { _isPaused = false; _isPlaying = true; _model.play(); }
function _pause() { _isPaused = true; _isPlaying = false; _model.pause(); }
function _step() { _pause(); _model.step(); }
function _reset() { _model.reset(); _isPaused = _model.isPaused(); _isPlaying = _model.isPlaying(); }
_model._play = _play;
_model._pause = _pause;
_model._step = _step;
_model._reset = _reset;
function _update() { _model.update(); }
function _initialize() { _model.initialize(); }
function _setFPS(_fps) { _model.setFPS(_fps); }
function _setDelay(_delay) { _model.setDelay(_delay); }
function _setStepsPerDisplay(_spd) { _model.setStepsPerDisplay(_spd); }
function _setUpdateView(_updateView) { _model.setUpdateView(_updateView); }
function _setAutoplay(_auto) { _model.setAutoplay(_auto); }
function _println(_message) { console.log(_message); }
function _breakAfterThisPage() { _model.setShouldBreak(true); }
function _resetSolvers() { if (_model.resetSolvers) _model.resetSolvers(); }
function _saveText(name,type,content) { if (_model.saveText) _model.saveText(name,type,content); }
function _saveState(name) { if (_model.saveState) _model.saveState(name); }
function _saveImage(name,panelname) { if (_model.saveImage) _model.saveImage(name,panelname); }
function _readState(url,type) { if (_model.readState) _model.readState(url,type); }
function _readText(url,type,varname) { if (_model.readText) _model.readText(url,type,varname); }
function _getStringProperty(propertyName) {
var _value = _stringProperties[propertyName];
if (_value===undefined) return propertyName;
else return _value;
}
var __pagesEnabled = [];
function _setPageEnabled(pageName,enabled) { __pagesEnabled[pageName] = enabled; }
var t; // EjsS Model.Variables.Dynamic Variables.t
var dt; // EjsS Model.Variables.Dynamic Variables.dt
var phi; // EjsS Model.Variables.Dynamic Variables.phi
var phi2; // EjsS Model.Variables.Dynamic Variables.phi2
var r; // EjsS Model.Variables.Dynamic Variables.r
var x; // EjsS Model.Variables.Dynamic Variables.x
var y; // EjsS Model.Variables.Dynamic Variables.y
var z; // EjsS Model.Variables.Dynamic Variables.z
var a; // EjsS Model.Variables.Static Variables.a
var e; // EjsS Model.Variables.Static Variables.e
var Rs; // EjsS Model.Variables.Static Variables.Rs
var Re; // EjsS Model.Variables.Static Variables.Re
var b; // EjsS Model.Variables.Static Variables.b
var Rstar; // EjsS Model.Variables.Static Variables.Rstar
var area; // EjsS Model.Variables.Calculation Variables.area
var overlap; // EjsS Model.Variables.Calculation Variables.overlap
var d; // EjsS Model.Variables.Calculation Variables.d
var Y; // EjsS Model.Variables.Calculation Variables.Y
var reflection; // EjsS Model.Variables.Calculation Variables.reflection
var albedo; // EjsS Model.Variables.Calculation Variables.albedo
var occultation; // EjsS Model.Variables.Calculation Variables.occultation
var Y2; // EjsS Model.Variables.Calculation Variables.Y2
var angle; // EjsS Model.Variables.View Variables.angle
var angle2; // EjsS Model.Variables.View Variables.angle2
var noise; // EjsS Model.Variables.View Variables.noise
var showMe; // EjsS Model.Variables.View Variables.showMe
var max; // EjsS Model.Variables.View Variables.max
var min; // EjsS Model.Variables.View Variables.min
var norm; // EjsS Model.Variables.View Variables.norm
var azimuth; // EjsS Model.Variables.View Variables.azimuth
var speed; // EjsS Model.Variables.View Variables.speed
var speed2; // EjsS Model.Variables.View Variables.speed2
var _privateOdesList;
var _ODEi_evolution1;
var userEvents1=[];
_model.getOdes = function() { return [_ODEi_evolution1]; };
_model.removeEvents = function(){
userEvents1=[];
};
function _serialize() { return _model.serialize(); }
_model._userSerialize = function() {
return {
t : t,
dt : dt,
phi : phi,
phi2 : phi2,
r : r,
x : x,
y : y,
z : z,
a : a,
e : e,
Rs : Rs,
Re : Re,
b : b,
Rstar : Rstar,
area : area,
overlap : overlap,
d : d,
Y : Y,
reflection : reflection,
albedo : albedo,
occultation : occultation,
Y2 : Y2,
angle : angle,
angle2 : angle2,
noise : noise,
showMe : showMe,
max : max,
min : min,
norm : norm,
azimuth : azimuth,
speed : speed,
speed2 : speed2
};
};
function _serializePublic() { return _model.serializePublic(); }
_model._userSerializePublic = function() {
return {
t : t,
dt : dt,
phi : phi,
phi2 : phi2,
r : r,
x : x,
y : y,
z : z,
a : a,
e : e,
Rs : Rs,
Re : Re,
b : b,
Rstar : Rstar,
area : area,
overlap : overlap,
d : d,
Y : Y,
reflection : reflection,
albedo : albedo,
occultation : occultation,
Y2 : Y2,
angle : angle,
angle2 : angle2,
noise : noise,
showMe : showMe,
max : max,
min : min,
norm : norm,
azimuth : azimuth,
speed : speed,
speed2 : speed2
};
};
_model._readParameters = function(json) {
if(typeof json.t != "undefined") t = json.t;
if(typeof json.dt != "undefined") dt = json.dt;
if(typeof json.phi != "undefined") phi = json.phi;
if(typeof json.phi2 != "undefined") phi2 = json.phi2;
if(typeof json.r != "undefined") r = json.r;
if(typeof json.x != "undefined") x = json.x;
if(typeof json.y != "undefined") y = json.y;
if(typeof json.z != "undefined") z = json.z;
if(typeof json.a != "undefined") a = json.a;
if(typeof json.e != "undefined") e = json.e;
if(typeof json.Rs != "undefined") Rs = json.Rs;
if(typeof json.Re != "undefined") Re = json.Re;
if(typeof json.b != "undefined") b = json.b;
if(typeof json.Rstar != "undefined") Rstar = json.Rstar;
if(typeof json.area != "undefined") area = json.area;
if(typeof json.overlap != "undefined") overlap = json.overlap;
if(typeof json.d != "undefined") d = json.d;
if(typeof json.Y != "undefined") Y = json.Y;
if(typeof json.reflection != "undefined") reflection = json.reflection;
if(typeof json.albedo != "undefined") albedo = json.albedo;
if(typeof json.occultation != "undefined") occultation = json.occultation;
if(typeof json.Y2 != "undefined") Y2 = json.Y2;
if(typeof json.angle != "undefined") angle = json.angle;
if(typeof json.angle2 != "undefined") angle2 = json.angle2;
if(typeof json.noise != "undefined") noise = json.noise;
if(typeof json.showMe != "undefined") showMe = json.showMe;
if(typeof json.max != "undefined") max = json.max;
if(typeof json.min != "undefined") min = json.min;
if(typeof json.norm != "undefined") norm = json.norm;
if(typeof json.azimuth != "undefined") azimuth = json.azimuth;
if(typeof json.speed != "undefined") speed = json.speed;
if(typeof json.speed2 != "undefined") speed2 = json.speed2;
};
_model._readParametersPublic = function(json) {
if(typeof json.t != "undefined") t = json.t;
if(typeof json.dt != "undefined") dt = json.dt;
if(typeof json.phi != "undefined") phi = json.phi;
if(typeof json.phi2 != "undefined") phi2 = json.phi2;
if(typeof json.r != "undefined") r = json.r;
if(typeof json.x != "undefined") x = json.x;
if(typeof json.y != "undefined") y = json.y;
if(typeof json.z != "undefined") z = json.z;
if(typeof json.a != "undefined") a = json.a;
if(typeof json.e != "undefined") e = json.e;
if(typeof json.Rs != "undefined") Rs = json.Rs;
if(typeof json.Re != "undefined") Re = json.Re;
if(typeof json.b != "undefined") b = json.b;
if(typeof json.Rstar != "undefined") Rstar = json.Rstar;
if(typeof json.area != "undefined") area = json.area;
if(typeof json.overlap != "undefined") overlap = json.overlap;
if(typeof json.d != "undefined") d = json.d;
if(typeof json.Y != "undefined") Y = json.Y;
if(typeof json.reflection != "undefined") reflection = json.reflection;
if(typeof json.albedo != "undefined") albedo = json.albedo;
if(typeof json.occultation != "undefined") occultation = json.occultation;
if(typeof json.Y2 != "undefined") Y2 = json.Y2;
if(typeof json.angle != "undefined") angle = json.angle;
if(typeof json.angle2 != "undefined") angle2 = json.angle2;
if(typeof json.noise != "undefined") noise = json.noise;
if(typeof json.showMe != "undefined") showMe = json.showMe;
if(typeof json.max != "undefined") max = json.max;
if(typeof json.min != "undefined") min = json.min;
if(typeof json.norm != "undefined") norm = json.norm;
if(typeof json.azimuth != "undefined") azimuth = json.azimuth;
if(typeof json.speed != "undefined") speed = json.speed;
if(typeof json.speed2 != "undefined") speed2 = json.speed2;
};
function _unserializePublic(json) { return _model.unserializePublic(json); }
_model._userUnserializePublic = function(json) {
_model._readParametersPublic(json);
_resetSolvers();
_model.update();
};
function _unserialize(json) { return _model.unserialize(json); }
_model._userUnserialize = function(json) {
_model._readParameters(json);
_resetSolvers();
_model.update();
};
_model.addToReset(function() {
__pagesEnabled["Init Page"] = true;
__pagesEnabled["ODEphiEvolution"] = false;
__pagesEnabled["Error handling code"] = true;
__pagesEnabled["codePhiEvolution"] = true;
__pagesEnabled["UpdateOrbitVariables"] = true;
__pagesEnabled["ComputeTransitOverlap"] = true;
__pagesEnabled["ComputeOccultationOverlap"] = true;
__pagesEnabled["Compute Total Signal"] = true;
});
_model.addToReset(function() {
t = 0.0; // EjsS Model.Variables.Dynamic Variables.t
dt = 0.001; // EjsS Model.Variables.Dynamic Variables.dt
phi = -Math.PI/2.0; // EjsS Model.Variables.Dynamic Variables.phi
phi2 = phi-Math.PI; // EjsS Model.Variables.Dynamic Variables.phi2
r = 0.0; // EjsS Model.Variables.Dynamic Variables.r
x = 0.0; // EjsS Model.Variables.Dynamic Variables.x
y = 0.0; // EjsS Model.Variables.Dynamic Variables.y
z = 0.0; // EjsS Model.Variables.Dynamic Variables.z
});
_model.addToReset(function() {
a = 1.5; // EjsS Model.Variables.Static Variables.a
e = 0.0; // EjsS Model.Variables.Static Variables.e
Rs = 9.728; // EjsS Model.Variables.Static Variables.Rs
Re = 1.0; // EjsS Model.Variables.Static Variables.Re
b = 0.5; // EjsS Model.Variables.Static Variables.b
Rstar = 1.0; // EjsS Model.Variables.Static Variables.Rstar
});
_model.addToReset(function() {
area = 0.0; // EjsS Model.Variables.Calculation Variables.area
overlap = 0.0; // EjsS Model.Variables.Calculation Variables.overlap
d = 0.0; // EjsS Model.Variables.Calculation Variables.d
Y = 0.0; // EjsS Model.Variables.Calculation Variables.Y
reflection = 0.0; // EjsS Model.Variables.Calculation Variables.reflection
albedo = 0.0; // EjsS Model.Variables.Calculation Variables.albedo
occultation = 0.0; // EjsS Model.Variables.Calculation Variables.occultation
Y2 = 0.0; // EjsS Model.Variables.Calculation Variables.Y2
});
_model.addToReset(function() {
angle = 0.0; // EjsS Model.Variables.View Variables.angle
angle2 = 0.0; // EjsS Model.Variables.View Variables.angle2
noise = 0.5263; // EjsS Model.Variables.View Variables.noise
showMe = false; // EjsS Model.Variables.View Variables.showMe
speed = 1; // EjsS Model.Variables.View Variables.speed
speed2 = 5; // EjsS Model.Variables.View Variables.speed2
});
if (_inputParameters) {
_inputParameters = _model.parseInputParameters(_inputParameters);
if (_inputParameters) _model.addToReset(function() { _model._readParameters(_inputParameters); });
}
_model.addToReset(function() {
_privateOdesList=[];
_ODEi_evolution1 = _ODE_evolution1();
_privateOdesList.push(_ODEi_evolution1);
});
_model.addToReset(function() {
_model.setAutoplay(false);
_model.setPauseOnPageExit(true);
_model.setFPS(20);
_model.setStepsPerDisplay(speed2);
});
_model.addToInitialization(function() {
if (!__pagesEnabled["Init Page"]) return;
t=0; // > Initialization.Init Page:1
Rs = 9.728*Rstar; // > Initialization.Init Page:2
azimuth = 0.0; // > Initialization.Init Page:3
speed2=5*speed; // > Initialization.Init Page:4
angle=angle2*Math.PI/180.0; // > Initialization.Init Page:5
});
_model.addToInitialization(function() {
_initializeSolvers();
});
_model.addToEvolution(function() {
if (!__pagesEnabled["ODEphiEvolution"]) return;
_ODEi_evolution1.step();
});
_model.addToEvolution(function() {
if (!__pagesEnabled["codePhiEvolution"]) return;
t+= dt; // > Evolution.codePhiEvolution:1
phi=-Math.PI/2.0+2.0*Math.PI*t; // > Evolution.codePhiEvolution:2
});
_model.addToFixedRelations(function() { _isPaused = _model.isPaused(); _isPlaying = _model.isPlaying(); });
_model.addToFixedRelations(function() {
if (!__pagesEnabled["UpdateOrbitVariables"]) return;
speed2=5*speed; // > FixedRelations.UpdateOrbitVariables:1
//update dark side angle // > FixedRelations.UpdateOrbitVariables:2
phi2=phi+Math.PI; // > FixedRelations.UpdateOrbitVariables:3
//make sure that size of star is scaled correctly // > FixedRelations.UpdateOrbitVariables:4
Rs = Rstar*9.728; // > FixedRelations.UpdateOrbitVariables:5
//compute radial coordinate for planet (Kepler) // > FixedRelations.UpdateOrbitVariables:6
r = a*(1-e*e)/(1+e*Math.cos(phi)); // > FixedRelations.UpdateOrbitVariables:7
//compute x and y coordinates for planet in its orbital plane // > FixedRelations.UpdateOrbitVariables:8
x = r*Math.cos(phi); // > FixedRelations.UpdateOrbitVariables:9
y = r*Math.sin(phi); // > FixedRelations.UpdateOrbitVariables:10
z = 0; // > FixedRelations.UpdateOrbitVariables:11
});
_model.addToFixedRelations(function() {
if (!__pagesEnabled["ComputeTransitOverlap"]) return;
//compute overlap area // > FixedRelations.ComputeTransitOverlap:1
angle=angle2*Math.PI/180.0; // > FixedRelations.ComputeTransitOverlap:2
//transit cannot occur when planet behind star // > FixedRelations.ComputeTransitOverlap:3
if (x < 0) // > FixedRelations.ComputeTransitOverlap:4
{ // > FixedRelations.ComputeTransitOverlap:5
overlap = 0; // > FixedRelations.ComputeTransitOverlap:6
} // > FixedRelations.ComputeTransitOverlap:7
//planet completely outside star's disk [scale+perspective adjustments too] // > FixedRelations.ComputeTransitOverlap:8
else if (Math.pow(y*y + r*r*Math.sin(angle)*Math.sin(angle), 0.5) > (Rs + Re)/20) // > FixedRelations.ComputeTransitOverlap:9
{ // > FixedRelations.ComputeTransitOverlap:10
//planet still too far away to have an overlap // > FixedRelations.ComputeTransitOverlap:11
overlap = 0; // > FixedRelations.ComputeTransitOverlap:12
} // > FixedRelations.ComputeTransitOverlap:13
//planet completely inside star's disk [scale+perspective adjustments too] // > FixedRelations.ComputeTransitOverlap:14
else if (Math.pow(y*y + r*r*Math.sin(angle)*Math.sin(angle), 0.5) < (Rs - Re)/20) // > FixedRelations.ComputeTransitOverlap:15
{ // > FixedRelations.ComputeTransitOverlap:16
//second and third contact gives complete overlap // > FixedRelations.ComputeTransitOverlap:17
overlap = Math.PI * Re * Re; // > FixedRelations.ComputeTransitOverlap:18
} // > FixedRelations.ComputeTransitOverlap:19
//planet not completely in or out of star's disk // > FixedRelations.ComputeTransitOverlap:20
else // > FixedRelations.ComputeTransitOverlap:21
{ // > FixedRelations.ComputeTransitOverlap:22
//calculate y position of the planet // > FixedRelations.ComputeTransitOverlap:23
Y = Math.pow(y*y + r*r*Math.sin(angle)*Math.sin(angle), 0.5)*20; //scale Y to Re // > FixedRelations.ComputeTransitOverlap:24
//first and fourth contact gives partial overlap // > FixedRelations.ComputeTransitOverlap:25
overlap = (Re*Re*Math.acos((Y*Y-Rs*Rs+Re*Re)/(2*Y*Re))+Rs*Rs*Math.acos((Y*Y+Rs*Rs-Re*Re)/(2*Y*Rs))-0.5*Math.pow((-Y+Re+Rs)*(Y+Re-Rs)*(Y-Re+Rs)*(Y+Re+Rs),0.5)); // > FixedRelations.ComputeTransitOverlap:26
} // > FixedRelations.ComputeTransitOverlap:27
});
_model.addToFixedRelations(function() {
if (!__pagesEnabled["ComputeOccultationOverlap"]) return;
//now calculate occultation of exoplanet // > FixedRelations.ComputeOccultationOverlap:1
//compute occultation area // > FixedRelations.ComputeOccultationOverlap:2
//transit cannot occur when planet in front of star // > FixedRelations.ComputeOccultationOverlap:3
if (x > 0) // > FixedRelations.ComputeOccultationOverlap:4
{ // > FixedRelations.ComputeOccultationOverlap:5
//planet not occulted by star // > FixedRelations.ComputeOccultationOverlap:6
occultation = 0; // > FixedRelations.ComputeOccultationOverlap:7
} // > FixedRelations.ComputeOccultationOverlap:8
//planet still too far away // > FixedRelations.ComputeOccultationOverlap:9
else if (Math.pow(y*y + r*r*Math.sin(angle)*Math.sin(angle), 0.5) > (Rs + Re)/20) // > FixedRelations.ComputeOccultationOverlap:10
{ // > FixedRelations.ComputeOccultationOverlap:11
//planet not occulted by star // > FixedRelations.ComputeOccultationOverlap:12
occultation = 0; // > FixedRelations.ComputeOccultationOverlap:13
} // > FixedRelations.ComputeOccultationOverlap:14
//second and third contact // > FixedRelations.ComputeOccultationOverlap:15
else if (Math.pow(y*y + r*r*Math.sin(angle)*Math.sin(angle), 0.5) < (Rs - Re)/20) // > FixedRelations.ComputeOccultationOverlap:16
{ // > FixedRelations.ComputeOccultationOverlap:17
//planet completely occulted by star // > FixedRelations.ComputeOccultationOverlap:18
occultation = 1; // > FixedRelations.ComputeOccultationOverlap:19
} // > FixedRelations.ComputeOccultationOverlap:20
//first and fourth contact // > FixedRelations.ComputeOccultationOverlap:21
else // > FixedRelations.ComputeOccultationOverlap:22
{ // > FixedRelations.ComputeOccultationOverlap:23
//calculate y position of the planet // > FixedRelations.ComputeOccultationOverlap:24
Y2 = Math.pow(y*y + r*r*Math.sin(angle)*Math.sin(angle), 0.5)*20; //scale y to Re and Rs // > FixedRelations.ComputeOccultationOverlap:25
//planet not completely occulted by star's disk // > FixedRelations.ComputeOccultationOverlap:26
occultation = (1/(Math.PI*Re*Re))*(Re*Re*Math.acos((Y2*Y2-Rs*Rs+Re*Re)/(2*Y2*Re))+Rs*Rs*Math.acos((Y2*Y2+Rs*Rs-Re*Re)/(2*Y2*Rs))-0.5*Math.pow((-Y2+Re+Rs)*(Y2+Re-Rs)*(Y2-Re+Rs)*(Y2+Re+Rs),0.5)); // > FixedRelations.ComputeOccultationOverlap:27
} // > FixedRelations.ComputeOccultationOverlap:28
//assume exoplanet is at 1 AU [[2092.5 RJ = 1 AU and RJ = 1 unit and Rs = 10 units]] // > FixedRelations.ComputeOccultationOverlap:29
//calculate the reflection=albedo*area*(phaseCalculation)*(1-occultation) // > FixedRelations.ComputeOccultationOverlap:30
reflection = albedo*Math.PI*Rs*Rs*(Re*Re/2092.5/2092.5/b/b)*(Math.sin(phi/2)*Math.sin(phi/2)*Math.cos(angle)*Math.cos(angle)+0.5*Math.sin(angle)*Math.sin(angle))*(1-occultation); // > FixedRelations.ComputeOccultationOverlap:31
});
_model.addToFixedRelations(function() {
if (!__pagesEnabled["Compute Total Signal"]) return;
//total area is star area minus overlap plus reflection // > FixedRelations.Compute Total Signal:1
//area of star seen by observer + reflection off exoplanet // > FixedRelations.Compute Total Signal:2
area = Math.PI * Rs * Rs - overlap + reflection; // > FixedRelations.Compute Total Signal:3
//use arbitrary units // > FixedRelations.Compute Total Signal:4
norm = Math.PI*Rs*Rs; // > FixedRelations.Compute Total Signal:5
//set graph max/min // > FixedRelations.Compute Total Signal:6
max = (1.001*Math.PI*Rs*Rs+1.5*albedo*albedo*Math.PI*Rs*Rs*(Re*Re/2092.5/2092.5/b/b))/norm; // > FixedRelations.Compute Total Signal:7
min = (Math.PI*Rs*Rs-1.05*(Math.PI*Re*Re))/norm; // > FixedRelations.Compute Total Signal:8
});
_model.addToFixedRelations(function() { _isPaused = _model.isPaused(); _isPlaying = _model.isPlaying(); });
function _initializeSolvers() {
for (var i=0,n=_privateOdesList.length; i<n; i++) _privateOdesList[i].initializeSolver();
}
function _automaticResetSolvers() {
for (var i=0,n=_privateOdesList.length; i<n; i++) _privateOdesList[i].automaticResetSolver();
}
_model.resetSolvers = function() {
for (var i=0,n=_privateOdesList.length; i<n; i++) _privateOdesList[i].resetSolver();
};
_getODE = function (_odeName) {
if (_odeName=="ODEphiEvolution") return _ODEi_evolution1;
return null;
}
function _getEventSolver(_odeName) {
var ode = _getODE(_odeName);
if (ode===null) return null;
return ode.getEventSolver();
}
function _setSolverClass(_odeName, _engine) {
var ode = _getODE(_odeName);
if (ode===null) return;
if (!_engine.setODE) {
var classname = _engine.toLowerCase();
if (classname.indexOf("boga")>=0) _engine = EJSS_ODE_SOLVERS.bogackiShampine23;
else if (classname.indexOf("cash")>=0) _engine = EJSS_ODE_SOLVERS.cashKarp45;
else if (classname.indexOf("dopri5")>=0) _engine = EJSS_ODE_SOLVERS.dopri5;
else if (classname.indexOf("dopri8")>=0) _engine = EJSS_ODE_SOLVERS.dopri853;
else if (classname.indexOf("richa")>=0) _engine = EJSS_ODE_SOLVERS.eulerRichardson;
else if (classname.indexOf("euler")>=0) _engine = EJSS_ODE_SOLVERS.euler;
else if (classname.indexOf("fehlberg87")>=0) _engine = EJSS_ODE_SOLVERS.fehlberg87;
else if (classname.indexOf("fehlberg8")>=0) _engine = EJSS_ODE_SOLVERS.fehlberg8;
else if (classname.indexOf("radau")>=0) _engine = EJSS_ODE_SOLVERS.radau5;
else if (classname.indexOf("runge")>=0) _engine = EJSS_ODE_SOLVERS.rungeKutta4;
else if (classname.indexOf("rk4")>=0) _engine = EJSS_ODE_SOLVERS.rungeKutta4;
else if (classname.indexOf("verlet")>=0) _engine = EJSS_ODE_SOLVERS.velocityVerlet;
}
if (_engine) ode.setSolverClass(_engine);
}
function _ODE_evolution1() {
var __odeSelf = {};
var __eventSolver;
var __solverClass = EJSS_ODE_SOLVERS.cashKarp45;
var __state=[];
var __mustInitialize=true;
var __isEnabled=true;
var __mustUserReinitialize=false;
var __mustReinitialize=true;
__odeSelf._getOdeVars = function (){ return["phi","t"]};
__odeSelf.setSolverClass = function(__aSolverClass) {
__solverClass = __aSolverClass;
__instantiateSolver();
};
function __instantiateSolver() {
__state=[];
__pushState();
__eventSolver = EJSS_ODE_SOLVERS.interpolatorEventSolver(__solverClass(),__odeSelf);
__mustInitialize = true;
}
__odeSelf.setEnabled = function(_enabled) { __isEnabled = _enabled; };
__odeSelf.getIndependentVariableValue = function() { return __eventSolver.getIndependentVariableValue(); };
__odeSelf.getInternalStepSize = function() { return __eventSolver.getInternalStepSize(); };
__odeSelf.isAccelerationIndependentOfVelocity = function() { return false; };
__odeSelf.initializeSolver = function() {
if (__arraysChanged()) { __instantiateSolver(); __odeSelf.initializeSolver(); return; }
__pushState();
__eventSolver.initialize(dt);
__eventSolver.setBestInterpolation(false);
__eventSolver.setMaximumInternalSteps(10000);
__eventSolver.removeAllEvents();
for(k in userEvents1){__eventSolver.addEvent(userEvents1[k]);}
__eventSolver.setEstimateFirstStep(false);
__eventSolver.setEnableExceptions(false);
__eventSolver.setTolerances(0.00001,0.00001);
__mustReinitialize = true;
__mustInitialize = false;
};
function __pushState() {
// Copy our variables to __state[]
var __j=0;
var __n=0;
var __cIn=0;
if (__state[__cIn]!=phi) __mustReinitialize = true;
__state[__cIn++] = phi;
if (__state[__cIn]!=t) __mustReinitialize = true;
__state[__cIn++] = t;
}
function __arraysChanged () {
return false;
}
__odeSelf.getEventSolver = function() {
return __eventSolver;
};
__odeSelf.resetSolver = function() {
__mustUserReinitialize = true;
};
__odeSelf.automaticResetSolver = function() {
__mustReinitialize = true;
};
function __errorAction () {
// Make sure the solver is reinitialized;
__mustReinitialize = true;
var _errorCode = __eventSolver.getErrorCode();
if (__pagesEnabled["Error handling code"]) {
{ // For any error:
}
}
}
__odeSelf.step = function() { return __privateStep(false); };
__odeSelf.solverStep = function() { return __privateStep(true); };
function __privateStep(__takeMaximumStep) {
if (!__isEnabled) return 0;
if (dt===0) return 0;
if (__mustInitialize) __odeSelf.initializeSolver();
if (__arraysChanged()) { __instantiateSolver(); __odeSelf.initializeSolver(); }
__eventSolver.setStepSize(dt);
__eventSolver.setInternalStepSize(dt);
__eventSolver.setMaximumInternalSteps(10000);
__eventSolver.setTolerances(0.00001,0.00001);
__pushState();
if (__mustUserReinitialize) {
__eventSolver.userReinitialize();
__mustUserReinitialize = false;
__mustReinitialize = false;
if (__eventSolver.getErrorCode()!=EJSS_ODE_SOLVERS.ERROR.NO_ERROR) __errorAction();
}
else if (__mustReinitialize) {
__eventSolver.reinitialize();
__mustReinitialize = false;
if (__eventSolver.getErrorCode()!=EJSS_ODE_SOLVERS.ERROR.NO_ERROR) __errorAction();
}
var __stepTaken = __takeMaximumStep ? __eventSolver.maxStep() : __eventSolver.step();
// Extract our variables from __state
var __i=0;
var __cOut=0;
phi = __state[__cOut++];
t = __state[__cOut++];
// Check for error
if (__eventSolver.getErrorCode()!=EJSS_ODE_SOLVERS.ERROR.NO_ERROR) __errorAction();
return __stepTaken;
}
__odeSelf.getState = function() { return __state; };
__odeSelf.getRate = function(_aState,_aRate) {
// Extract our variables from _aState
var __i=0;
var __cOut=0;
var phi = _aState[__cOut++];
var t = _aState[__cOut++];
// Compute the rate
var __cRate=0;
_aRate[__cRate++] = 2.0*Math.PI*(1.0+e*Math.cos(phi))*(1+e*Math.cos(phi))/Math.pow(1.0*(1.0-e*e),1.5); // Rate for ODE: ODEphiEvolution:phi
_aRate[__cRate++] = 1; // independent variable
return _aRate;
}; //end of getRate
__odeSelf._addEvent = function(userCondition,userAction,eventType,eventMethod,maxIter,eventTolerance,endAtEvent){
var User_Event = function (userCondition,userAction,eventType,eventMethod,maxIter,eventTolerance,endAtEvent) {
var _eventSelf = {};
_eventSelf.getTypeOfEvent = function() { return eventType; };
_eventSelf.getRootFindingMethod = function() { return eventMethod; };
_eventSelf.getMaxIterations = function() { return maxIter; };
_eventSelf.getTolerance = function() { return eventTolerance; };
_eventSelf.evaluate = function(_aState) {
// Extract our variables from _aState
var __i=0;
var __cOut=0;
var phi = _aState[__cOut++];
var t = _aState[__cOut++];
return eval(userCondition);
};
_eventSelf.action = function() {
// Extract our variables from __state
var __i=0;
var __cOut=0;
phi = __state[__cOut++];
t = __state[__cOut++];
var _returnValue = __userDefinedAction();
// Copy our variables to __state[]
var __j=0;
var __n=0;
var __cIn=0;
__state[__cIn++] = phi;
__state[__cIn++] = t;
return _returnValue;
};
function __userDefinedAction() {
if (undefined != functions) eval(functions.toString());
eval(userAction);
return endAtEvent;
}
return _eventSelf;
}; // End of event
userEvents1.push(User_Event(userCondition,userAction,eventType,eventMethod,maxIter,eventTolerance,endAtEvent));
}
__instantiateSolver();
return __odeSelf;
}
function _historic_phi(__time) {
var __index = 0;
return _ODEi_evolution1.getEventSolver().getStateHistory().interpolate(__time,__index);
}
_model._fontResized = function(iBase,iSize,iDelta) {
_view._fontResized(iBase,iSize,iDelta);
}; // end of _fontResized
function _getViews() {
var _viewsInfo = [];
var _counter = 0;
_viewsInfo[_counter++] = { name : "HtmlView Page", width : 800, height : 600 };
return _viewsInfo;
} // end of _getViews
function _selectView(_viewNumber) {
_view = null;
_view = new exoplanet_transits_View(_topFrame,_viewNumber,_libraryPath,_codebasePath);
var _view_super_reset = _view._reset;
_view._reset = function() {
_view_super_reset();
switch(_viewNumber) {
case -10 : break; // make Lint happy
default :
case 0:
_view.drawingPanel3D.linkProperty("CameraAltitude", function() { return angle2; }, function(_v) { angle2 = _v; } ); // HtmlView Page linking property 'CameraAltitude' for element 'drawingPanel3D'
_view.drawingPanel3D.linkProperty("CameraAzimuth", function() { return azimuth; }, function(_v) { azimuth = _v; } ); // HtmlView Page linking property 'CameraAzimuth' for element 'drawingPanel3D'
_view.sphere3D.linkProperty("Radius", function() { return Rs/15; } ); // HtmlView Page linking property 'Radius' for element 'sphere3D'
_view.exoplanet3D.linkProperty("Radius", function() { return Re/20; } ); // HtmlView Page linking property 'Radius' for element 'exoplanet3D'
_view.exoplanet3D.linkProperty("Transformation", function() { return [[phi2,0,0,1]]; } ); // HtmlView Page linking property 'Transformation' for element 'exoplanet3D'
_view.exoplanet3D.linkProperty("X", function() { return x; }, function(_v) { x = _v; } ); // HtmlView Page linking property 'X' for element 'exoplanet3D'
_view.exoplanet3D.linkProperty("Y", function() { return y; }, function(_v) { y = _v; } ); // HtmlView Page linking property 'Y' for element 'exoplanet3D'
_view.exoplanet3D.linkProperty("Z", function() { return z; }, function(_v) { z = _v; } ); // HtmlView Page linking property 'Z' for element 'exoplanet3D'
_view.exoplanetNight.linkProperty("Radius", function() { return Re/20; } ); // HtmlView Page linking property 'Radius' for element 'exoplanetNight'
_view.exoplanetNight.linkProperty("Transformation", function() { return [[phi,0,0,1]]; } ); // HtmlView Page linking property 'Transformation' for element 'exoplanetNight'
_view.exoplanetNight.linkProperty("X", function() { return x; }, function(_v) { x = _v; } ); // HtmlView Page linking property 'X' for element 'exoplanetNight'
_view.exoplanetNight.linkProperty("Y", function() { return y; }, function(_v) { y = _v; } ); // HtmlView Page linking property 'Y' for element 'exoplanetNight'
_view.exoplanetNight.linkProperty("Z", function() { return z; }, function(_v) { z = _v; } ); // HtmlView Page linking property 'Z' for element 'exoplanetNight'
_view.trail3D.linkProperty("InputZ", function() { return z; }, function(_v) { z = _v; } ); // HtmlView Page linking property 'InputZ' for element 'trail3D'
_view.trail3D.linkProperty("InputX", function() { return x; }, function(_v) { x = _v; } ); // HtmlView Page linking property 'InputX' for element 'trail3D'
_view.trail3D.linkProperty("InputY", function() { return y; }, function(_v) { y = _v; } ); // HtmlView Page linking property 'InputY' for element 'trail3D'
_view.runPauseButton.setAction("OffClick", _pause); // HtmlView Page setting action 'OffClick' for element 'runPauseButton'
_view.runPauseButton.linkProperty("State", function() { return _isPaused; } ); // HtmlView Page linking property 'State' for element 'runPauseButton'
_view.runPauseButton.setAction("OnClick", _play); // HtmlView Page setting action 'OnClick' for element 'runPauseButton'
_view.stepButton.setAction("OnClick", _step); // HtmlView Page setting action 'OnClick' for element 'stepButton'
_view.resetButton.setAction("OnClick", _reset); // HtmlView Page setting action 'OnClick' for element 'resetButton'
_view.resetTraces.setAction("OnPress", _view._initialize); // HtmlView Page setting action 'OnPress' for element 'resetTraces'
_view.RstarSlider.linkProperty("Value", function() { return Rstar; }, function(_v) { Rstar = _v; } ); // HtmlView Page linking property 'Value' for element 'RstarSlider'
_view.RstarSlider.setAction("OnChange", _view._update); // HtmlView Page setting action 'OnChange' for element 'RstarSlider'
_view.RstarField.linkProperty("Value", function() { return Rstar; }, function(_v) { Rstar = _v; } ); // HtmlView Page linking property 'Value' for element 'RstarField'
_view.RplanetSlider.linkProperty("Value", function() { return Re; }, function(_v) { Re = _v; } ); // HtmlView Page linking property 'Value' for element 'RplanetSlider'
_view.RplanetSlider.setAction("OnChange", _view._update); // HtmlView Page setting action 'OnChange' for element 'RplanetSlider'
_view.RplanetField.linkProperty("Value", function() { return Re; }, function(_v) { Re = _v; } ); // HtmlView Page linking property 'Value' for element 'RplanetField'
_view.albedo.linkProperty("Value", function() { return albedo; }, function(_v) { albedo = _v; } ); // HtmlView Page linking property 'Value' for element 'albedo'
_view.albedo.setAction("OnChange", _view._update); // HtmlView Page setting action 'OnChange' for element 'albedo'
_view.albedoField2.linkProperty("Value", function() { return albedo; }, function(_v) { albedo = _v; } ); // HtmlView Page linking property 'Value' for element 'albedoField2'
_view.semiMajor.linkProperty("Value", function() { return b; }, function(_v) { b = _v; } ); // HtmlView Page linking property 'Value' for element 'semiMajor'
_view.semiMajor.setAction("OnChange", _initialize); // HtmlView Page setting action 'OnChange' for element 'semiMajor'
_view.semiMajorField.linkProperty("Value", function() { return b; }, function(_v) { b = _v; } ); // HtmlView Page linking property 'Value' for element 'semiMajorField'
_view.angle2.linkProperty("Value", function() { return angle2; }, function(_v) { angle2 = _v; } ); // HtmlView Page linking property 'Value' for element 'angle2'
_view.angle2.setAction("OnChange", _view._update); // HtmlView Page setting action 'OnChange' for element 'angle2'
_view.angleField.linkProperty("Value", function() { return angle2; }, function(_v) { angle2 = _v; } ); // HtmlView Page linking property 'Value' for element 'angleField'
_view.plot.linkProperty("InputX", function() { return t*Math.pow(b,1.5)*365.25; } ); // HtmlView Page linking property 'InputX' for element 'plot'
_view.plot.linkProperty("InputY", function() { return area/norm; } ); // HtmlView Page linking property 'InputY' for element 'plot'
break;
} // end of switch
}; // end of new reset
_model.setView(_view);
_model.reset();
_view._enableEPub();
} // end of _selectView
_model.setAutoplay(false);
_model.setFPS(20);
_model.setStepsPerDisplay(speed2);
_selectView(_model._autoSelectView(_getViews())); // this includes _model.reset()
return _model;
}
function exoplanet_transits_View (_topFrame,_viewNumber,_libraryPath,_codebasePath) {
var _view;
switch(_viewNumber) {
case -10 : break; // make Lint happy
default :
case 0: _view = exoplanet_transits_View_0 (_topFrame); break;
} // end of switch
if (_codebasePath) _view._setResourcePath(_codebasePath);
if (_libraryPath) _view._setLibraryPath(_libraryPath);
_view._addDescriptionPage('Exoplanet Detection: Transit Method','./ExoplanetTransit/ExoplanetTransit.html');
return _view;
} // end of main function
function exoplanet_transits_View_0 (_topFrame) {
var _view = EJSS_CORE.createView(_topFrame);
_view._reset = function() {
_view._clearAll();
_view._addElement(EJSS_INTERFACE.panel,"singleDrawing3DPanel", _view._topFrame) // EJsS HtmlView.HtmlView Page: declaration of element 'singleDrawing3DPanel'
;
_view._addElement(EJSS_INTERFACE.panel,"labelPanel", _view.singleDrawing3DPanel) // EJsS HtmlView.HtmlView Page: declaration of element 'labelPanel'
;
_view._addElement(EJSS_INTERFACE.imageAndTextButton,"topLabel", _view.labelPanel) // EJsS HtmlView.HtmlView Page: declaration of element 'topLabel'
.setProperty("Text","<h1>Exoplanet Detection: Transit Method</h1>") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'topLabel'
;
_view._addElement(EJSS_INTERFACE.wrappedPanel,"wrappedPanel", _view.singleDrawing3DPanel) // EJsS HtmlView.HtmlView Page: declaration of element 'wrappedPanel'
.setProperty("CSS",{ "display":"block"}) // EJsS HtmlView.HtmlView Page: setting property 'CSS' for element 'wrappedPanel'
;
_view._addElement(EJSS_DRAWING3D.drawingPanel,"drawingPanel3D", _view.wrappedPanel) // EJsS HtmlView.HtmlView Page: declaration of element 'drawingPanel3D'
.setProperty("Height",400) // EJsS HtmlView.HtmlView Page: setting property 'Height' for element 'drawingPanel3D'
.setProperty("Width",400) // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'drawingPanel3D'
.setProperty("Draggable","NONE") // EJsS HtmlView.HtmlView Page: setting property 'Draggable' for element 'drawingPanel3D'
.setProperty("CameraZ",-0.01) // EJsS HtmlView.HtmlView Page: setting property 'CameraZ' for element 'drawingPanel3D'
.setProperty("CameraY",0.0) // EJsS HtmlView.HtmlView Page: setting property 'CameraY' for element 'drawingPanel3D'
.setProperty("CameraX",6.0) // EJsS HtmlView.HtmlView Page: setting property 'CameraX' for element 'drawingPanel3D'
.setProperty("Background","Black") // EJsS HtmlView.HtmlView Page: setting property 'Background' for element 'drawingPanel3D'
.setProperty("Projection",35) // EJsS HtmlView.HtmlView Page: setting property 'Projection' for element 'drawingPanel3D'
.setProperty("Enabled",true) // EJsS HtmlView.HtmlView Page: setting property 'Enabled' for element 'drawingPanel3D'
.setProperty("CameraFocusZ",0.0) // EJsS HtmlView.HtmlView Page: setting property 'CameraFocusZ' for element 'drawingPanel3D'
.setProperty("CameraFocusY",0.0) // EJsS HtmlView.HtmlView Page: setting property 'CameraFocusY' for element 'drawingPanel3D'
.setProperty("MaximumZ",1.8) // EJsS HtmlView.HtmlView Page: setting property 'MaximumZ' for element 'drawingPanel3D'
.setProperty("CameraFocusX",0.0) // EJsS HtmlView.HtmlView Page: setting property 'CameraFocusX' for element 'drawingPanel3D'
.setProperty("MaximumY",1.8) // EJsS HtmlView.HtmlView Page: setting property 'MaximumY' for element 'drawingPanel3D'
.setProperty("MaximumX",1.8) // EJsS HtmlView.HtmlView Page: setting property 'MaximumX' for element 'drawingPanel3D'
.setProperty("MinimumX",-1.8) // EJsS HtmlView.HtmlView Page: setting property 'MinimumX' for element 'drawingPanel3D'
.setProperty("MinimumY",-1.8) // EJsS HtmlView.HtmlView Page: setting property 'MinimumY' for element 'drawingPanel3D'
.setProperty("MinimumZ",-1.8) // EJsS HtmlView.HtmlView Page: setting property 'MinimumZ' for element 'drawingPanel3D'
.setProperty("Lights",99) // EJsS HtmlView.HtmlView Page: setting property 'Lights' for element 'drawingPanel3D'
.setProperty("DecorationType","NONE") // EJsS HtmlView.HtmlView Page: setting property 'DecorationType' for element 'drawingPanel3D'
;
_view._addElement(EJSS_DRAWING3D.sphere,"sphere3D", _view.drawingPanel3D) // EJsS HtmlView.HtmlView Page: declaration of element 'sphere3D'
.setProperty("FillColor","Orange") // EJsS HtmlView.HtmlView Page: setting property 'FillColor' for element 'sphere3D'
.setProperty("X",0) // EJsS HtmlView.HtmlView Page: setting property 'X' for element 'sphere3D'
.setProperty("LineColor","Orange") // EJsS HtmlView.HtmlView Page: setting property 'LineColor' for element 'sphere3D'
.setProperty("Y",0) // EJsS HtmlView.HtmlView Page: setting property 'Y' for element 'sphere3D'
.setProperty("Z",0) // EJsS HtmlView.HtmlView Page: setting property 'Z' for element 'sphere3D'
.setProperty("DrawLines",false) // EJsS HtmlView.HtmlView Page: setting property 'DrawLines' for element 'sphere3D'
.setProperty("DrawFill",true) // EJsS HtmlView.HtmlView Page: setting property 'DrawFill' for element 'sphere3D'
.setProperty("Resolution",60,60,60) // EJsS HtmlView.HtmlView Page: setting property 'Resolution' for element 'sphere3D'
;
_view._addElement(EJSS_DRAWING3D.sphere,"exoplanet3D", _view.drawingPanel3D) // EJsS HtmlView.HtmlView Page: declaration of element 'exoplanet3D'
.setProperty("FillColor","Red") // EJsS HtmlView.HtmlView Page: setting property 'FillColor' for element 'exoplanet3D'
.setProperty("MinAngleU",0) // EJsS HtmlView.HtmlView Page: setting property 'MinAngleU' for element 'exoplanet3D'
.setProperty("MaxAngleU",180) // EJsS HtmlView.HtmlView Page: setting property 'MaxAngleU' for element 'exoplanet3D'
.setProperty("Visibility",true) // EJsS HtmlView.HtmlView Page: setting property 'Visibility' for element 'exoplanet3D'
.setProperty("DrawLines",false) // EJsS HtmlView.HtmlView Page: setting property 'DrawLines' for element 'exoplanet3D'
.setProperty("DrawFill",true) // EJsS HtmlView.HtmlView Page: setting property 'DrawFill' for element 'exoplanet3D'
.setProperty("Resolution",60,60,60) // EJsS HtmlView.HtmlView Page: setting property 'Resolution' for element 'exoplanet3D'
;
_view._addElement(EJSS_DRAWING3D.sphere,"exoplanetNight", _view.drawingPanel3D) // EJsS HtmlView.HtmlView Page: declaration of element 'exoplanetNight'
.setProperty("FillColor","DarkGray") // EJsS HtmlView.HtmlView Page: setting property 'FillColor' for element 'exoplanetNight'
.setProperty("MinAngleU",0) // EJsS HtmlView.HtmlView Page: setting property 'MinAngleU' for element 'exoplanetNight'
.setProperty("MaxAngleU",180) // EJsS HtmlView.HtmlView Page: setting property 'MaxAngleU' for element 'exoplanetNight'
.setProperty("Visibility",true) // EJsS HtmlView.HtmlView Page: setting property 'Visibility' for element 'exoplanetNight'
.setProperty("DrawLines",false) // EJsS HtmlView.HtmlView Page: setting property 'DrawLines' for element 'exoplanetNight'
.setProperty("DrawFill",true) // EJsS HtmlView.HtmlView Page: setting property 'DrawFill' for element 'exoplanetNight'
.setProperty("Resolution",60,60,60) // EJsS HtmlView.HtmlView Page: setting property 'Resolution' for element 'exoplanetNight'
;
_view._addElement(EJSS_DRAWING3D.trail,"trail3D", _view.drawingPanel3D) // EJsS HtmlView.HtmlView Page: declaration of element 'trail3D'
.setProperty("Maximum",1050) // EJsS HtmlView.HtmlView Page: setting property 'Maximum' for element 'trail3D'
.setProperty("Connected",true) // EJsS HtmlView.HtmlView Page: setting property 'Connected' for element 'trail3D'
.setProperty("LineColor","White") // EJsS HtmlView.HtmlView Page: setting property 'LineColor' for element 'trail3D'
;
_view._addElement(EJSS_INTERFACE.panel,"controlPanel", _view.wrappedPanel) // EJsS HtmlView.HtmlView Page: declaration of element 'controlPanel'
.setProperty("Width",398) // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'controlPanel'
.setProperty("CSS",{"display":"block"}) // EJsS HtmlView.HtmlView Page: setting property 'CSS' for element 'controlPanel'
.setProperty("Background","Gray") // EJsS HtmlView.HtmlView Page: setting property 'Background' for element 'controlPanel'
.setProperty("BorderStyle","solid") // EJsS HtmlView.HtmlView Page: setting property 'BorderStyle' for element 'controlPanel'
.setProperty("BoxShadow","1") // EJsS HtmlView.HtmlView Page: setting property 'BoxShadow' for element 'controlPanel'
.setProperty("BorderColor","DarkGray") // EJsS HtmlView.HtmlView Page: setting property 'BorderColor' for element 'controlPanel'
.setProperty("BorderWidth",1) // EJsS HtmlView.HtmlView Page: setting property 'BorderWidth' for element 'controlPanel'
;
_view._addElement(EJSS_INTERFACE.panel,"firstRowPanel", _view.controlPanel) // EJsS HtmlView.HtmlView Page: declaration of element 'firstRowPanel'
.setProperty("BorderStyle","solid") // EJsS HtmlView.HtmlView Page: setting property 'BorderStyle' for element 'firstRowPanel'
.setProperty("BorderColor","DarkGray") // EJsS HtmlView.HtmlView Page: setting property 'BorderColor' for element 'firstRowPanel'
.setProperty("BorderWidth",1) // EJsS HtmlView.HtmlView Page: setting property 'BorderWidth' for element 'firstRowPanel'
;
_view._addElement(EJSS_INTERFACE.twoStateButton,"runPauseButton", _view.firstRowPanel) // EJsS HtmlView.HtmlView Page: declaration of element 'runPauseButton'
.setProperty("Tooltip","Play/Pause") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'runPauseButton'
.setProperty("ImageOnUrl","/org/opensourcephysics/resources/controls/images/play.gif") // EJsS HtmlView.HtmlView Page: setting property 'ImageOnUrl' for element 'runPauseButton'
.setProperty("ImageOffUrl","/org/opensourcephysics/resources/controls/images/pause.gif") // EJsS HtmlView.HtmlView Page: setting property 'ImageOffUrl' for element 'runPauseButton'
;
_view._addElement(EJSS_INTERFACE.button,"stepButton", _view.firstRowPanel) // EJsS HtmlView.HtmlView Page: declaration of element 'stepButton'
.setProperty("Tooltip","Step") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'stepButton'
.setProperty("ImageUrl","/org/opensourcephysics/resources/controls/images/stepforward.gif") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'stepButton'
;
_view._addElement(EJSS_INTERFACE.button,"resetButton", _view.firstRowPanel) // EJsS HtmlView.HtmlView Page: declaration of element 'resetButton'
.setProperty("Tooltip","Reset") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'resetButton'
.setProperty("ImageUrl","/org/opensourcephysics/resources/controls/images/reset.gif") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'resetButton'
;
_view._addElement(EJSS_INTERFACE.button,"resetTraces", _view.firstRowPanel) // EJsS HtmlView.HtmlView Page: declaration of element 'resetTraces'
.setProperty("Tooltip","Clear all traces in all frames.") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'resetTraces'
.setProperty("Text","Clear") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'resetTraces'
;
_view._addElement(EJSS_INTERFACE.panel,"panel4", _view.controlPanel) // EJsS HtmlView.HtmlView Page: declaration of element 'panel4'
.setProperty("BorderStyle","solid") // EJsS HtmlView.HtmlView Page: setting property 'BorderStyle' for element 'panel4'
.setProperty("BorderColor","DarkGray") // EJsS HtmlView.HtmlView Page: setting property 'BorderColor' for element 'panel4'
.setProperty("BorderWidth",1) // EJsS HtmlView.HtmlView Page: setting property 'BorderWidth' for element 'panel4'
;
_view._addElement(EJSS_INTERFACE.imageAndTextButton,"RstarLabel", _view.panel4) // EJsS HtmlView.HtmlView Page: declaration of element 'RstarLabel'
.setProperty("Foreground","White") // EJsS HtmlView.HtmlView Page: setting property 'Foreground' for element 'RstarLabel'
.setProperty("Text","R_star/R_Sun") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'RstarLabel'
;
_view._addElement(EJSS_INTERFACE.slider,"RstarSlider", _view.panel4) // EJsS HtmlView.HtmlView Page: declaration of element 'RstarSlider'
.setProperty("Width",110) // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'RstarSlider'
.setProperty("Minimum",0.5) // EJsS HtmlView.HtmlView Page: setting property 'Minimum' for element 'RstarSlider'
.setProperty("Maximum",2.0) // EJsS HtmlView.HtmlView Page: setting property 'Maximum' for element 'RstarSlider'
.setProperty("Tooltip","Slide to change radius of star in terms of radius of Sun.") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'RstarSlider'
.setProperty("Step",0.05) // EJsS HtmlView.HtmlView Page: setting property 'Step' for element 'RstarSlider'
;
_view._addElement(EJSS_INTERFACE.imageAndTextButton,"label3", _view.panel4) // EJsS HtmlView.HtmlView Page: declaration of element 'label3'
.setProperty("Text"," ") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'label3'
;
_view._addElement(EJSS_INTERFACE.numberField,"RstarField", _view.panel4) // EJsS HtmlView.HtmlView Page: declaration of element 'RstarField'
.setProperty("Width",45) // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'RstarField'
.setProperty("Format","0.00") // EJsS HtmlView.HtmlView Page: setting property 'Format' for element 'RstarField'
.setProperty("Editable",false) // EJsS HtmlView.HtmlView Page: setting property 'Editable' for element 'RstarField'
;
_view._addElement(EJSS_INTERFACE.panel,"panel2", _view.controlPanel) // EJsS HtmlView.HtmlView Page: declaration of element 'panel2'
.setProperty("BorderStyle","solid") // EJsS HtmlView.HtmlView Page: setting property 'BorderStyle' for element 'panel2'
.setProperty("BorderColor","DarkGray") // EJsS HtmlView.HtmlView Page: setting property 'BorderColor' for element 'panel2'
.setProperty("BorderWidth",1) // EJsS HtmlView.HtmlView Page: setting property 'BorderWidth' for element 'panel2'
;
_view._addElement(EJSS_INTERFACE.imageAndTextButton,"RplanetLabel", _view.panel2) // EJsS HtmlView.HtmlView Page: declaration of element 'RplanetLabel'
.setProperty("Foreground","White") // EJsS HtmlView.HtmlView Page: setting property 'Foreground' for element 'RplanetLabel'
.setProperty("Text","R_exo/R_jupiter ") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'RplanetLabel'
;
_view._addElement(EJSS_INTERFACE.slider,"RplanetSlider", _view.panel2) // EJsS HtmlView.HtmlView Page: declaration of element 'RplanetSlider'
.setProperty("Width",120) // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'RplanetSlider'
.setProperty("Minimum",0.1) // EJsS HtmlView.HtmlView Page: setting property 'Minimum' for element 'RplanetSlider'
.setProperty("Maximum",2.0) // EJsS HtmlView.HtmlView Page: setting property 'Maximum' for element 'RplanetSlider'
.setProperty("ShowText",false) // EJsS HtmlView.HtmlView Page: setting property 'ShowText' for element 'RplanetSlider'
.setProperty("Tooltip","Slide to change radius of star in terms of radius of the exoplanet.") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'RplanetSlider'
.setProperty("Step",0.1) // EJsS HtmlView.HtmlView Page: setting property 'Step' for element 'RplanetSlider'
;
_view._addElement(EJSS_INTERFACE.imageAndTextButton,"label2", _view.panel2) // EJsS HtmlView.HtmlView Page: declaration of element 'label2'
.setProperty("Text"," ") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'label2'
;
_view._addElement(EJSS_INTERFACE.numberField,"RplanetField", _view.panel2) // EJsS HtmlView.HtmlView Page: declaration of element 'RplanetField'
.setProperty("Width",45) // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'RplanetField'
.setProperty("Format","0.00") // EJsS HtmlView.HtmlView Page: setting property 'Format' for element 'RplanetField'
.setProperty("Editable",false) // EJsS HtmlView.HtmlView Page: setting property 'Editable' for element 'RplanetField'
;
_view._addElement(EJSS_INTERFACE.panel,"panel12", _view.controlPanel) // EJsS HtmlView.HtmlView Page: declaration of element 'panel12'
.setProperty("BorderStyle","solid") // EJsS HtmlView.HtmlView Page: setting property 'BorderStyle' for element 'panel12'
.setProperty("BorderColor","Gray") // EJsS HtmlView.HtmlView Page: setting property 'BorderColor' for element 'panel12'
.setProperty("BorderWidth",1) // EJsS HtmlView.HtmlView Page: setting property 'BorderWidth' for element 'panel12'
;
_view._addElement(EJSS_INTERFACE.imageAndTextButton,"albedoLabel2", _view.panel12) // EJsS HtmlView.HtmlView Page: declaration of element 'albedoLabel2'
.setProperty("Foreground","White") // EJsS HtmlView.HtmlView Page: setting property 'Foreground' for element 'albedoLabel2'
.setProperty("Text","albedo ") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'albedoLabel2'
;
_view._addElement(EJSS_INTERFACE.slider,"albedo", _view.panel12) // EJsS HtmlView.HtmlView Page: declaration of element 'albedo'
.setProperty("Width",120) // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'albedo'
.setProperty("Minimum",0) // EJsS HtmlView.HtmlView Page: setting property 'Minimum' for element 'albedo'
.setProperty("Maximum",1) // EJsS HtmlView.HtmlView Page: setting property 'Maximum' for element 'albedo'
.setProperty("Tooltip","Slide to change the tilt of the albedo of the planet") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'albedo'
.setProperty("Step",0.01) // EJsS HtmlView.HtmlView Page: setting property 'Step' for element 'albedo'
;
_view._addElement(EJSS_INTERFACE.imageAndTextButton,"label52", _view.panel12) // EJsS HtmlView.HtmlView Page: declaration of element 'label52'
.setProperty("Text"," ") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'label52'
;
_view._addElement(EJSS_INTERFACE.numberField,"albedoField2", _view.panel12) // EJsS HtmlView.HtmlView Page: declaration of element 'albedoField2'
.setProperty("Width",40) // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'albedoField2'
.setProperty("Format","0.0") // EJsS HtmlView.HtmlView Page: setting property 'Format' for element 'albedoField2'