-
Notifications
You must be signed in to change notification settings - Fork 2
/
boundary.html
955 lines (785 loc) · 37.9 KB
/
boundary.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
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
<!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="shortcut icon" href="assets/ico/favicon.ico">
<title>Torus Knot Fibration Visualization</title>
<!-- Bootstrap core CSS -->
<link href="assets/css/bootstrap.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="assets/css/style.css" rel="stylesheet">
<link href="assets/css/font-awesome.min.css" rel="stylesheet">
<script src="assets/js/jquery.min.js"></script>
<!-- <script src="assets/js/modernizr.js"></script>-->
<!-- mathbox -->
<script src="./lib/mathbox/build/mathbox-bundle.js"></script>
<link rel="stylesheet" href="./lib/mathbox/build/mathbox.css">
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<!--math-->
<script src="./lib/math.min.js"></script>
<!--jquery-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<!--bootstrap-->
<link rel="stylesheet" src="./lib/bootstrap-3.3.7-dist/css/bootstrap.min.css">
<link rel="stylesheet" src="./lib/bootstrap-3.3.7-dist/css/bootstrap-theme.min.css">
<script src="./lib/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<!--
bootstrap toggle
<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet">
<script src="https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js"></script>
-->
<link href="./lib/switch/css/bootstrap3/bootstrap-switch.min.css" rel="stylesheet">
<script src="./lib/switch/js/bootstrap-switch.min.js"></script>
<!--bootstrap slider-->
<link href="./lib/slider/bootstrap-slider.min.css" rel="stylesheet">
<script src="./lib/slider/bootstrap-slider.min.js"></script>
<!-- my css -->
<link href="./lib/css/mystyle.css" rel="stylesheet">
<!-- mathjax-->
<script type="text/javascript" async src="assets/MathJax-2.6/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
</head>
<body>
<!-- Fixed navbar -->
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<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="index.html">Torus Knot Fibration Visualization</a>
</div>
<div class="navbar-collapse collapse navbar-right">
<ul class="nav navbar-nav">
<li><a href="index.html">HOME</a></li>
<li><a href="torusknot.html">TORUS & KNOT</a></li>
<li class="active"><a href="boundary.html">BOUNDARY</a></li>
<li><a href="surface.html">SURFACE</a></li>
<li><a href="stereo.html">STEREOGRAPHIC</a></li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
</div>
<!-- *****************************************************************************************************************
BLUE WRAP
***************************************************************************************************************** -->
<div id="blue">
<div class="container">
<div class="row">
<h3>Fibration Surface Boundary on Torus</h3>
</div>
<!-- /row -->
</div>
<!-- /container -->
</div>
<!-- /blue -->
<!-- *****************************************************************************************************************
AGENCY ABOUT
***************************************************************************************************************** -->
<div class="container-fluid mtb">
<div class="row">
<div id="torusvis" class="torusvis col-lg-7">
<script type="text/javascript" language="javascript">
console.log($('.torusvis'));
$('.torusvis').css('height', 0.8 * $(window).height() + 'px');
</script>
<script>
var mathbox = mathBox({
plugins: ['core', 'controls', 'cursor'],
controls: {
// Orbit controls, i.e. Euler angles, with gimbal lock
klass: THREE.OrbitControls,
parameters: {
noZoom: true
},
// Trackball controls, i.e. Free quaternion rotation
//klass: THREE.TrackballControls,
},
element: document.getElementById("torusvis"),
mathbox: {
warmup: 1
}
});
if (mathbox.fallback) throw "WebGL not supported"
var three = mathbox.three;
three.renderer.setClearColor(new THREE.Color('#f8f8f8'), 1.0);
var time = three.Time.clock;
// Place camera
var camera =
mathbox
.camera({
proxy: true,
position: [0, 0, 3],
lookAt: [0, 0, 0]
});
// 2D cartesian
console.log(mathbox.cartesian)
var view =
mathbox
.cartesian({
id: 'cartesian',
position: [0, 0, 0],
range: [
[-math.pi, math.pi],
[-math.pi, math.pi],
[-math.pi, math.pi]
],
scale: [1, 1, 1],
});
var alpha = 2;
//Quality of Life
var pi = math.pi;
var sin = math.sin;
var cos = math.cos;
function torus(x, y) {
R = 2;
r = 1;
var a = Number($('#slidera').val())
var b = Number($('#sliderb').val())
// return [(R-r*cos(x*b))*((1-a)*y+sin(a*y)),(R-r*cos(b*x))*-cos(a*y),(1-b)*x + r*sin(b*x)]
return [
(R - r * ((1 - a) + a * cos(x * b))) * ((1 - a) * y + sin(a * y)), (1 - b) * x + r * sin(b * x), (R - r * cos(b * x)) * -cos(a * y) + 1
]
}
view.area({
id: 'densearea',
width: 100,
height: 100,
// axes: [1, 3],
expr: function(emit, x, y, i, j, time) {
emit(...torus(x, y));
},
items: 1,
channels: 3,
});
view.surface({
shaded: false,
color: '#6a9fb5',
opacity: 0.2
});
view.area({
id: 'sparsearea',
width: 64,
height: 10,
// axes: [1, 3],
expr: function(emit, x, y, i, j, time) {
emit(...torus(x, y));
emit(...torus(y, x));
},
items: 2,
channels: 3,
});
view.resample({
id: 'sparsesample',
source: mathbox.select('#densearea')[1],
width: 64,
height: 10
})
view.line({
points: mathbox.select('#sparsesample')[1],
color: 'white',
zBias: 10
})
// //Edges of Torus
// view.interval({
// id: 'redline',
// width: 64,
// expr: function(emit, x, i, time) {
// emit(...torus(x, -pi));
// emit(...torus(x, pi));
// },
// items: 2,
// channels: 3,
// })
//
// view.line({
// points: mathbox.select('#redline')[1],
// color: '#FF4136',
// zBias: 12
// })
//
//
// view.interval({
// id: 'yellowline',
// width: 64,
// expr: function(emit, y, i, time) {
// emit(...torus(-pi, y));
// emit(...torus(pi, y));
// },
// items: 2,
// channels: 3,
// })
//
// view.line({
// points: mathbox.select('#yellowline')[1],
// color: '#FFDC00',
// zBias: 13
// })
// Torus Knot Parameters
var p = 2;
var q = 3;
var m = p / q;
var m2 = q / p;
var eps = 0.01;
// Global Animation Time
var tau_last = 0;
function mod2pi(x) {
return (x % (2 * pi) + 2 * pi) % (2 * pi)
}
// Knot Curve
function knot(x) {
return (m2 * x) % (2 * pi);
}
view.interval({
range: [0, 2 * p * pi],
expr: function(emit, x, i, t) {
//-(pi,pi,0) needed for new bounds
emit(...torus(x % (2 * pi) - pi, knot(x) - pi));
},
width: 400,
channels: 3,
});
view.line({
id: 'knotcurve',
color: '#2ECC40',
visible: true,
proximity: 1,
blending: 'no',
zBias: 14
})
// // Knot Traveller
//
// function sphere(r, th, ph, x, y, z) {
// return [r * cos(th) * sin(ph) + x, r * sin(th) * sin(ph) + y, r * cos(ph) + z]
// }
// view.area({
// id: 'spherearea',
// width: 100,
// height: 100,
// // axes: [1, 3],
// expr: function(emit, x, y, i, j, time) {
// var t = time
// var [X, Y, Z] = torus(t % (2 * pi) - pi, knot(t) - pi);
// emit(...sphere(0.1, x, y, X, Y, Z));
//
// },
// items: 1,
// channels: 3,
//
// });
//
// view.surface({
// id: 'knottraveller',
// shaded: false,
// color: 'green'
//
// });
//Piecewise Stuff
// //First Piecewise Curve
// function piecewise(x, n) {
// //Triangle Wave Function to match knot + rungs!
// x = x % (2 * pi);
// var period = (pi) / q;
// var amplitude = pi / (2 * p);
// var wave = ((2 * amplitude) / pi) * math.asin(sin(x * pi / period)) + 2 * pi * n / p
//
// return mod2pi(wave)
// }
//
function modpi(x) {
//Function for Modular Arithmetic on [-pi,pi]
return ((x + 2 * pi) % (2 * pi) - pi)
}
function fakemodpi(x) {
var tpi = 2 * pi;
var X = x;
//To stop edge errors:
while (Math.abs(X) > pi) {
if (X <= -pi) {
X = X + 2 * pi
} else if (X >= -pi + tpi) {
X = X - tpi
}
}
return X
}
function surfacecut(x) {
var X = x
var thresh = 0.02;
if (Math.abs(pi) - X < thresh) {
X = NaN
}
return X
}
function truemodpi(x) {
return (x + pi) % (2 * pi) - pi
}
console.log(fakemodpi(0))
console.log(fakemodpi(pi + 0.1))
//((2*amplitude)/pi)*math.asin(sin((x+t/q)*pi/period))+2*pi*n/p-(1/p)*t
//First Piecewise Curve
function piecewise(x, n, t) {
//Triangle Wave Function to match knot + rungs!
x = x % (2 * pi);
if ($('#timetoggle').prop('checked') == true) {
var tau = t % (2 * pi);
tau_last = tau
} else {
// var tau = Number($('#slidertime').val());
var tau = tau_last
}
var period = (pi) / q;
var amplitude = pi / (2 * p);
var wave = ((2 * amplitude) / pi) * math.asin(sin((x + tau / q) * pi / period)) + 2 * pi * n / p - (tau / p)
return fakemodpi(wave - pi / p)
}
view.interval({
range: [0, 4 * pi],
expr: function(emit, x, i, t) {
//(0,-pi,0) shift to match new domains
emit(...torus(fakemodpi(x) + eps, surfacecut(piecewise(x, 0, t))));
emit(...torus(fakemodpi(x) + eps, surfacecut(piecewise(x, 1, t))));
},
width: 1000,
channels: 3,
items: 2
});
view.line({
id: 'blueboundary',
color: '#49a7e9',
visible: true,
zBias: 15,
proximity: 0.5
});
//Second Piecewise Curve
function piecewise2(x, n, t) {
x = x % (2 * pi);
if ($('#timetoggle').prop('checked') == true) {
var tau = t % (2 * pi);
} else {
// var tau = Number($('#slidertime').val());
var tau = tau_last
}
var period = (pi) / p;
var amplitude = pi / (2 * q);
var wave = ((2 * amplitude) / pi) * math.asin(sin((x - tau / p) * pi / period)) - 2 * pi * n / q
// var wave = ((2 * amplitude) / pi) * math.asin(sin((x+ t / q) * pi / period)) + 2 * pi * n / p - (t / p)
return fakemodpi(-(wave - pi / q + (1 / q) * tau))
}
view.interval({
expr: function(emit, x, i, t) {
emit(...torus(surfacecut(piecewise2(x, 0, t) - eps), -fakemodpi(x)));
emit(...torus(surfacecut(piecewise2(x, 1, t) - eps), -fakemodpi(x)));
emit(...torus(surfacecut(piecewise2(x, 2, t) - eps), -fakemodpi(x)));
},
width: 400,
channels: 3,
items: 3
});
view.line({
id: 'redboundary',
color: '#fab125',
proximity: 1,
visible: true,
zBias: 15
});
function SurfaceCut(x) {
if (x <= 0) {
x = NaN;
} else if (x >= 2 * pi) {
x = NaN;
}
return x
}
//Rungs
//This is bad and I should feel bad
function onlyrungs(x, t) {
if ($('#timetoggle').prop('checked') == true) {
var tau = t % (2 * pi);
} else {
var tau = tau_last
}
if ((x > pi / (2 * q) - (tau / q)) && (x < 2 * pi / (2 * q) + pi / (2 * q) - (tau / q))) {
x = x
} else if ((x > pi / (2 * q) - (tau / q) + 2 * pi / q) && (x < 2 * pi / (2 * q) + pi / (2 * q) - (tau / q) + 2 * pi / q)) {
x = x
} else if ((x > pi / (2 * q) - (tau / q) + 4 * pi / q) && (x < 2 * pi / (2 * q) + pi / (2 * q) - (tau / q) + 4 * pi / q)) {
x = x
} else if ((x > pi / (2 * q) - (tau / q) - 2 * pi / q) && (x < 2 * pi / (2 * q) + pi / (2 * q) - (tau / q) - 2 * pi / q)) {
x = x
} else if ((x > pi / (2 * q) - (tau / q) - 4 * pi / q) && (x < 2 * pi / (2 * q) + pi / (2 * q) - (tau / q) - 4 * pi / q)) {
x = x
} else {
x = NaN
}
return x
}
function rungs(x, n, t) {
//Triangle Wave Function to match knot + rungs!
x = x % (2 * pi);
if ($('#timetoggle').prop('checked') == true) {
var tau = t % (2 * pi);
} else {
var tau = tau_last;
}
var period = (pi) / q;
var amplitude = pi / (2 * p);
var wave = ((2 * amplitude) / pi) * math.asin(sin((x + tau / q) * pi / period)) + 2 * pi * n / p - (tau / p)
return fakemodpi(wave - pi / p)
}
view.interval({
range: [0, 4 * pi],
expr: function(emit, x, i, t) {
//(0,-pi,0) shift to match new domains
emit(...torus(onlyrungs(fakemodpi(x) + eps, t), surfacecut(rungs(x, 0, t))));
emit(...torus(onlyrungs(fakemodpi(x) + eps, t), surfacecut(rungs(x, 1, t))));
emit(...torus(onlyrungs(fakemodpi(x) - eps, t), surfacecut(rungs(x, 0, t))));
emit(...torus(onlyrungs(fakemodpi(x) - eps, t), surfacecut(rungs(x, 1, t))));
},
width: 1000,
channels: 3,
items: 4
});
view.line({
id: 'rungs',
color: '#D6E6EB',
visible: false,
zBias: 20,
proximity: 1,
});
////First Piecewise Curve
// function piecewise(x,t,n){
//
// x= x%(2*pi);
// var period = (pi)/q;
// var amplitude = pi/(2*p);
// var wave = ((2*amplitude)/pi)*math.asin(sin((x+t/q)*pi/period))+2*pi*n/p-(1/p)*t
//
//
// return SurfaceCut(wave)
// }
//
//
// view.area({
//
// expr: function(emit,x,y,i,j,t){
//
// var tau = (-0.25*t)%2*pi;
//
// var xdom = SurfaceCut(x);
//
//
// emit(xdom, piecewise(x,tau,-1),-y);
// emit(xdom, piecewise(x,tau,0),-y);
// emit(xdom, piecewise(x,tau,1),-y);
// emit(xdom, piecewise(x,tau,2),-y);
// },
// rangeX:[0,3*pi],
// rangeY:[0,pi/4],
// width:164,
// height:164,
// channels:3,
// items:4
//
// });
// view.surface({
// color:'#0074D9',
// proximity:10000000000,
// shaded:true,
// crossed:true,
//
//
// });
mathbox.set('focus', 2);
</script>
</div>
<div class="col-lg-4">
<table class="panel" style="margin-left: auto;
margin-right: auto; width:80%">
<tr>
<th class="labels">
<label class="sliderlabel">Glue Latitudinal Edge</label>
</th>
<th>
<input id="slidera" data-slider-id='ex1Slider' type="text" data-slider-min="0" data-slider-max="1" data-slider-step="0.01" data-slider-value="0.0" data-slider-tooltip='hide' />
</th>
</tr>
<tr>
<th class="labels">
<label class="sliderlabel">Glue Longitudinal Edge</label>
</th>
<th>
<input id="sliderb" data-slider-id='ex1Slider' type="text" data-slider-min="0" data-slider-max="1" data-slider-step="0.01" data-slider-value="0.0" data-slider-tooltip='hide' />
</th>
</tr>
<!--Knot Curve Toggle-->
<tr>
<th class="labels" style="color:#2ECC40">
<label class="sliderlabel">Knot Curve</label>
</th>
<th>
<input id="knottoggle" type="checkbox" checked data-toggle="toggle" value="1.0" onchange="togfun(this);" data-onstyle="primary">
</th>
</tr>
<!--Blue Piecewise Toggle-->
<tr>
<th class="labels" style="color:#0074D9">
<label class="sliderlabel">Inside Boundary</label>
</th>
<th>
<input id="bluetoggle" type="checkbox" checked data-toggle="toggle" value="1.0" onchange="bluetogfun(this);" data-onstyle="primary">
</th>
</tr>
<!--Red Piecewise Toggle-->
<tr>
<th class="labels" style="color:#FF851B">
<label class="sliderlabel">Outside Boundary</label>
</th>
<th>
<input id="redtoggle" type="checkbox" checked data-toggle="toggle" value="1.0" onchange="redtogfun(this);" data-onstyle="primary">
</th>
</tr>
<!--Rung Piecewise Toggle-->
<tr>
<th class="labels">
<label class="sliderlabel">Hide Rungs</label>
</th>
<th>
<input id="rungtoggle" type="checkbox" data-toggle="toggle" value="1.0" onchange="rungtogfun(this);" data-onstyle="primary">
</th>
</tr>
<!--Time Animate Toggle-->
<tr>
<th class="labels">
<label class="sliderlabel">
Animate \(\theta\)
</label>
</th>
<th>
<input id="timetoggle" type="checkbox" checked data-toggle="toggle" value="1.0" onchange="timetogfun(this);" data-onstyle="primary">
</th>
</tr>
<!--
Time Slider
<th class="labels">
<label class="sliderlabel">\(\theta\)</label>
</th>
<th>
<input id="slidertime" data-slider-id='ex1Slider' type="text" data-slider-min="0" data-slider-max="6.28" data-slider-step="0.01" data-slider-value="3.14" data-slider-tooltip='hide' />
</th>
-->
</table>
<script>
//Slider Script
$('#slidera').slider({
formatter: function(value) {
return 'Current value: ' + value;
}
});
$('#sliderb').slider({
formatter: function(value) {
return 'Current value: ' + value;
}
});
$('#slidertime').slider({
formatter: function(value) {
return 'Current value: ' + value;
}
});
// mathbox.select('#cartesian')[0].set('position',[0,0,1])
// console.log(mathbox.select('#cartesian')[0].get('position'))
//
// mathbox.select('#cartesian')[0].set('position', [0,0,-0.33*Number($('#slider').val())])
//
$('#slidera').on('slide', positionchanger)
function positionchanger() {
var Z = Number($('#slidera').val());
// console.log(Z)
mathbox.select('#cartesian')[0].set('position', [0, 0, -0.33 * Z])
// console.log(mathbox.select('#cartesian')[0].get('position'))
}
// $('#slidera').on('slide', positionchanger())
//
//
//
// function positionchanger() {
//
// var sliderval = Number($('#slider').val());
//
// mathbox.select('#cartesian')[0].set('position', [0,0,-0.33*sliderval])
// console.log(sliderval)
// }
//Button SCript
//BlueToggle
$('#bluetoggle').bootstrapSwitch({
size: 'small',
offColor: 'custom',
onColor: 'custom'
});
function bluetogfun(button) {
var butprop = $('#bluetoggle').prop('checked');
var butval = $('#bluetoggle').val();
if (butprop == true) {
$('#bluetoggle').val(1.0);
mathbox.select('#blueboundary')[0].set('visible', true)
} else {
$('#bluetoggle').val();
mathbox.select('#blueboundary')[0].set('visible', false)
}
}
//RedToggle
$('#redtoggle').bootstrapSwitch({
size: 'small',
offColor: 'custom',
onColor: 'custom'
});
function redtogfun(button) {
var butprop = $('#redtoggle').prop('checked');
var butval = $('#redtoggle').val();
if (butprop == true) {
$('#redtoggle').val(1.0);
mathbox.select('#redboundary')[0].set('visible', true)
} else {
$('#redtoggle').val();
mathbox.select('#redboundary')[0].set('visible', false)
}
}
//RungToggle
$('#rungtoggle').bootstrapSwitch({
size: 'small',
offColor: 'custom',
onColor: 'custom'
});
function rungtogfun(button) {
var butprop = $('#rungtoggle').prop('checked');
var butval = $('#rungtoggle').val();
if (butprop == true) {
$('#rungtoggle').val(1.0);
mathbox.select('#rungs')[0].set('visible', true)
} else {
$('#rungtoggle').val();
mathbox.select('#rungs')[0].set('visible', false)
}
}
//timeToggle
$('#timetoggle').bootstrapSwitch({
size: 'small',
offColor: 'custom',
onColor: 'custom'
});
function timetogfun(button) {
var butprop = $('#timetoggle').prop('checked');
var butval = $('#timetoggle').val();
if (butprop == true) {
$('#timetoggle').val(1.0);
$('#slidertime').slider("disable")
} else {
$('#timetoggle').val();
$('#slidertime').slider("enable")
}
}
//KnotToggle
$('#knottoggle').bootstrapSwitch({
size: 'small',
offColor: 'custom',
onColor: 'custom'
});
function togfun(button) {
var butprop = $('#knottoggle').prop('checked');
var butval = $('#knottoggle').val();
if (butprop == true) {
$('#knottoggle').val(1.0);
mathbox.select('#knotcurve')[0].set('visible', true)
} else {
$('#knottoggle').val();
mathbox.select('#knotcurve')[0].set('visible', false)
}
}
</script>
<h3>Boundaries of Fibration Surfaces</h3>
<p class="blurb">
A primary requiremnt for our fibration surface is that its boundary is exactly the
<knot>torus knot</knot>. We will construct our family of fibres from this requirement by first considering the surface boundaries.
</p>
<p class="blurb">
We construct our complete fibration surface by taking the union of subsurfaces, corresponding to the portion of the fibre
<mark style="color:#0074D9">inside</mark> and
<mark style="color:#FF851B">outside</mark> of the torus. We consider the boundaries of these subsurfaces, which will be
<mark style="color:#0074D9">blue</mark> and
<mark style="color:#FF851B">orange</mark> curves embedded in our torus.
</p>
<p class="blurb">
Since our complete fibration is the union of the subsurfaces, wherever
<mark style="color:#0074D9">inside</mark> and
<mark style="color:#FF851B">outside</mark> boundary curves coincide is actually not a boundary to our complete fibration. Therefore, we can 'cancel' these portions of the boundary curves. We call these
<torus>rungs</torus> for their similarity to ladders.
</p>
<p class="blurb">
If we consider the only the boundaries of the
<mark style="color:#0074D9">inside</mark> and
<mark style="color:#FF851B">outside</mark> surfaces without the
<torus>rungs</torus>, we see that the final boundary is exactly the
<knot>trefoil knot</knot>, as desired. This is true for all values of \(\theta \in S^1 \)
</p>
<nav aria-label="...">
<ul class="pager">
<li><a href="torusknot.html">Previous</a></li>
<li><a href="surface.html">Next</a></li>
</ul>
</nav>
</div>
</div>
<! --/row -->
</div>
<! --/container -->
<!-- *****************************************************************************************************************
FOOTER
***************************************************************************************************************** -->
<div id="footerwrap">
<div class="container">
<div class="row">
<div class="col-lg-4">
<h4>About Project</h4>
<div class="hline-w"></div>
<p>This is my final deliverable for the summer research component of a Master's in Mathematics at the University of Toronto supervised by Dr. Dror Bar-Natan. </p>
</div>
<div class="col-lg-4">
<h4>Project Repository</h4>
<div class="hline-w"></div>
<p style="text-align:center;">
<a href="http://www.github.com/jessebett/TorusKnotFibration"><i class="fa fa-github" style="font-size: 80px;"></i></a>
</p>
</div>
<div class="col-lg-4">
<h4>About Me</h4>
<div class="hline-w"></div>
<p>
My name is Jesse Bettencourt and I've recently acquired an M.Sc. in Mathematics from U of T. I'm interested in vizualizations from the intersection of math and computer science.
</p>
</div>
</div>
<! --/row -->
</div>
<! --/container -->
</div>
<! --/footerwrap -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<!-- <script src="assets/js/bootstrap.min.js"></script>-->
<script src="assets/js/retina-1.1.0.js"></script>
<script src="assets/js/jquery.hoverdir.js"></script>
<script src="assets/js/jquery.hoverex.min.js"></script>
<script src="assets/js/jquery.prettyPhoto.js"></script>
<script src="assets/js/jquery.isotope.min.js"></script>
<script src="assets/js/custom.js"></script>
</body>
</html>