Compare commits

..

15 Commits

Author SHA1 Message Date
6048806e49 Convert "Wild Tic-Tac-Toe" to typst
All checks were successful
CI / Typst formatting (pull_request) Successful in 11s
CI / Typos (pull_request) Successful in 18s
CI / Build (pull_request) Successful in 10m29s
2025-01-24 09:27:23 -08:00
0beb06af2f Convert "Big-Tac-Toe" to typst 2025-01-24 09:27:23 -08:00
3bb517138d Convert "Passing Balls" to typst 2025-01-24 09:27:23 -08:00
69946911ef Convert "Zeno's Furniture" to typst 2025-01-24 09:27:23 -08:00
18dfea338d Convert "Gallery" to typst 2025-01-24 09:27:23 -08:00
6320f171cc Convert "Odd Dice" to typst 2025-01-24 09:27:23 -08:00
d195413c9c Convert "Travellers" to typst 2025-01-24 09:27:23 -08:00
11f4ab3bbd Convert "Regex" to typst 2025-01-24 09:27:23 -08:00
9cd8ab741c Convert "Prime Factors" to typst 2025-01-24 09:27:23 -08:00
1072ed8059 Convert "Partition Products" to typst 2025-01-24 09:27:23 -08:00
45d7bfbc44 Convert "Mario Kart" to typst 2025-01-24 09:27:23 -08:00
8d8646e142 Convert "Fuse Timers" to typst 2025-01-24 09:27:23 -08:00
8d7b3edf22 Convert "fmod" to typst 2025-01-24 09:27:23 -08:00
a73b2dc871 Convert "A Familiar Concept" to typst 2025-01-24 09:27:23 -08:00
d6f365c231 Added oorange color 2025-01-24 09:27:22 -08:00
3 changed files with 165 additions and 4 deletions

View File

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

View File

@ -1,4 +1,5 @@
#import "@local/handout:0.1.0": *
#import "@preview/cetz:0.3.1"
#show: doc => handout(
doc,
@ -28,11 +29,170 @@ 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), \
but the balls get passed around, so swapping the place of any two balls is not allowed.
so the order of the balls cannot be changed as they are passed around.
#v(3mm)
#v(2mm)
Therefore, the balls will stay in their initial (cyclic) order:
// TODO: do this in CeTZ
#figure(image("pass-sol.png", width: 90%))
#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
}
}),
)
}
])

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB