-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.html
106 lines (99 loc) · 3.75 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
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8"/>
<title>jQuery.Feyn</title>
<meta name="keywords" content="Feynman diagrams, jQuery, SVG"/>
<meta name="description" content="An extension package allows you to draw Feynman diagrams with SVG using the standard jQuery syntax."/>
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=0.25,user-scalable=yes"/>
<link rel="icon" type="image/png" href="favicon.png"/>
<script src="js/jquery-2.1.0.min.js"></script>
<script src="js/jquery.feyn-1.0.1.min.js"></script>
<script>
$(document).ready(function() {
$('#aurora').feyn({
width: 200,
height: 200,
standalone: true,
selector: false,
grid: {show: false},
color: 'black',
thickness: 1.6,
incoming: {i1: '20,180', i2: '180,180'},
outgoing: {o1: '20,20', o2: '180,20'},
vertex: {v1: '100,140', v2: '100,60', v3: '46,33', v4: '154,33'},
auxiliary: {a1: '10,114'},
fermion: {color: 'blue', line: 'i1-v1-i2,o2-v4-v2-v3-o1'},
photon: {color: 'orange', line: 'v1-v2'},
gluon: {color: 'green', line: 'v3-v4'},
symbol: {s1: ['a1', -90, 'arrow', 25]},
node: {show: 'v', type: 'dot', fill: 'black', radius: 1},
label: {t1: ['10,194', 'e^{−}'], t2: ['190,194', 'e^+'],
t3: ['10,12', 'q'], t4: ['190,12', '-q'], t5: ['85,102', 'γ'],
t6: ['100,10', 'g']},
image: {m1: ['120,80', 'svg/muon.svg', 65, 34]},
ajax: false
});
$('#nightly').feyn({
width: 200,
height: 200,
standalone: true,
selector: true,
grid: {show: true},
color: 'black',
thickness: 1.6,
incoming: {i1: '20,180', i2: '180,180'},
outgoing: {o1: '20,20', o2: '180,20'},
vertex: {v1: '100,140', v2: '100,60', v3: '46,33', v4: '154,33'},
auxiliary: {a1: '10,114'},
fermion: {color: 'blue', line: 'i1-v1-i2,o2-v4-v2-v3-o1'},
photon: {color: 'orange', line: 'v1-v2'},
gluon: {color: 'green', line: 'v3-v4'},
symbol: {s1: ['a1', -90, 'arrow', 25]},
node: {show: 'v', type: 'dot', fill: 'black', radius: 1},
label: {t1: ['10,194', 'e^{−}'], t2: ['190,194', 'e^+'],
t3: ['10,12', 'q'], t4: ['190,12', '-q'], t5: ['85,102', 'γ'],
t6: ['100,10', 'g']},
image: {m1: ['120,80', 'svg/muon.svg', 65, 34]}
});
$('.feyn').css('cursor', 'crosshair').click(function(e) {
var offset = $(this).offset(),
x = Math.round(e.pageX - offset.left),
y = Math.round(e.pageY - offset.top);
$('svg .feyn_coord').remove();
$(this).children('svg').append('<text class="feyn_coord" x="' + x +
'" y="' + y + '" font-size="8">' + x + ',' + y + '</text>');
$(this).html($(this).html());
return false;
});
$('footer a').click(function() {
window.open(this.href);
return false;
});
});
</script>
</head>
<body>
<header>
<h2>jQuery.Feyn: Drawing Feynman Diagrams with SVG</h2>
</header>
<article style="margin:2em 0;">
<div id="aurora"><!-- Insert Feynman diagram here --></div>
<div id="nightly"><!-- Insert Feynman diagram here --></div>
</article>
<footer>
<div>
<a href="http://photino.github.io/jquery-feyn/">Project Page</a> |
<a href="http://commons.oreilly.com/wiki/index.php/SVG_Essentials">SVG Essentials</a> |
<a href="http://unicodelookup.com/">Unicode Lookup</a> |
<a href="http://www.tlhiv.org/ltxpreview/">LaTeX Previewer</a> |
<a href="http://validator.w3.org/">W3C Validator</a> |
<a href="http://image.online-convert.com/">Image Converter</a>
</div>
<address style="margin:1em 0;">
Copyright © 2013 by <a href="https://github.com/photino">Zan Pan</a>
released under the <a href="LICENSE.txt">MIT license</a>
</address>
</footer>
</body>
</html>