152 lines
4.5 KiB
Typst
152 lines
4.5 KiB
Typst
#import "@preview/cetz:0.3.3" //Grafiken
|
|
|
|
#let abb1() = {
|
|
|
|
cetz.canvas(length: 3cm, {
|
|
import cetz.draw: *
|
|
|
|
set-style(
|
|
mark: (fill: black, scale: 2),
|
|
stroke: (thickness: 0.4pt, cap: "round"),
|
|
angle: (
|
|
radius: 0.3,
|
|
label-radius: .22,
|
|
fill: green.lighten(80%),
|
|
stroke: (paint: green.darken(50%))
|
|
),
|
|
content: (padding: 1pt)
|
|
)
|
|
|
|
grid((-.25, -.25), (2, 2 ), step: 0.5, stroke: gray + 0.2pt)
|
|
|
|
|
|
|
|
line((-.25, 0), (1.85, 0), mark: (end: "stealth"))
|
|
content((), $ x $, anchor: "west")
|
|
line((0, -.25), (0, 1.85), mark: (end: "stealth"))
|
|
content((), $ y $, anchor: "south")
|
|
|
|
for (x, ct) in ((0, $ 0 $), (0.5, $ 1 $), (1, $ 2 $), (1.5, $ 3 $), (1.25, $a_1$)) {
|
|
line((x, 3pt), (x, -3pt))
|
|
content((), anchor: "north", ct)
|
|
}
|
|
|
|
for (y, ct) in ((0.5, $ 1 $), (1, $ 2 $), (1.5, $ 3 $), (1.25, $a_2$)) {
|
|
line((3pt, y), (-3pt, y))
|
|
content((), anchor: "east", ct)
|
|
}
|
|
|
|
|
|
|
|
//line((0,0), (1.25, 1.25),name: "vec",mark: (end: "stealth", fill: green.darken(30%)),
|
|
//stroke: (paint: green.darken(30%), thickness: 1.25pt))
|
|
|
|
line((0,0), (1.25, 1.25),name: "vec",stroke: (paint: red.darken(30%), thickness: 1.25pt))
|
|
|
|
|
|
line((1.25,0), (1.25, 1.25), stroke: (dash: "dashed", paint: blue.darken(30%), thickness: 0.75pt))
|
|
|
|
line((0,1.25), (1.25, 1.25), stroke: (dash: "dashed", paint: blue.darken(30%), thickness: 0.75pt))
|
|
|
|
circle((1.25,1.25), radius: 0.025, fill: green.darken(30%), stroke: (paint: green.darken(30%), thickness: 1.25pt), name: "punkt")
|
|
content("punkt.end", anchor: "south-west", padding: (left: 3mm, bottom: 2mm), text(green.darken(30%))[Punkt $(a_1, a_2)$])})
|
|
}
|
|
|
|
#let abb2() = {
|
|
cetz.canvas(length: 3cm, {
|
|
import cetz.draw: *
|
|
|
|
set-style(
|
|
mark: (fill: black, scale: 2),
|
|
stroke: (thickness: 0.4pt, cap: "round"),
|
|
angle: (
|
|
radius: 0.3,
|
|
label-radius: .22,
|
|
fill: green.lighten(80%),
|
|
stroke: (paint: green.darken(50%))
|
|
),
|
|
content: (padding: 1pt)
|
|
)
|
|
|
|
grid((-.25, -.25), (2, 2 ), step: 0.5, stroke: gray + 0.2pt)
|
|
|
|
|
|
|
|
line((-.25, 0), (1.85, 0), mark: (end: "stealth"))
|
|
content((), $ x $, anchor: "west")
|
|
line((0, -.25), (0, 1.85), mark: (end: "stealth"))
|
|
content((), $ y $, anchor: "south")
|
|
|
|
for (x, ct) in ((0, $ 0 $), (0.5, $ 1 $), (1, $ 2 $), (1.5, $ 3 $), (1.25, $a_1$)) {
|
|
line((x, 3pt), (x, -3pt))
|
|
content((), anchor: "north", ct)
|
|
}
|
|
|
|
for (y, ct) in ((0.5, $ 1 $), (1, $ 2 $), (1.5, $ 3 $), (1.25, $a_2$)) {
|
|
line((3pt, y), (-3pt, y))
|
|
content((), anchor: "east", ct)
|
|
}
|
|
|
|
|
|
line((0,0), (1.25, 1.25),name: "vec",stroke: (paint: red.darken(30%), thickness: 1.25pt))
|
|
|
|
|
|
line((1.25,0), (1.25, 1.25), stroke: (dash: "dashed", paint: blue.darken(30%), thickness: 0.75pt))
|
|
|
|
line((0,1.25), (1.25, 1.25), stroke: (dash: "dashed", paint: blue.darken(30%), thickness: 0.75pt))
|
|
|
|
line((0,0), (1.25, 1.25),name: "vec",mark: (end: "stealth", fill: green.darken(30%)), stroke: (paint: green.darken(30%), thickness: 1.25pt))
|
|
|
|
content("vec.end", anchor: "north-west", padding: (left: 3mm, top: -2mm), text(green.darken(30%))[Vektor $arrow(a)$])
|
|
})
|
|
|
|
}
|
|
|
|
#let abb3() = {
|
|
cetz.canvas(length: 37mm,
|
|
{
|
|
import cetz.draw: *
|
|
|
|
set-style(
|
|
mark: (fill: black, scale: 2),
|
|
stroke: (thickness: 0.4pt, cap: "round"),
|
|
angle: (
|
|
radius: 0.3,
|
|
label-radius: .22,
|
|
fill: green.lighten(80%),
|
|
stroke: (paint: green.darken(50%))
|
|
),
|
|
content: (padding: 1pt)
|
|
)
|
|
|
|
grid((-.25, -.25), (2.5 , 2 ), step: 0.5, stroke: gray + 0.2pt)
|
|
|
|
line((-.25, 0), (2.25, 0), mark: (end: "stealth"))
|
|
content((), $ x $, anchor: "west")
|
|
line((0, -.25), (0, 1.85), mark: (end: "stealth"))
|
|
content((), $ y $, anchor: "south")
|
|
|
|
for (x, ct) in ((0.25, $ 1 $), (0.5, $ 2$), (0.75, $ a_1 $),(1, $b_1$), (1.25,$5$), (1.5, $6$),(1.75, $a_1+b_1$)) {
|
|
line((x, 3pt), (x, -3pt))
|
|
content((), anchor: "north", ct)
|
|
}
|
|
|
|
for (y, ct) in ((0.25, $ 1 $), (0.5, $ a_2 $), (.75, $ 3 $), (1., $b_2$),(1.25,$5$), (1.5, $6$)) {
|
|
line((3pt, y), (-3pt, y))
|
|
content((), anchor: "east", ct)
|
|
}
|
|
|
|
line((0,0), (0.75, .5),name: "veca",mark: (end: "stealth", fill: blue.darken(30%)), stroke: (paint: blue.darken(30%), thickness: 0.75pt))
|
|
|
|
content("veca.100%", anchor: "west", padding: (left:1mm, bottom:-5mm),text(blue.darken(30%))[$arrow(a)$])
|
|
|
|
line((0,0), (1, 1),name: "vecb",mark: (end: "stealth", fill: red.darken(30%)), stroke: (paint: red.darken(30%), thickness: 0.75pt))
|
|
|
|
content("vecb.80%", anchor: "east", padding: (left:0mm, bottom:5mm),text(red.darken(30%))[$arrow(b)$])
|
|
|
|
//
|
|
|
|
//line((0,0), (1.5, 1),name: "vecb",mark: (end: "stealth", fill: red), stroke: (paint: red, thickness: 0.75pt))
|
|
|
|
|
|
})} |