thesis/slides/outlines.typ
Jean-Marie 'Histausse' Mineau 6f7afe73a7
All checks were successful
/ test_checkout (push) Successful in 1m48s
feedback
2025-10-28 23:18:54 +01:00

665 lines
16 KiB
Typst

#import "./icons.typ": *
#let static-outline(
small_icon_size: 100pt,
big_icon_size: 200pt,
) = context {
let width = 2 * small_icon_size + big_icon_size * 2
let height = big_icon_size
let arrow_width = small_icon_size / 10
let arrow_gap = small_icon_size / 5
let app = apk(
fill: red,
height: small_icon_size
)
let rprt = report(height: small_icon_size)
let analyser = analyse(height: big_icon_size)
let app_size = measure(app)
let app_pos = (
0pt,
-(height - app_size.height) / 2
)
let analyser_size = measure(analyser)
let analyser_pos = (
width / 2 - analyser_size.width / 2,
-(height - analyser_size.height) / 2
)
let rprt_size = measure(rprt)
let rprt_pos = (
width - rprt_size.width,
-(height - rprt_size.height) / 2
)
box(
width: width,
height: height,
//stroke: black,
{
place(
left+bottom,
dx: app_pos.at(0),
dy: app_pos.at(1),
app
)
place(
left+bottom,
dx: analyser_pos.at(0),
dy: analyser_pos.at(1),
analyser
)
place(
left+bottom,
dx: rprt_pos.at(0),
dy: rprt_pos.at(1),
rprt
)
arrow(
stroke: (arrow_width + black),
(
app_pos.at(0) + app_size.width + arrow_gap,
app_pos.at(1) - app_size.height / 2
),
(
analyser_pos.at(0) - arrow_gap,
analyser_pos.at(1) - analyser_size.height / 2,
)
)
arrow(
stroke: (arrow_width + black),
(
analyser_pos.at(0) + analyser_size.width + arrow_gap,
analyser_pos.at(1) - analyser_size.height / 2,
),
(
rprt_pos.at(0) - arrow_gap,
rprt_pos.at(1) - rprt_size.height / 2
)
)
}
)
}
#let dexhunter-outline(
small_icon_size: 100pt,
big_icon_size: 200pt,
) = context {
let width = small_icon_size * 3 + big_icon_size
let height = (3 + 1) * small_icon_size
let arrow_width = small_icon_size / 10
let arrow_gap = small_icon_size / 5
let app = apk(
fill: red,
height: small_icon_size
)
let dex = apk(
fill: green,
height: small_icon_size,
txt: ".dex"
)
let phone = phone(
width: big_icon_size / 2,
height: big_icon_size,
body: align(center+horizon, circle-arrows(
stroke: black + 2pt,
nb-arrows: 3,
out-rad: big_icon_size * 0.19)
)
)
let app_size = measure(app)
let dex_size = measure(dex)
let phone_size = measure(phone)
let app_pos = (
0pt,
-height / 2 + app_size.height / 2
)
let dex_pos0 = (
width - dex_size.width,
0pt
)
let dex_pos1 = (
width - dex_size.width,
-height / 2 + dex_size.height / 2
)
let dex_pos2 = (
width - dex_size.width,
-height + dex_size.height
)
let phone_pos = (
width / 2 - phone_size.width / 2,
-height / 2 + phone_size.height / 2
)
let arrow_l_x0 = phone_pos.at(0) + phone_size.width + arrow_gap
let arrow_l_x2 = width - dex_size.width - arrow_gap
let arrow_l_x1 = (arrow_l_x2 + arrow_l_x0) / 2
let arrow_l_y0_0 = phone_pos.at(1) - phone_size.height * 1/4
let arrow_l_y0_1 = phone_pos.at(1) - phone_size.height * 2/4
let arrow_l_y0_2 = phone_pos.at(1) - phone_size.height * 3/4
let arrow_l_y1_0 = dex_pos0.at(1) - dex_size.height / 2
let arrow_l_y1_1 = dex_pos1.at(1) - dex_size.height / 2
let arrow_l_y1_2 = dex_pos2.at(1) - dex_size.height / 2
box(
width: width,
height: height,
//stroke: black,
{
place(
left+bottom,
dx: app_pos.at(0),
dy: app_pos.at(1),
app
)
place(
left+bottom,
dx: dex_pos0.at(0),
dy: dex_pos0.at(1),
dex
)
place(
left+bottom,
dx: dex_pos1.at(0),
dy: dex_pos1.at(1),
dex
)
place(
left+bottom,
dx: dex_pos2.at(0),
dy: dex_pos2.at(1),
dex
)
place(
left+bottom,
dx: phone_pos.at(0),
dy: phone_pos.at(1),
phone
)
arrow(
stroke: arrow_width + black,
(
app_pos.at(0) + app_size.width + arrow_gap,
app_pos.at(1) - app_size.height / 2
),
(
phone_pos.at(0) - arrow_gap,
phone_pos.at(1) - phone_size.height / 2,
)
)
arrow(
stroke: arrow_width + black,
(arrow_l_x0, arrow_l_y0_0),
(arrow_l_x1, arrow_l_y0_0),
(arrow_l_x1, arrow_l_y1_0),
(arrow_l_x2, arrow_l_y1_0),
)
arrow(
stroke: arrow_width + black,
(arrow_l_x0, arrow_l_y0_1),
(arrow_l_x1, arrow_l_y0_1),
(arrow_l_x1, arrow_l_y1_1),
(arrow_l_x2, arrow_l_y1_1),
)
arrow(
stroke: arrow_width + black,
(arrow_l_x0, arrow_l_y0_2),
(arrow_l_x1, arrow_l_y0_2),
(arrow_l_x1, arrow_l_y1_2),
(arrow_l_x2, arrow_l_y1_2),
)
}
)
}
#let droidra-outline(
small_icon_size: 100pt,
big_icon_size: 200pt,
) = context {
text(fill: red, size: 40pt)[TODO]
}
#let theseus-outline(
small_icon_size: 60pt,
big_icon_size: 90pt,
stage: "theseus",
) = context {
let stages = (
"static-only",
"static-vs-dyn",
"theseus",
"theseus-no-static",
"theseus-vs-static",
)
assert(
stage in stages,
message: "theseus-outline stage arg must be in: " + repr(stages)
)
let width = (
small_icon_size * 4 +
big_icon_size * 3 +
5 * small_icon_size
)
let height = 4.5 * small_icon_size + big_icon_size
let y0 = (height - big_icon_size) - 2 * small_icon_size
let arrow_width = small_icon_size / 10
let arrow_gap = small_icon_size / 5
let app = apk(
fill: red,
height: small_icon_size
)
let app2 = apk(
fill: blue,
height: small_icon_size
)
let dex = apk(
fill: green,
height: small_icon_size,
txt: ".dex"
)
let rprt = report(
height: small_icon_size,
)
let phone = phone(
width: big_icon_size * 0.75,
height: big_icon_size * 1.5,
body: align(center+horizon, circle-arrows(
stroke: black + 2pt,
nb-arrows: 3,
out-rad: big_icon_size * 0.75 * 0.3)
)
)
let app_size = measure(app)
let dex_size = measure(dex)
let rprt_size = measure(rprt)
let phone_size = measure(phone)
let app_pos = (
0pt,
-y0 + app_size.height / 2
)
let dex_pos_x = width * 2/7 - dex_size.width / 2
let dex_pos0 = (
dex_pos_x,
- y0 + 2 * dex_size.height
)
let dex_pos1 = (
dex_pos_x,
- y0 + dex_size.height / 2
)
let rprt_pos2 = (
width * 2/7 - rprt_size.width / 2,
- y0 - dex_size.height
)
let phone_pos = (
width / 7 - phone_size.width / 2,
-y0 + phone_size.height / 2
)
let arrow_1_x0 = phone_pos.at(0) + phone_size.width + arrow_gap
let arrow_1_x2 = dex_pos_x - arrow_gap
let arrow_1_x1 = (arrow_1_x2 + arrow_1_x0) / 2
let arrow_1_y0_0 = phone_pos.at(1) - phone_size.height * 1/4
let arrow_1_y0_1 = phone_pos.at(1) - phone_size.height * 2/4
let arrow_1_y0_2 = phone_pos.at(1) - phone_size.height * 3/4
let arrow_1_y1_0 = dex_pos0.at(1) - dex_size.height / 2
let arrow_1_y1_1 = dex_pos1.at(1) - dex_size.height / 2
let arrow_1_y1_2 = rprt_pos2.at(1) - dex_size.height / 2
let patcher = machinery(height: big_icon_size)
let patcher_size = measure(patcher)
let patcher_pos = (
width * 3.3 / 7 - patcher_size.width / 2,
-y0 + patcher_size.height / 2
)
let arrow_2_x0 = dex_pos1.at(0) + dex_size.width + arrow_gap
let arrow_2_x2 = patcher_pos.at(0) - arrow_gap
let arrow_2_x1 = (arrow_2_x2 + arrow_2_x0) / 2
let arrow_2_y0_0 = dex_pos0.at(1) - dex_size.height / 2
let arrow_2_y0_1 = dex_pos1.at(1) - dex_size.height / 2
let arrow_2_y0_2 = rprt_pos2.at(1) - dex_size.height / 2
let arrow_2_y1_0 = patcher_pos.at(1) - patcher_size.height * 1/4
let arrow_2_y1_1 = patcher_pos.at(1) - patcher_size.height * 2/4
let arrow_2_y1_2 = patcher_pos.at(1) - patcher_size.height * 3/4
let app2_size = measure(app2)
let app2_pos = (
width * 4.5 / 7 - app2_size.width / 2,
-y0 + app2_size.height / 2
)
let analyser = analyse(height: big_icon_size)
let analyser_size = measure(analyser)
let analyser_pos = (
width * 5.7 / 7 - analyser_size.width / 2,
-y0 + analyser_size.height / 2
)
let analyser_pos2 = (
width / 2 - analyser_size.width / 2,
-height + analyser_size.height
)
let rprt2_pos = (
width - rprt_size.width,
-y0 + rprt_size.height / 2
)
let rprt3_pos = (
analyser_pos2.at(0) + analyser_size.width + 2 * rprt_size.width,
analyser_pos2.at(1) - analyser_size.height / 2 + rprt_size.height / 2
)
box(
width: width,
height: height,
//stroke: black,
{
if stage == "static-only" {
place(
left+bottom,
dx: app2_pos.at(0),
dy: app2_pos.at(1),
app
)
/*
arrow(
stroke: arrow_width + black,
(
app_static_pos.at(0) + app_size.width + arrow_gap,
app_static_pos.at(1) - app_size.height / 2
),
(
analyser_pos2.at(0) - arrow_gap,
analyser_pos2.at(1) - analyser_size.height / 2
)
)*/
} else {
place(
left+bottom,
dx: app_pos.at(0),
dy: app_pos.at(1),
app
)
}
if stage not in ("static-only") {
place(
left+bottom,
dx: phone_pos.at(0),
dy: phone_pos.at(1),
phone
)
arrow(
stroke: arrow_width + black,
(
app_pos.at(0) + app_size.width + arrow_gap,
app_pos.at(1) - app_size.height / 2
),
(
phone_pos.at(0) - arrow_gap,
phone_pos.at(1) - phone_size.height / 2,
)
)
}
if stage not in ("static-only", "static-vs-dyn") {
place(
left+bottom,
dx: dex_pos0.at(0),
dy: dex_pos0.at(1),
dex
)
place(
left+bottom,
dx: dex_pos1.at(0),
dy: dex_pos1.at(1),
dex
)
place(
left+bottom,
dx: rprt_pos2.at(0),
dy: rprt_pos2.at(1),
rprt
)
arrow(
stroke: arrow_width + black,
(arrow_1_x0, arrow_1_y0_0),
(arrow_1_x1, arrow_1_y0_0),
(arrow_1_x1, arrow_1_y1_0),
(arrow_1_x2, arrow_1_y1_0),
)
arrow(
stroke: arrow_width + black,
(arrow_1_x0, arrow_1_y0_1),
(arrow_1_x1, arrow_1_y0_1),
(arrow_1_x1, arrow_1_y1_1),
(arrow_1_x2, arrow_1_y1_1),
)
arrow(
stroke: arrow_width + black,
(arrow_1_x0, arrow_1_y0_2),
(arrow_1_x1, arrow_1_y0_2),
(arrow_1_x1, arrow_1_y1_2),
(arrow_1_x2, arrow_1_y1_2),
)
arrow(
stroke: arrow_width + black,
(arrow_2_x0, arrow_2_y0_0),
(arrow_2_x1, arrow_2_y0_0),
(arrow_2_x1, arrow_2_y1_0),
(arrow_2_x2, arrow_2_y1_0),
)
arrow(
stroke: arrow_width + black,
(arrow_2_x0, arrow_2_y0_1),
(arrow_2_x1, arrow_2_y0_1),
(arrow_2_x1, arrow_2_y1_1),
(arrow_2_x2, arrow_2_y1_1),
)
arrow(
stroke: arrow_width + black,
(arrow_2_x0, arrow_2_y0_2),
(arrow_2_x1, arrow_2_y0_2),
(arrow_2_x1, arrow_2_y1_2),
(arrow_2_x2, arrow_2_y1_2),
)
place(
bottom+left,
dx: patcher_pos.at(0),
dy: patcher_pos.at(1),
patcher
)
arrow(
stroke: arrow_width + black,
(
patcher_pos.at(0) + patcher_size.width + arrow_gap,
patcher_pos.at(1) - patcher_size.height / 2
),
(
app2_pos.at(0) - arrow_gap,
app2_pos.at(1) - app2_size.height / 2,
)
)
place(
bottom+left,
dx: app2_pos.at(0),
dy: app2_pos.at(1),
app2
)
}
if stage == "static-vs-dyn" {
arrow(
stroke: arrow_width + black,
(
app_pos.at(0) + app2_size.width / 2,
app_pos.at(1) + arrow_gap
),
(
app_pos.at(0) + app2_size.width / 2,
phone_pos.at(1) + arrow_gap * 2
),
(
app2_pos.at(0) + app2_size.width + arrow_gap,
phone_pos.at(1) + arrow_gap * 2
),
(
app2_pos.at(0) + app2_size.width + arrow_gap,
app2_pos.at(1) - app2_size.height / 2
),
(
analyser_pos.at(0) - arrow_gap,
analyser_pos.at(1) - analyser_size.height / 2,
)
)
}
if stage in (
"theseus",
"theseus-vs-static",
"static-only"
) {
arrow(
stroke: arrow_width + black,
(
app2_pos.at(0) + app2_size.width + arrow_gap,
app2_pos.at(1) - app2_size.height / 2
),
(
analyser_pos.at(0) - arrow_gap,
analyser_pos.at(1) - analyser_size.height / 2,
)
)
}
if stage in (
"theseus",
"static-vs-dyn",
"theseus-vs-static",
"static-only"
) {
place(
bottom+left,
dx: analyser_pos.at(0),
dy: analyser_pos.at(1),
analyser
)
arrow(
stroke: arrow_width + black,
(
analyser_pos.at(0) + analyser_size.width + arrow_gap,
analyser_pos.at(1) - analyser_size.height / 2
),
(
rprt2_pos.at(0) - arrow_gap,
rprt2_pos.at(1) - rprt_size.height / 2,
)
)
place(
left+bottom,
dx: rprt2_pos.at(0),
dy: rprt2_pos.at(1),
rprt
)
}
if stage in (
"theseus",
"theseus-vs-static",
) {
arrow(
stroke: arrow_width + black,
(
app_pos.at(0) + app_size.width / 2,
app_pos.at(1) + arrow_gap,
),
(
app_pos.at(0) + app_size.width / 2,
-arrow_width
),
(
patcher_pos.at(0) + patcher_size.width / 2,
-arrow_width
),
(
patcher_pos.at(0) + patcher_size.width / 2,
patcher_pos.at(1) + arrow_gap
)
)
}
if stage not in (
"static-only",
"static-vs-dyn",
"theseus",
"theseus-no-static",
) {
arrow(
stroke: arrow_width + black,
(
app_pos.at(0) + app_size.width/2,
app_pos.at(1) - app_size.height - arrow_gap,
),
(
app_pos.at(0) + app_size.width/2,
analyser_pos2.at(1) - analyser_size.height / 2,
),
(
analyser_pos2.at(0) - arrow_gap,
analyser_pos2.at(1) - analyser_size.height / 2,
),
)
}
if stage in (
"theseus-vs-static",
) {
place(
bottom+left,
dx: analyser_pos2.at(0),
dy: analyser_pos2.at(1),
analyser
)
place(
left+bottom,
dx: rprt3_pos.at(0),
dy: rprt3_pos.at(1),
rprt
)
arrow(
stroke: arrow_width + black,
(
analyser_pos2.at(0) + analyser_size.width + arrow_gap,
analyser_pos2.at(1) - analyser_size.height / 2,
),
(
rprt3_pos.at(0) - arrow_gap,
rprt3_pos.at(1) - rprt_size.height / 2,
)
)
}
}
)
}
#set page(flipped: true)
#set align(center+horizon)
#dexhunter-outline()
#static-outline()
#theseus-outline()