Compare commits

..

14 Commits

Author SHA1 Message Date
54d19c2e87
Convert "Wild Tic-Tac-Toe" to typst
All checks were successful
CI / Typst formatting (pull_request) Successful in 9s
CI / Typos (pull_request) Successful in 17s
CI / Build (pull_request) Successful in 10m42s
2025-01-23 20:20:43 -08:00
5be1a80e30
Convert "Big-Tac-Toe" to typst 2025-01-23 20:17:06 -08:00
28c0d32f7e
Convert "Passing Balls" to typst
All checks were successful
CI / Typst formatting (pull_request) Successful in 10s
CI / Typos (pull_request) Successful in 18s
CI / Build (pull_request) Successful in 11m11s
2025-01-23 18:26:54 -08:00
a71786ba88
Convert "Zeno's Furniture" to typst 2025-01-23 18:26:54 -08:00
286e545130
Convert "Gallery" to typst 2025-01-23 18:26:54 -08:00
e5c09302e4
Convert "Odd Dice" to typst 2025-01-23 18:26:54 -08:00
95663795cf
Convert "Travellers" to typst 2025-01-23 18:26:54 -08:00
d9267e8f77
Convert "Regex" to typst 2025-01-23 18:26:54 -08:00
f2ac44b049
Convert "Prime Factors" to typst 2025-01-23 18:26:54 -08:00
3ec7433bd8
Convert "Partition Products" to typst 2025-01-23 18:26:54 -08:00
aff861fe80
Convert "Mario Kart" to typst 2025-01-23 18:26:54 -08:00
88d90b87f6
Convert "Fuse Timers" to typst 2025-01-23 18:26:54 -08:00
814620ec19
Convert "fmod" to typst 2025-01-23 18:26:54 -08:00
6361adb19e
Convert "A Familiar Concept" to typst 2025-01-23 18:26:54 -08:00
3 changed files with 4 additions and 165 deletions

View File

@ -22,7 +22,6 @@
// Colors
#let ored = rgb("D62121")
#let oorange = rgb("#ffaa3b")
#let ogrape = rgb("9C36B5")
#let ocyan = rgb("2288BF")
#let oteal = rgb("12B886")

View File

@ -1,5 +1,4 @@
#import "@local/handout:0.1.0": *
#import "@preview/cetz:0.3.1"
#show: doc => handout(
doc,
@ -29,170 +28,11 @@ Participant 1 has a black ball. Which balls are held by participants 2, 3, and 4
#solution([
The graph of possible moves is isomorphic to a circle (since 5 and 12 are coprime), \
so the order of the balls cannot be changed as they are passed around.
but the balls get passed around, so swapping the place of any two balls is not allowed.
#v(2mm)
#v(3mm)
Therefore, the balls will stay in their initial (cyclic) order:
#v(2mm)
#{
let s = 0.7 // scale
let t = 12pt * s // text size
let radius = 0.35
let pts = (
(0 * s, 3 * s),
(1 * s, 2 * s),
(2 * s, 1 * s),
(3 * s, 0 * s),
(2 * s, -1 * s),
(1 * s, -2 * s),
(0 * s, -3 * s),
(-1 * s, -2 * s),
(-2 * s, -1 * s),
(-3 * s, 0 * s),
(-2 * s, 1 * s),
(-1 * s, 2 * s),
)
let pts_shuf = (
(0 * s, 3 * s), // 1
(1 * s, -2 * s), // 6
(-2 * s, 1 * s), // 11
(3 * s, 0 * s), // 4
(-2 * s, -1 * s), // 9
(1 * s, 2 * s), // 2
(0 * s, -3 * s), // 7
(-1 * s, 2 * s), // 12
(2 * s, -1 * s), // 5
(-3 * s, 0 * s), // 10
(2 * s, 1 * s), // 3
(-1 * s, -2 * s), // 8
)
table(
stroke: none,
align: center,
columns: (1fr, 1fr, 1fr),
cetz.canvas({
import cetz.draw: *
set-style(stroke: (thickness: 0.4mm, paint: black))
line(..pts_shuf, close: true)
let i = 1
for p in pts {
circle(
p,
radius: radius * s,
fill: if i == 1 {
ored
} else if i == 2 {
ogreen
} else if i == 3 {
oorange
} else if i == 4 {
oblue
} else { white },
)
content(
p,
text(
fill: if i <= 4 {
white
} else {
black
},
size: t,
[*#i*],
),
)
i = i + 1
}
}),
cetz.canvas({
import cetz.draw: *
set-style(stroke: (thickness: 0.4mm, paint: black))
line(..pts, close: true)
let i = 1
for p in pts {
let l = calc.rem(((i - 1) * 5), 12) + 1
circle(
p,
radius: radius * s,
fill: if l == 1 {
ored
} else if l == 2 {
ogreen
} else if l == 3 {
oorange
} else if l == 4 {
oblue
} else { white },
)
content(
p,
text(
fill: if l <= 4 {
white
} else {
black
},
size: t,
[*#l*],
),
)
i = i + 1
}
}),
cetz.canvas({
import cetz.draw: *
set-style(stroke: (thickness: 0.4mm, paint: black))
line(..pts, close: true)
let i = 1
for p in pts {
let l = calc.rem(((i - 1) * 5), 12) + 1
circle(
p,
radius: radius * s,
fill: if l == 1 {
oblue
} else if l == 2 {
oorange
} else if l == 3 {
ored
} else if l == 4 {
ogreen
} else { white },
)
content(
p,
text(
fill: if l <= 4 {
white
} else {
black
},
size: t,
[*#l*],
),
)
i = i + 1
}
}),
)
}
// TODO: do this in CeTZ
#figure(image("pass-sol.png", width: 90%))
])

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB