summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--build.py26
-rw-r--r--site/common.typ50
-rw-r--r--site/content/bsc_thesis.typ12
-rw-r--r--site/content/gsoc/mid_august.typ4
-rw-r--r--site/content/math/angle_between_two_vectors.typ14
-rw-r--r--site/content/math/atan2.typ5
-rw-r--r--site/content/math/index.typ43
-rw-r--r--site/content/software/polarization.typ13
-rw-r--r--site/index.typ18
-rw-r--r--static/software/polarization.jpgbin0 -> 112810 bytes
-rw-r--r--static/w11_236771_2019_praca_inzynierska.pdfbin0 -> 15954495 bytes
12 files changed, 152 insertions, 35 deletions
diff --git a/.gitignore b/.gitignore
index be78206..528899e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,4 +5,4 @@ old_media/
# Generated site
public/
-site/temp/ \ No newline at end of file
+site/temp/
diff --git a/build.py b/build.py
index 38d7eb4..799eceb 100644
--- a/build.py
+++ b/build.py
@@ -17,7 +17,7 @@ from watchfiles import DefaultFilter, watch
class CompiledPage:
url: str
title: str
- date: datetime
+ date: datetime | None
class Builder:
@@ -53,14 +53,19 @@ class Builder:
)
)
- return CompiledPage(
- url=str(relative_path.with_suffix('.html')),
- title=metadata['title'],
- date=datetime(
+ if 'date_year' in metadata:
+ date = datetime(
year=metadata['date_year'],
month=metadata['date_month'],
day=metadata['date_day'],
- ),
+ )
+ else:
+ date = None
+
+ return CompiledPage(
+ url=str(relative_path.with_suffix('.html')),
+ title=metadata['title'],
+ date=date,
)
def _compile_typst_pages(self) -> list[CompiledPage]:
@@ -74,19 +79,18 @@ class Builder:
payload_path = self.temp_dir / 'payload.json'
payload_path.parent.mkdir(parents=True, exist_ok=True)
- pages.sort(key=lambda page: page.date, reverse=True)
-
with payload_path.open('w') as file:
payload = {
'pages': [
{
'url': page.url,
'title': page.title,
- 'year': page.date.year,
- 'month': page.date.month,
- 'day': page.date.day,
+ 'year': page.date.year if page.date else None,
+ 'month': page.date.month if page.date else None,
+ 'day': page.date.day if page.date else None,
}
for page in pages
+ if page.date is not None
],
}
json.dump(payload, file)
diff --git a/site/common.typ b/site/common.typ
index a1c2097..3f2bd61 100644
--- a/site/common.typ
+++ b/site/common.typ
@@ -21,7 +21,14 @@
}
#let link-self(page, body) = {
- link(webroot + page + ".html", body)
+ let parts = page.split("#")
+ let url = if parts.len() == 1 {
+ webroot + page + ".html"
+ } else {
+ webroot + parts.at(0) + ".html#" + parts.slice(1).join("#")
+ }
+
+ link(url, body)
}
#let static(path) = {
@@ -32,6 +39,10 @@
html.elem("img", attrs: (src: src, alt: ""))
}
+#let anchor(name) = {
+ html.elem("span", attrs: (id: name))[]
+}
+
#let breadcrumbs() = {
let path = sys.inputs.at("path")
let parts = path.split("/")
@@ -69,9 +80,7 @@
})
}
-#let post(body, title: none, author: "Paweł Redman", date: none) = {
- assert(date != none, message: "missing date")
-
+#let post(body, title: none, author: "Paweł Redman", date: none, updated: none) = {
set document(
title: title,
author: author,
@@ -93,14 +102,22 @@
}
}
- [
- #metadata((
- title: title,
- date_year: date.year(),
- date_month: date.month(),
- date_day: date.day(),
- )) <post-meta>
- ]
+ if date != none {
+ [
+ #metadata((
+ title: title,
+ date_year: date.year(),
+ date_month: date.month(),
+ date_day: date.day(),
+ )) <post-meta>
+ ]
+ } else {
+ [
+ #metadata((
+ title: title,
+ )) <post-meta>
+ ]
+ }
template(
title,
@@ -108,7 +125,14 @@
html.article({
html.header({
html.h1(title)
- html.p(id: "author")[by #author, published on #html.time(datetime: date)[#format-date-en(date)]]
+ if date != none {
+ html.p(id: "author")[
+ by #author, published on #html.time(datetime: date)[#format-date-en(date)]
+ #if updated != none {
+ [, updated on #html.time(datetime: updated)[#format-date-en(updated)]]
+ }
+ ]
+ }
})
body
}),
diff --git a/site/content/bsc_thesis.typ b/site/content/bsc_thesis.typ
new file mode 100644
index 0000000..d9790ca
--- /dev/null
+++ b/site/content/bsc_thesis.typ
@@ -0,0 +1,12 @@
+#import "/common.typ": post, static
+
+#show: post.with(
+ title: "A comparison of methods of assessing the quality of color rendering of consumer light sources",
+ date: datetime(year: 2020, month: 8, day: 15),
+)
+
+The full text in Polish is available #link(static("w11_236771_2019_praca_inzynierska.pdf"))[here]. The LaTeX and Python source code is available at #link("https://redman.xyz/git/praca_inzynierska", "praca_inzynierska").
+
+= Abstract
+
+In science and the industry, many methods of assessing quality of color rendering are in use, from the oldest, created in the middle of the 20th century, to completely new ones. The goal of this work is an overview and comparison of the most widely used of these, with a specific focus on their applicability to widely available, commerical light sources.
diff --git a/site/content/gsoc/mid_august.typ b/site/content/gsoc/mid_august.typ
index ef06246..f517d84 100644
--- a/site/content/gsoc/mid_august.typ
+++ b/site/content/gsoc/mid_august.typ
@@ -1,4 +1,4 @@
-#import "/common.typ": post, link-self
+#import "/common.typ": post, link-self, anchor
#show: post.with(
title: "Mid-August progress report",
@@ -22,7 +22,7 @@ This is a very interesting and quite complicated method that I covered in a four
The #link("https://github.com/colour-science/colour/pull/607")[pull request] is awaiting review.
-#html.elem("span", attrs: (id: "mallett_and_yuksel_2019"))[]
+#anchor("mallett_and_yuksel_2019")
= Mallett and Yuksel (2019) <mallett_and_yuksel_2019>
This method seeks to create reflectivities $bold(s)_r$, $bold(s)_g$, $bold(s)_b$ that match RGB primaries and use them for reconstruction. Given an $(r, g, b)$ triplet, the recovered spectrum is simply:
diff --git a/site/content/math/angle_between_two_vectors.typ b/site/content/math/angle_between_two_vectors.typ
index b779a5f..043d65a 100644
--- a/site/content/math/angle_between_two_vectors.typ
+++ b/site/content/math/angle_between_two_vectors.typ
@@ -3,6 +3,7 @@
#show: post.with(
title: "Angle between two vectors",
date: datetime(year: 2020, month: 4, day: 17),
+ updated: datetime(year: 2026, month: 6, day: 14),
)
#figure(
@@ -67,16 +68,19 @@ which is why the dot product doesn't carry enough information to compute $psi$.
== In two dimensions
-In any coordinate system:
+$
+ psi(bold(u), bold(v)) &= op("atan2")(bold(u) times_2 bold(v), bold(u) dot bold(v))
+$
+
+where the "two-dimensional cross product" is defined as:
$
- psi(bold(u), bold(v)) &= op("atan2")(bold(u) times_2 bold(v), bold(u) dot bold(v)) \
- &= op("atan2")(u_1 v^2 - u_2 v^1, u_1 v^1 + u_2 v^2)
+ bold(u) times_2 bold(v) = u_1 v_2 - u_2 v_1 = u v sin theta
$
== Derivation: in two dimensions
-Using the geometric definitions of the #link-self("math/2d_cross_product")[two-dimensional cross product] and the dot product:
+Using the geometric definitions of the two-dimensional cross product (above) and the dot product:
$
cases(
@@ -94,7 +98,7 @@ $
)
$
-Solving for $theta$ (see #link-self("math/atan2")[Systems of equations involving the cosine and the sine of an unknown]):
+Solving for $theta$ (see #link-self("math/atan2#systems")[Systems of equations involving the cosine and the sine of an unknown]):
$
theta &= op("atan2")(1 / (u v) bold(u) times_2 bold(v), 1 / (u v) bold(u) dot bold(v)) \
diff --git a/site/content/math/atan2.typ b/site/content/math/atan2.typ
index 4442889..7fa77c8 100644
--- a/site/content/math/atan2.typ
+++ b/site/content/math/atan2.typ
@@ -1,4 +1,4 @@
-#import "/common.typ": post, static, img
+#import "/common.typ": post, static, img, anchor
#show: post.with(
title: "atan2",
@@ -45,7 +45,8 @@ $
Interestingly, the function $tan^(-1)(y / x)$ has the same partial derivatives.
-= Systems of equations involving the cosine and the sine of an unknown
+#anchor("systems")
+= Systems of equations involving the cosine and the sine of an unknown <systems>
#figure(
img(static("math/polar-coords.png")),
diff --git a/site/content/math/index.typ b/site/content/math/index.typ
new file mode 100644
index 0000000..a1a6c4a
--- /dev/null
+++ b/site/content/math/index.typ
@@ -0,0 +1,43 @@
+#import "/common.typ": post, link-self
+
+#show: post.with(
+ title: "Math notes",
+)
+
+This part of the site is a loose collection of my math notes.
+
+- #link-self("math/angle_between_two_vectors")[Angle between two vectors]
+- #link-self("math/atan2")[atan2]
+- #link-self("math/integrating_sin2x")[Integrating sin² x]
+- #link-self("math/integrating_cos2x")[Integrating cos² x]
+- #link-self("math/ray_vs_sphere")[Ray vs. sphere intersection]
+- #link-self("math/rotational_symmetries_bravais_lattice")[Possible rotational symmetries in a Bravais lattice]
+
+= Notation
+
+Since there are so many conventions in linear algebra, I've decided to pick one and be consistent. Below is what I use throughout the site.
+
+== Vectors
+
+#table(
+ columns: 2,
+ [$bold(x)$], [A vector (bold font).],
+ [$x$], [The norm of the vector $bold(x)$ (a scalar), if it appears in the text. Otherwise, it's some scalar.],
+ [$x^2$], [The inner product of a vector with itself (a scalar). Equivalently, the norm of the vector squared.],
+ [$|bold(a) + bold(b) times bold(c)|$], [The norm of a vector expression (a scalar).],
+ [$bold(a) dot bold(b)$], [The inner product of two vectors (a scalar).],
+ [$bold(a) times bold(b)$], [The cross product of two vectors (a vector).],
+)
+
+== Matrices
+
+#table(
+ columns: 2,
+ [$hat(M)$], [A matrix.],
+ [$hat(A) hat(B)$], [A matrix product (a matrix). The former is *premultiplying* the latter or, equivalently, the latter is *postmultiplying* the former.],
+ [$hat(M) bold(x)$], [A matrix premultiplying a vector or, equivalently, operating on it (a vector).],
+ [$hat(A) times.circle hat(B)$], [The Kronecker product of two matrices (a matrix).],
+ [$hat(M)^(-1)$], [The inverse of an invertible square matrix (a matrix).],
+ [$op("det") hat(M)$], [The determinant of a square matrix (a scalar).],
+ [$op("Tr") hat(M)$], [The trace of a square matrix (a scalar).],
+)
diff --git a/site/content/software/polarization.typ b/site/content/software/polarization.typ
new file mode 100644
index 0000000..3e514be
--- /dev/null
+++ b/site/content/software/polarization.typ
@@ -0,0 +1,13 @@
+#import "/common.typ": post, static, img
+
+#show: post.with(
+ title: "Polarization",
+ date: datetime(year: 2020, month: 3, day: 23),
+)
+
+#figure(
+ img(static("software/polarization.jpg")),
+ caption: [A screenshot.],
+)
+
+This is a Python program I've written for myself to understand how light polarization works. The source code is available at #link("https://zittrig.eu/git/enneract/polarization")[polarization]. It needs a lot of polishing. I'll do that when I find the time then write a proper article.
diff --git a/site/index.typ b/site/index.typ
index 4b615a4..227485a 100644
--- a/site/index.typ
+++ b/site/index.typ
@@ -6,7 +6,7 @@
html.h1("redman.xyz"),
)
-I'm Paweł Redman, known online as enneract, a software engineer working on LTE/NR Layer 1 with a B.Sc. in Optics and Photonics Engineering.
+I'm Paweł Redman, known online as enneract, a software engineer working on LTE/NR Layer 1 with a #link-self("bsc_thesis")[B.Sc. in Optics and Photonics Engineering].
= Latest posts
@@ -28,3 +28,19 @@ I'm Paweł Redman, known online as enneract, a software engineer working on LTE/
= Selected projects
+TODO
+
+= All pages (debug)
+
+#for page in payload.pages {
+ let date = datetime(
+ year: page.year,
+ month: page.month,
+ day: page.day,
+ )
+
+ format-date-en(date)
+ " "
+ link(webroot + page.url, page.title)
+ "\n"
+}
diff --git a/static/software/polarization.jpg b/static/software/polarization.jpg
new file mode 100644
index 0000000..fac03bc
--- /dev/null
+++ b/static/software/polarization.jpg
Binary files differ
diff --git a/static/w11_236771_2019_praca_inzynierska.pdf b/static/w11_236771_2019_praca_inzynierska.pdf
new file mode 100644
index 0000000..2838b36
--- /dev/null
+++ b/static/w11_236771_2019_praca_inzynierska.pdf
Binary files differ