Getting pretty close on Section 5
This commit is contained in:
@@ -378,7 +378,7 @@ uuid = "093fc24a-ae57-5d10-9952-331d41423f4d"
|
||||
version = "1.3.5"
|
||||
|
||||
[[LinearAlgebra]]
|
||||
deps = ["Libdl"]
|
||||
deps = ["Libdl", "libblastrampoline_jll"]
|
||||
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
|
||||
|
||||
[[LogExpFunctions]]
|
||||
@@ -477,6 +477,10 @@ git-tree-sha1 = "ba4a8f683303c9082e84afba96f25af3c7fb2436"
|
||||
uuid = "656ef2d0-ae68-5445-9ca0-591084a874a2"
|
||||
version = "0.3.12+1"
|
||||
|
||||
[[OpenBLAS_jll]]
|
||||
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
|
||||
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
|
||||
|
||||
[[OpenSpecFun_jll]]
|
||||
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"]
|
||||
git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1"
|
||||
@@ -535,7 +539,7 @@ deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
|
||||
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
|
||||
|
||||
[[Random]]
|
||||
deps = ["Serialization"]
|
||||
deps = ["SHA", "Serialization"]
|
||||
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
|
||||
|
||||
[[Reexport]]
|
||||
@@ -723,6 +727,10 @@ git-tree-sha1 = "9e7a1e8ca60b742e508a315c17eef5211e7fbfd7"
|
||||
uuid = "700de1a5-db45-46bc-99cf-38207098b444"
|
||||
version = "0.2.1"
|
||||
|
||||
[[libblastrampoline_jll]]
|
||||
deps = ["Artifacts", "Libdl", "OpenBLAS_jll"]
|
||||
uuid = "8e850b90-86db-534c-a0d3-1478176c7d93"
|
||||
|
||||
[[nghttp2_jll]]
|
||||
deps = ["Artifacts", "Libdl"]
|
||||
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"
|
||||
|
||||
20
julia/make_plots.jl
Normal file
20
julia/make_plots.jl
Normal file
@@ -0,0 +1,20 @@
|
||||
using Thesis
|
||||
using PlotlyJS: savefig
|
||||
|
||||
a = ∛(Sun.μ * ( year/2π )^2 )
|
||||
start = [ oe_to_xyz([ a, 0., 0., 0., 0., 0.5 ], Sun.μ); 10_000. ]
|
||||
path = Thesis.prop(zeros(100,3), start, bepi, year)[1]
|
||||
p = Thesis.plot([path],
|
||||
colors=["#0FF"],
|
||||
title="Single LaGuerre-Conway-Propagated Orbit")
|
||||
savefig(p, "LaTeX/fig/laguerre_plot.png")
|
||||
|
||||
t = 5year
|
||||
spiral_sc = Sc("test", 1000., 2000., 0.0005, 50, 0.9)
|
||||
start = [ oe_to_xyz([ 0.7a, 0.05, 0.1, 0., 0., 0.5 ], Sun.μ); 100_000. ]
|
||||
spiral_thrust = spiral(0.2, 100_000, start, spiral_sc, t)
|
||||
spiral_path = Thesis.prop(spiral_thrust, start, spiral_sc, t)[1]
|
||||
p = Thesis.plot([spiral_path],
|
||||
colors=["#0FF"],
|
||||
title="Spiral Orbit")
|
||||
savefig(p, "LaTeX/fig/spiral_plot.png")
|
||||
@@ -76,14 +76,14 @@ Output: a random reasonable orbit
|
||||
"""
|
||||
function gen_orbit(T::Float64, mass::Float64, primary::Body=Sun)
|
||||
μ = primary.μ
|
||||
i = rand(0.0:0.01:0.4999π)
|
||||
inc = rand(0.0:0.01:0.4999π)
|
||||
θ = rand(0.0:0.01:2π)
|
||||
i = 0
|
||||
while true
|
||||
i += 1
|
||||
e = rand(0.0:0.01:0.5)
|
||||
a = ∛(μ * ( T/2π )^2 )
|
||||
a*(1-e) < 1.1primary.r || return [ oe_to_xyz([ a, e, i, 0., 0., θ ], μ); mass ]
|
||||
a*(1-e) < 1.1primary.r || return [ oe_to_xyz([ a, e, inc, 0., 0., θ ], μ); mass ]
|
||||
i < 100 || throw(GenOrbit_Error)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -44,14 +44,14 @@ Generates a layout that works for most plots. Requires a title and a limit.
|
||||
"""
|
||||
function standard_layout(limit::Float64, title::AbstractString)
|
||||
limit *= 1.1
|
||||
Layout(title=title,
|
||||
# width=1400,
|
||||
# height=800,
|
||||
Layout(title=attr(font=attr(color="rgb(250,250,250)"), yanchor="top", y=0.95, text=title),
|
||||
textfont = attr(color="rgb(250,250,250)"),
|
||||
margin=attr(b=20, t=0, l=0, r=0),
|
||||
paper_bgcolor="rgba(5,10,40,1.0)",
|
||||
plot_bgcolor="rgba(100,100,100,0.01)",
|
||||
scene = attr(xaxis = attr(autorange = false,range=[-limit,limit]),
|
||||
yaxis = attr(autorange = false,range=[-limit,limit]),
|
||||
zaxis = attr(autorange = false,range=[-limit,limit]),
|
||||
plot_bgcolor="rgba(200,200,200,0.01)",
|
||||
scene = attr(xaxis = attr(autorange = false,range=[-limit,limit],color="rgb(255,255,255)"),
|
||||
yaxis = attr(autorange = false,range=[-limit,limit],color="rgb(255,255,255)"),
|
||||
zaxis = attr(autorange = false,range=[-limit,limit],color="rgb(255,255,255)"),
|
||||
aspectratio=attr(x=1,y=1,z=1),
|
||||
aspectmode="manual"))
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user