Arc bridges in reality

Arc bridges in reality

yes, if y=sqrt(G^2-R^2); F_g=km^2/R^2; R^2=km^2/G; y=sqrt(G^2-km/g); y=sqrt(m(mg^2-k/g))=sqrt(F^2-ka) Now lets look at the system as string, if the string or bridge is tighten at max, look at where is the force at graph 5N, while function returns 4.4: at average we see the best fn conditions: With love cyborg1/looper/darken: https://hrubos.tech/blogy/content/images/20260803081707-Snímka obrazovky 2026-08-03 o 8.13.35.png

animation arc bridge forces as string

arc bridge

Kód podľa mojich príkazov vypľul GPT AI:

using Pkg

Pkg.add(["CairoMakie", "FFMPEG"])

using CairoMakie

# ============================================================
# PARAMETRE
# ============================================================

k = 10.0
a = 2.0

Fmin = 2.0
Fmax = 8.0

duration = 12.0
fps = 30

Fcritical = sqrt(k / a)

println("Kritická sila = ", Fcritical)

# ============================================================
# FUNKCIA
# ============================================================

function spring_y(F, k, a)

    q = F^2 - k / a

    q < 0 && return nothing

    return sqrt(q)
end

# ============================================================
# FUNKCIA - TVAR PRUŽINY
# ============================================================

function make_spring(y)

    top = 9.2

    # maximálna hodnota y, ktorú vizualizujeme
    ymax = sqrt(Fmax^2 - k/a)

    # fyzická dĺžka pružiny
    min_length = 2.0
    max_length = 7.0

    fraction = clamp(y / ymax, 0.0, 1.0)

    length =
        min_length +
        fraction * (max_length - min_length)

    bottom = top - length

    amplitude = 0.65
    coils = 14
    n = 300

    pts = Point2f[]

    for i in 0:n

        t = i / n

        yy = top + t * (bottom - top)

        xx =
            amplitude *
            sin(2π * coils * t)

        push!(
            pts,
            Point2f(xx, yy)
        )
    end

    return pts
end

# ============================================================
# ZÁVAŽIE
# ============================================================

function make_mass(y)

    top = 9.2

    ymax = sqrt(Fmax^2 - k/a)

    min_length = 2.0
    max_length = 7.0

    fraction = clamp(y / ymax, 0.0, 1.0)

    length =
        min_length +
        fraction * (max_length - min_length)

    bottom = top - length

    w = 1.2
    h = 0.8

    return Point2f[
        Point2f(-w/2, bottom),
        Point2f( w/2, bottom),
        Point2f( w/2, bottom-h),
        Point2f(-w/2, bottom-h)
    ]
end

# ============================================================
# FIGURE
# ============================================================

fig = Figure(
    size = (1400, 800),
    backgroundcolor = :white
)

# ============================================================
# ĽAVÝ GRAF
# ============================================================

ax = Axis(
    fig[1:3, 1],
    xlabel = "F",
    ylabel = "y",
    title = "y = √(F² − k/a)",
    titlesize = 24
)

Fplot = range(
    Fcritical,
    Fmax,
    length = 500
)

Yplot = [
    spring_y(F, k, a)
    for F in Fplot
]

lines!(
    ax,
    Fplot,
    Yplot,
    linewidth = 4
)

# kritická sila
vlines!(
    ax,
    [Fcritical],
    linestyle = :dash,
    linewidth = 3
)

# pohybujúci sa bod
graph_point = Observable(
    Point2f(Fcritical, 0)
)

scatter!(
    ax,
    graph_point,
    markersize = 20
)

# ============================================================
# PRAVÁ STRANA
# ============================================================

ax2 = Axis(
    fig[1:3, 2],
    title = "Pružina",
    titlesize = 24
)

xlims!(ax2, -2, 2)
ylims!(ax2, -1, 10)

hidedecorations!(ax2)
hidespines!(ax2)

# ============================================================
# HORNÁ KONŠTRUKCIA
# ============================================================

lines!(
    ax2,
    [-1.2, 1.2],
    [9.5, 9.5],
    linewidth = 12
)

# ============================================================
# OBSERVABLE PRUŽINA
# ============================================================

spring_points = Observable(
    make_spring(0.0)
)

lines!(
    ax2,
    spring_points,
    linewidth = 6
)

# ============================================================
# OBSERVABLE ZÁVAŽIE
# ============================================================

mass_points = Observable(
    make_mass(0.0)
)

poly!(
    ax2,
    mass_points
)

# ============================================================
# INFORMAČNÝ TEXT
# ============================================================

info = Observable(
    "Príprava simulácie..."
)

Label(
    fig[4, 1:2],
    info,
    fontsize = 22,
    halign = :center
)

# ============================================================
# ANIMÁCIA
# ============================================================

record(
    fig,
    "pruzina_simulacia.mp4",
    1:round(Int, duration * fps);
    framerate = fps
) do frame

    t = (frame - 1) / fps

    # -----------------------------------------
    # Sínusové menenie sily
    # -----------------------------------------

    F =
        (Fmin + Fmax) / 2 +
        (Fmax - Fmin) / 2 *
        sin(2π * t / duration)

    # -----------------------------------------
    # Výpočet
    # -----------------------------------------

    y = spring_y(F, k, a)

    if y === nothing

        # -------------------------------------
        # MIMO DEFINIČNÉHO OBORU
        # -------------------------------------

        graph_point[] =
            Point2f(F, 0)

        # necháme pružinu v minimálnej polohe
        spring_points[] =
            make_spring(0.0)

        mass_points[] =
            make_mass(0.0)

        info[] =
            "F = $(round(F, digits=3))    " *
            "y = NEREÁLNE    " *
            "F² − k/a < 0"

    else

        # -------------------------------------
        # GRAF
        # -------------------------------------

        graph_point[] =
            Point2f(F, y)

        # -------------------------------------
        # PRUŽINA
        # -------------------------------------

        spring_points[] =
            make_spring(y)

        # -------------------------------------
        # ZÁVAŽIE
        # -------------------------------------

        mass_points[] =
            make_mass(y)

        # -------------------------------------
        # TEXT
        # -------------------------------------

        info[] =
            "F = $(round(F, digits=3))    " *
            "k = $(k)    " *
            "a = $(a)    " *
            "y = $(round(y, digits=3))    " *
            "Fkrit = $(round(Fcritical, digits=3))"
    end
end

println()
println("======================================")
println("HOTOVO")
println("======================================")
println("MP4: pruzina_simulacia.mp4")
println("Kritická sila: ", Fcritical)
println("======================================")


Author: AarNoma

The first Slovak cyborg 1 system

Comments “Arc bridges in reality”