-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqd.html
More file actions
614 lines (546 loc) · 24 KB
/
Copy pathqd.html
File metadata and controls
614 lines (546 loc) · 24 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>QD Training Hub — AlgoGators</title>
<link rel="stylesheet" href="styles.css">
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600;700&family=IBM+Plex+Sans:wght@400;600;700&display=swap" rel="stylesheet">
<style>
/* ── Hero dark island ───────────────────────────────────────────── */
.hero {
position: relative;
overflow: hidden;
background: #0e0d0c;
border-bottom: none;
margin-bottom: 3rem;
display: flex;
flex-direction: column;
align-items: center;
padding-bottom: 2rem;
}
#hero-canvas {
position: absolute;
inset: 0;
display: block;
z-index: 0;
}
.hero::before {
content: '';
position: absolute;
top: 0; left: 0; right: 0;
height: 1px;
background: #FF7D2A;
z-index: 2;
}
.hero::after {
content: '';
position: absolute;
bottom: 0; left: 0; right: 0;
height: 10px;
background: linear-gradient(
to bottom,
#FF7D2A 0px, #FF7D2A 1px,
#ffffff 1px, #ffffff 9px,
#000000 9px, #000000 10px
);
z-index: 2;
}
/* lift all hero children above canvas */
.hero > *:not(#hero-canvas) {
position: relative;
z-index: 1;
}
.hero-logo {
border-radius: 16px;
outline: 2px solid #ffffff;
outline-offset: 16px;
display: block;
}
.hero-logo-wrap {
position: relative;
display: inline-flex;
margin: 2rem 0 1.5rem;
}
/* top-right corner */
.hero-logo-wrap::before {
content: '';
position: absolute;
top: -44px; right: -80px;
width: 48px; height: 48px;
border-top: 2px solid #FF7D2A;
border-right: 2px solid #FF7D2A;
border-radius: 0 10px 0 0;
}
/* bottom-left corner */
.hero-logo-wrap::after {
content: '';
position: absolute;
bottom: -44px; left: -80px;
width: 48px; height: 48px;
border-bottom: 2px solid #FF7D2A;
border-left: 2px solid #FF7D2A;
border-radius: 0 0 0 10px;
}
/* re-color text for dark bg */
.hero h1 {
color: rgba(255, 238, 215, 0.95);
border-bottom-color: #FF7D2A;
}
.hero .hero-subtitle {
color: rgba(255, 238, 215, 0.35);
}
.hero .hero-meta {
color: rgba(255, 238, 215, 0.50);
}
/* ── Mentor byline (QD-specific) ─────────────────────────────────── */
.mentor-line {
font-family: 'IBM Plex Mono', monospace;
color: var(--accent);
font-weight: 700;
font-size: 0.72rem;
text-transform: uppercase;
letter-spacing: 0.12em;
margin-bottom: 0.8rem;
display: flex;
align-items: center;
gap: 0.7rem;
}
.mentor-line::before {
content: '';
display: block;
width: 22px;
height: 1px;
background: var(--accent);
flex-shrink: 0;
}
</style>
<link rel="icon" type="image/png" href="Delta.png">
</head>
<body>
<nav>
<div class="nav-brand">
<img src="ALGO.png" alt="AlgoGators" class="nav-logo-img">
<span class="nav-divider">|</span>
<span class="nav-section">QD Training Hub</span>
</div>
<div class="nav-links">
<a href="new-analyst.html">← Teams</a>
<a href="qd.html" class="active">Home</a>
<a href="qd-week1.html">W1</a>
<a href="qd-week2.html">W2</a>
<a href="qd-week3.html">W3</a>
<a href="qd-week4.html">W4</a>
<a href="qd-week5.html">W5</a>
<a href="qd-week6.html">W6</a>
<a href="qd-week7.html">W7</a>
<a href="qd-week8.html">W8</a>
<a href="qd-week9.html">W9</a>
<a href="qd-week10.html">W10</a>
</div>
</nav>
<div class="hero">
<canvas id="hero-canvas"></canvas>
<div class="hero-logo-wrap">
<img src="Stacked.png" alt="AlgoGators Stacked Logo" class="hero-logo">
</div>
<h1>QD Analyst Onboarding Program</h1>
<p class="hero-subtitle">2026 Fall AlgoGators New Analyst Training Program</p>
<p class="hero-meta">AlgoGators Investment Fund — Internal Resource</p>
</div>
<div class="container">
<div class="section">
<h2>How QD Onboarding Works</h2>
<p style="color: var(--text-secondary); margin-bottom: 2.5rem; font-size: 1.05rem;">Quantitative Development builds and runs the infrastructure the rest of the fund depends on. Before you write a line of production code, you learn what that infrastructure serves — so onboarding runs in two tracks: <strong>four weeks embedded with Quantitative Research under Xander</strong>, then <strong>six weeks on systems with Jonah and John</strong> — a week each on the data pipeline and TradeNgin, then engineering practice and project time.</p>
<div class="grid grid-4">
<div class="card">
<div style="font-family: 'IBM Plex Sans', sans-serif; color: var(--accent); font-weight: 700; margin-bottom: 0.8rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em;">Weeks 1–4</div>
<h3 style="margin-top: 0; margin-bottom: 0.8rem; font-size: 1.2rem;">Research Immersion</h3>
<p style="color: var(--text-secondary); font-size: 0.95rem; line-height: 1.5;">Embed with the QR desk under Xander. Learn the research workflow you will be building tools for.</p>
</div>
<div class="card">
<div style="font-family: 'IBM Plex Sans', sans-serif; color: var(--accent); font-weight: 700; margin-bottom: 0.8rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em;">Mentor</div>
<h3 style="margin-top: 0; margin-bottom: 0.8rem; font-size: 1.2rem;">Xander — QR Lead</h3>
<p style="color: var(--text-secondary); font-size: 0.95rem; line-height: 1.5;">Your guide through Phase 1. You attend the same foundation sessions the QR analysts take.</p>
</div>
<div class="card">
<div style="font-family: 'IBM Plex Sans', sans-serif; color: var(--accent); font-weight: 700; margin-bottom: 0.8rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em;">Weeks 5–10</div>
<h3 style="margin-top: 0; margin-bottom: 0.8rem; font-size: 1.2rem;">Systems Weeks</h3>
<p style="color: var(--text-secondary); font-size: 0.95rem; line-height: 1.5;">The data pipeline (W5) and TradeNgin (W6), then working inside them: design, scheduling, testing, and project time.</p>
</div>
<div class="card">
<div style="font-family: 'IBM Plex Sans', sans-serif; color: var(--accent); font-weight: 700; margin-bottom: 0.8rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em;">Mentors</div>
<h3 style="margin-top: 0; margin-bottom: 0.8rem; font-size: 1.2rem;">Jonah & John</h3>
<p style="color: var(--text-secondary); font-size: 0.95rem; line-height: 1.5;">Your guides from Week 5 on. They own the pipeline and execution stack you will join.</p>
</div>
</div>
</div>
<div class="section">
<h2>Four-Phase Onboarding</h2>
<p style="color: var(--text-secondary); margin-bottom: 2rem;">Ten weeks, four phases — building from research context, through the two systems you will own, to running them yourself.</p>
<div class="grid grid-2">
<div class="phase-card">
<div class="phase-number">Phase 1 · Weeks 1–4</div>
<h3 class="phase-title">Quantitative Research Immersion</h3>
<p class="mentor-line">Mentor: Xander — QR Lead</p>
<p class="phase-week">Embedded with the QR desk</p>
<p style="color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 1rem; line-height: 1.6;">For your first four weeks you work directly under Xander, the QR Lead, attending the same foundation sessions as the research analysts. You cannot build good infrastructure for research you do not understand — this is where you learn it.</p>
<ul style="font-size: 0.95rem; margin-left: 1.5rem;">
<li>What defines a research edge & the Investment Proposal workflow</li>
<li>Derivatives & contract mechanics</li>
<li>FX & commodity markets</li>
<li>Fixed income & equity factors</li>
</ul>
</div>
<div class="phase-card">
<div class="phase-number">Phase 2 · Week 5</div>
<h3 class="phase-title">Data Systems Pipeline</h3>
<p class="mentor-line">Mentors: Jonah & John</p>
<p class="phase-week">A week dedicated to data</p>
<p style="color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 1rem; line-height: 1.6;">A full week on the pipeline that feeds every strategy. Jonah and John walk you through how raw market and reference data become clean, query-ready inputs for research and execution.</p>
<ul style="font-size: 0.95rem; margin-left: 1.5rem;">
<li>Data sourcing & ingestion</li>
<li>Cleaning, validation & storage</li>
<li>Pipeline → research → backtest data flow</li>
<li>Monitoring & data-quality gates</li>
</ul>
</div>
<div class="phase-card">
<div class="phase-number">Phase 3 · Week 6</div>
<h3 class="phase-title">TradeNgin — The Trade Engine</h3>
<p class="mentor-line">Mentors: Jonah & John</p>
<p class="phase-week">A week dedicated to execution</p>
<p style="color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 1rem; line-height: 1.6;">A full week on TradeNgin, the engine that turns signals into live orders. You follow a signal end to end — from the pipeline's output all the way to a placed order.</p>
<ul style="font-size: 0.95rem; margin-left: 1.5rem;">
<li>TradeNgin architecture & components</li>
<li>Signal-to-order execution path</li>
<li>Order routing, fills & market impact</li>
<li>Risk checks & live-system safeguards</li>
</ul>
</div>
<div class="phase-card">
<div class="phase-number">Phase 4 · Weeks 7–10</div>
<h3 class="phase-title">Engineering Practice</h3>
<p class="mentor-line">Mentors: Jonah & John</p>
<p class="phase-week">Working inside the systems</p>
<p style="color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 1rem; line-height: 1.6;">Knowing the two engines is not the same as being able to add to them. These weeks cover how a new component plugs in, how it runs unattended, and how you prove it is right — then hand you time to build something yourself.</p>
<ul style="font-size: 0.95rem; margin-left: 1.5rem;">
<li>Component design, interfaces & live-system tradeoffs</li>
<li>Scheduling, deployment & handling secrets</li>
<li>Testing pipelines and backtests you can trust</li>
<li>Project time with your mentors</li>
</ul>
</div>
</div>
</div>
<div class="section">
<h2>10-Week Onboarding Grid</h2>
<p style="color: var(--text-secondary); margin-bottom: 2rem;">Weeks 1–4 are the shared QR foundation sessions you attend under Xander. Weeks 5 and 6 are the QD systems weeks with Jonah and John — one dedicated to the data pipeline, one to TradeNgin. Weeks 7–10 are engineering practice and project time.</p>
<div class="grid grid-2">
<a href="qd-week1.html" class="week-card">
<span class="week-number">Week 1 · with Xander</span>
<h3 class="week-title">What Is a Research Edge?</h3>
</a>
<a href="qd-week2.html" class="week-card">
<span class="week-number">Week 2 · with Xander</span>
<h3 class="week-title">Derivatives & Contract Mechanics</h3>
</a>
<a href="qd-week3.html" class="week-card">
<span class="week-number">Week 3 · with Xander</span>
<h3 class="week-title">FX & Commodity Markets</h3>
</a>
<a href="qd-week4.html" class="week-card">
<span class="week-number">Week 4 · with Xander</span>
<h3 class="week-title">Fixed Income & Equity Factors</h3>
</a>
<a href="qd-week5.html" class="week-card" id="week-5" style="grid-column: 1 / -1; background: linear-gradient(135deg, #fff5ed 0%, #fffaf7 100%); border-color: #ffd9c0;">
<span class="week-number">Week 5 · with Jonah & John</span>
<h3 class="week-title" style="margin-bottom: 0.8rem;">Data Systems Pipeline</h3>
<p style="color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; margin-bottom: 1rem;">A full week dedicated to the data pipeline. Jonah and John walk you through how raw market and reference data are sourced, cleaned, validated, and stored — becoming the query-ready inputs every strategy and backtest depends on.</p>
<div class="week-tags">
<span class="tag">Data Pipeline</span>
<span class="tag">Sourcing & Ingestion</span>
<span class="tag">Cleaning & Validation</span>
<span class="tag">Storage</span>
<span class="tag">Mentors: Jonah & John</span>
</div>
</a>
<a href="qd-week6.html" class="week-card" id="week-6" style="grid-column: 1 / -1; background: linear-gradient(135deg, #fff5ed 0%, #fffaf7 100%); border-color: #ffd9c0;">
<span class="week-number">Week 6 · with Jonah & John</span>
<h3 class="week-title" style="margin-bottom: 0.8rem;">TradeNgin — The Trade Engine</h3>
<p style="color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; margin-bottom: 1rem;">A full week dedicated to TradeNgin, the firm's trade engine. You follow a signal end to end — from the pipeline's output through TradeNgin's order routing, risk checks, and fills — to understand how research becomes a live order.</p>
<div class="week-tags">
<span class="tag">TradeNgin</span>
<span class="tag">Signal-to-Order</span>
<span class="tag">Order Routing</span>
<span class="tag">Execution & Fills</span>
<span class="tag">Mentors: Jonah & John</span>
</div>
</a>
<a href="qd-week7.html" class="week-card">
<span class="week-number">Week 7 · with Jonah & John</span>
<h3 class="week-title">Systems & Infrastructure</h3>
</a>
<a href="qd-week8.html" class="week-card">
<span class="week-number">Week 8 · with Jonah & John</span>
<h3 class="week-title">Testing & Validation</h3>
</a>
<a href="qd-week9.html" class="week-card">
<span class="week-number">Week 9 · with Jonah & John</span>
<h3 class="week-title">Project Time</h3>
</a>
<a href="qd-week10.html" class="week-card">
<span class="week-number">Week 10</span>
<h3 class="week-title">To Be Announced</h3>
</a>
</div>
</div>
</div>
<footer>
AlgoGators Investment Fund — QD Training Program // Internal Use Only
</footer>
<canvas id="spiral-bg" style="position:absolute;top:50%;right:-140px;transform:translateY(-50%);pointer-events:none;z-index:-1;opacity:0.18;"></canvas>
<canvas id="spiral-bg-2" style="position:absolute;pointer-events:none;z-index:-1;opacity:0.18;clip-path:inset(50% 0 0 50%);"></canvas>
<canvas id="spiral-bg-3" style="position:absolute;pointer-events:none;z-index:-1;opacity:0.50;"></canvas>
<style>
@media (max-width: 768px) {
#spiral-bg, #spiral-bg-2, #spiral-bg-3 { display: none; }
.hero-logo-wrap::before {
top: -28px; right: -28px;
width: 28px; height: 28px;
}
.hero-logo-wrap::after {
bottom: -28px; left: -28px;
width: 28px; height: 28px;
}
}
</style>
<script src="cursor.js"></script>
<script>
(function () {
// ── Config ────────────────────────────────────────────────────────
const SPACING = 24; // grid pitch px
const DOT_R = 1.6; // dot radius px
const PUSH_RADIUS = 135; // mouse influence radius px
const PUSH_STRENGTH = 72; // max displacement px
const STIFFNESS = 0.055;
const DAMPING = 0.72;
// Base: dim orange | Accent: bright orange #FF7D2A = 255,125,42
const B_R=255, B_G=125, B_B=42, B_A=0.60;
const A_R=255, A_G=165, A_B=80, A_A=1.00;
// ── State ─────────────────────────────────────────────────────────
const hero = document.querySelector('.hero');
const canvas = document.getElementById('hero-canvas');
const ctx = canvas.getContext('2d');
let W, H, dots, dotCount;
let mx = -9999, my = -9999, mActive = false;
// ── Grid build ────────────────────────────────────────────────────
function buildGrid() {
const rect = hero.getBoundingClientRect();
W = canvas.width = Math.round(rect.width);
H = canvas.height = Math.round(rect.height);
const cols = Math.ceil(W / SPACING) + 1;
const rows = Math.ceil(H / SPACING) + 1;
const offX = (W - (cols - 1) * SPACING) / 2;
const offY = (H - (rows - 1) * SPACING) / 2;
dotCount = cols * rows;
dots = new Float32Array(dotCount * 6);
let n = 0;
for (let r = 0; r < rows; r++) {
for (let c = 0; c < cols; c++) {
const ox = offX + c * SPACING;
const oy = offY + r * SPACING;
dots[n] = ox; dots[n+1] = oy; // origin
dots[n+2] = ox; dots[n+3] = oy; // current
dots[n+4] = 0; dots[n+5] = 0; // velocity
n += 6;
}
}
}
// ── Render loop ───────────────────────────────────────────────────
function frame() {
ctx.clearRect(0, 0, W, H);
const PUSH_R2 = PUSH_RADIUS * PUSH_RADIUS;
const len = dotCount * 6;
for (let i = 0; i < len; i += 6) {
const ox = dots[i], oy = dots[i+1];
let x = dots[i+2], y = dots[i+3];
let vx = dots[i+4], vy = dots[i+5];
// repulsion target
let tx = ox, ty = oy;
if (mActive) {
const dx = x - mx, dy = y - my;
const d2 = dx*dx + dy*dy;
if (d2 < PUSH_R2 && d2 > 0.01) {
const d = Math.sqrt(d2);
const t = 1.0 - d / PUSH_RADIUS;
const f = t * t * PUSH_STRENGTH;
tx = ox + (dx / d) * f;
ty = oy + (dy / d) * f;
}
}
// spring physics
vx += (tx - x) * STIFFNESS;
vy += (ty - y) * STIFFNESS;
vx *= DAMPING;
vy *= DAMPING;
x += vx; y += vy;
dots[i+2]=x; dots[i+3]=y; dots[i+4]=vx; dots[i+5]=vy;
// color by displacement
const dispX = x - ox, dispY = y - oy;
const disp = Math.sqrt(dispX*dispX + dispY*dispY);
const t = disp / PUSH_STRENGTH > 1 ? 1 : disp / PUSH_STRENGTH;
const cr = (B_R + (A_R - B_R) * t + 0.5) | 0;
const cg = (B_G + (A_G - B_G) * t + 0.5) | 0;
const cb = (B_B + (A_B - B_B) * t + 0.5) | 0;
const ca = B_A + (A_A - B_A) * t;
ctx.beginPath();
ctx.arc(x, y, DOT_R, 0, 6.283185307);
ctx.fillStyle = `rgba(${cr},${cg},${cb},${(ca*100+0.5|0)/100})`;
ctx.fill();
}
requestAnimationFrame(frame);
}
// ── Events ────────────────────────────────────────────────────────
hero.addEventListener('mousemove', e => {
const r = canvas.getBoundingClientRect();
mx = e.clientX - r.left;
my = e.clientY - r.top;
mActive = true;
});
hero.addEventListener('mouseleave', () => { mActive = false; });
hero.addEventListener('touchmove', e => {
const r = canvas.getBoundingClientRect();
const t = e.touches[0];
mx = t.clientX - r.left;
my = t.clientY - r.top;
mActive = true;
}, { passive: true });
hero.addEventListener('touchend', () => { mActive = false; });
// resize: rebuild when hero changes size (e.g. window resize)
new ResizeObserver(buildGrid).observe(hero);
buildGrid();
requestAnimationFrame(frame);
})();
</script>
<script>
(function () {
const canvas = document.getElementById('spiral-bg');
const ctx = canvas.getContext('2d');
const SIZE = 640;
canvas.width = canvas.height = SIZE;
const fx = SIZE * 0.52; // focal point x
const fy = SIZE * 0.46; // focal point y
const RINGS = 62;
const MAX_R = SIZE * 0.47;
ctx.clearRect(0, 0, SIZE, SIZE);
ctx.strokeStyle = '#000';
ctx.lineWidth = 1.1;
for (let i = 1; i <= RINGS; i++) {
const t = i / RINGS; // 0→center, 1→outer
const r = MAX_R * Math.pow(t, 0.75); // slightly compressed spacing
// spiral angle over 2 full rotations
const spiralAngle = t * Math.PI * 4;
// offset the ellipse center slightly around the focal point
const offMag = r * 0.13 * (1 - t * 0.4);
const ox = fx + Math.cos(spiralAngle) * offMag;
const oy = fy + Math.sin(spiralAngle) * offMag;
// aspect ratio: more elongated near outer rings
const aspect = 0.55 + 0.45 * (1 - t);
// rotation tracks the spiral tangent
const rotation = spiralAngle + Math.PI * 0.5;
ctx.beginPath();
ctx.ellipse(ox, oy, r, r * aspect, rotation, 0, Math.PI * 2);
ctx.stroke();
}
// solid center dot
ctx.beginPath();
ctx.arc(fx, fy, 8, 0, Math.PI * 2);
ctx.fillStyle = '#000';
ctx.fill();
})();
</script>
<script>
(function () {
const canvas = document.getElementById('spiral-bg-2');
const ctx = canvas.getContext('2d');
const SIZE = 1120;
canvas.width = canvas.height = SIZE;
// Position: center of canvas at (x=0, y=hero_bottom)
function positionCanvas() {
const hero = document.querySelector('.hero');
const heroBottom = hero.offsetTop + hero.offsetHeight;
canvas.style.left = (-SIZE / 2) + 'px';
canvas.style.top = (heroBottom - SIZE / 2) + 'px';
}
positionCanvas();
window.addEventListener('resize', positionCanvas);
const cx = SIZE * 0.50;
const cy = SIZE * 0.50;
const RINGS = 52;
const MAX_R = SIZE * 0.45;
const FREQ = 7;
ctx.strokeStyle = '#000';
ctx.lineWidth = 1.5;
for (let i = 1; i <= RINGS; i++) {
const t = i / RINGS;
const baseR = MAX_R * Math.pow(t, 0.72);
const amp = baseR * 0.11 * (1 - t * 0.45);
const phaseOff = t * Math.PI * 3;
ctx.beginPath();
const STEPS = 360;
for (let s = 0; s <= STEPS; s++) {
const a = (s / STEPS) * Math.PI * 2;
const r = baseR + Math.sin(a * FREQ + phaseOff) * amp;
const x = cx + Math.cos(a) * r;
const y = cy + Math.sin(a) * r;
s === 0 ? ctx.moveTo(x, y) : ctx.lineTo(x, y);
}
ctx.closePath();
ctx.stroke();
}
})();
</script>
<script>
(function () {
const canvas = document.getElementById('spiral-bg-3');
const ctx = canvas.getContext('2d');
const SIZE = 1120;
canvas.width = canvas.height = SIZE;
function positionCanvas() {
const footer = document.querySelector('footer');
canvas.style.left = (-SIZE * 0.30) + 'px';
canvas.style.top = (footer.offsetTop - SIZE * 0.9) + 'px';
}
positionCanvas();
window.addEventListener('resize', positionCanvas);
const cx = SIZE * 0.50;
const cy = SIZE * 0.50;
const K = 3; // rose with 3 petals
const MAX_R = SIZE * 0.44;
const LAYERS = 9;
ctx.strokeStyle = '#FF7D2A';
ctx.lineWidth = 1.2;
for (let layer = 1; layer <= LAYERS; layer++) {
const scale = layer / LAYERS;
ctx.beginPath();
const STEPS = 720;
for (let s = 0; s <= STEPS; s++) {
const a = (s / STEPS) * Math.PI * 2;
const r = MAX_R * scale * Math.cos(K * a);
const x = cx + Math.cos(a) * r;
const y = cy + Math.sin(a) * r;
s === 0 ? ctx.moveTo(x, y) : ctx.lineTo(x, y);
}
ctx.closePath();
ctx.stroke();
}
// center dot
ctx.beginPath();
ctx.arc(cx, cy, 5, 0, Math.PI * 2);
ctx.fillStyle = '#FF7D2A';
ctx.fill();
})();
</script>
</body>
</html>