Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve mean, eccentric, and true anomaly descriptions #16

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 48 additions & 53 deletions drawing-scripts/apse-line.ipynb

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions drawing-scripts/elliptical-orbit-definitions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"\n",
" offset /= 5\n",
" end\n",
" \n",
"\n",
" @layer begin\n",
" setcolor(252/255, 141/255, 98/255, 1.0)\n",
" circle(semimajor, 0, pointradius/2, :fill)\n",
Expand Down Expand Up @@ -162,15 +162,15 @@
],
"metadata": {
"kernelspec": {
"display_name": "Julia 1.6.3",
"display_name": "Julia 1.10.2",
"language": "julia",
"name": "julia-1.6"
"name": "julia-1.10"
},
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.6.3"
"version": "1.10.2"
}
},
"nbformat": 4,
Expand Down
175 changes: 175 additions & 0 deletions drawing-scripts/time-since-periapsis-area.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "f3e1ca6c-23e3-4764-b1fb-8d970d310112",
"metadata": {},
"outputs": [],
"source": [
"using Luxor, LightXML"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "d2a3ba7b-3e72-4301-aba6-b555ad30cfc7",
"metadata": {},
"outputs": [],
"source": [
"pointradius = 4\n",
"linewidth = 2;"
]
},
{
"cell_type": "code",
"execution_count": 77,
"id": "ce4c8295-bd78-4022-9d00-35ed0851dfad",
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n",
"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"500\" height=\"400\" viewBox=\"0 0 500 400\">\n",
"<path fill=\"none\" stroke-width=\"2\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\" stroke=\"rgb(0%, 0%, 0%)\" stroke-opacity=\"1\" stroke-miterlimit=\"10\" d=\"M 0 400 L 0 0 L 500 0 L 500 400 Z M 0 400 \"/>\n",
"<path fill=\"none\" stroke-width=\"1\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\" stroke=\"rgb(0%, 0%, 0%)\" stroke-opacity=\"1\" stroke-dasharray=\"4 4\" stroke-miterlimit=\"10\" d=\"M 500 325 L 0 325 \"/>\n",
"<path fill-rule=\"nonzero\" fill=\"rgb(85.490196%, 64.705882%, 12.54902%)\" fill-opacity=\"0.8\" d=\"M 183.699219 145.925781 L 192.707031 147.644531 L 201.621094 149.542969 L 210.4375 151.613281 L 219.144531 153.855469 L 227.734375 156.265625 L 236.195312 158.84375 L 244.527344 161.585938 L 252.710938 164.488281 L 260.746094 167.550781 L 268.625 170.765625 L 276.335938 174.132812 L 283.871094 177.652344 L 291.226562 181.3125 L 298.394531 185.117188 L 305.363281 189.0625 L 312.132812 193.136719 L 318.691406 197.34375 L 325.035156 201.679688 L 331.152344 206.132812 L 337.046875 210.703125 L 342.707031 215.390625 L 348.125 220.183594 L 353.296875 225.078125 L 358.222656 230.074219 L 362.890625 235.164062 L 367.300781 240.339844 L 371.449219 245.601562 L 375.328125 250.941406 L 378.933594 256.351562 L 382.265625 261.832031 L 385.316406 267.375 L 388.089844 272.972656 L 390.574219 278.625 L 392.773438 284.320312 L 394.6875 290.058594 L 396.304688 295.828125 L 397.632812 301.628906 L 398.667969 307.449219 L 399.40625 313.289062 L 399.851562 319.140625 L 400 325 C 400 191.550781 311.847656 74.144531 183.699219 36.910156 \"/>\n",
"<path fill-rule=\"nonzero\" fill=\"rgb(57.647059%, 43.921569%, 85.882353%)\" fill-opacity=\"0.2\" d=\"M 100 325 L 183.699219 36.910156 L 335 325 L 100 325 \"/>\n",
"<path fill-rule=\"nonzero\" fill=\"rgb(100%, 89.411765%, 88.235294%)\" fill-opacity=\"0.8\" d=\"M 183.699219 145.925781 L 192.707031 147.644531 L 201.621094 149.542969 L 210.4375 151.613281 L 219.144531 153.855469 L 227.734375 156.265625 L 236.195312 158.84375 L 244.527344 161.585938 L 252.710938 164.488281 L 260.746094 167.550781 L 268.625 170.765625 L 276.335938 174.132812 L 283.871094 177.652344 L 291.226562 181.3125 L 298.394531 185.117188 L 305.363281 189.0625 L 312.132812 193.136719 L 318.691406 197.34375 L 325.035156 201.679688 L 331.152344 206.132812 L 337.046875 210.703125 L 342.707031 215.390625 L 348.125 220.183594 L 353.296875 225.078125 L 358.222656 230.074219 L 362.890625 235.164062 L 367.300781 240.339844 L 371.449219 245.601562 L 375.328125 250.941406 L 378.933594 256.351562 L 382.265625 261.832031 L 385.316406 267.375 L 388.089844 272.972656 L 390.574219 278.625 L 392.773438 284.320312 L 394.6875 290.058594 L 396.304688 295.828125 L 397.632812 301.628906 L 398.667969 307.449219 L 399.40625 313.289062 L 399.851562 319.140625 L 400 325 L 335 325 L 183.699219 145.925781 \"/>\n",
"<path fill-rule=\"nonzero\" fill=\"rgb(80%, 80%, 80%)\" fill-opacity=\"1\" d=\"M 339 325 C 339 327.210938 337.210938 329 335 329 C 332.789062 329 331 327.210938 331 325 C 331 322.789062 332.789062 321 335 321 C 337.210938 321 339 322.789062 339 325 Z M 339 325 \"/>\n",
"<path fill=\"none\" stroke-width=\"2\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\" stroke=\"rgb(80%, 80%, 80%)\" stroke-opacity=\"1\" stroke-miterlimit=\"10\" d=\"M 400 325 C 400 490.683594 265.683594 625 100 625 C -65.683594 625 -200 490.683594 -200 325 C -200 159.316406 -65.683594 25 100 25 C 265.683594 25 400 159.316406 400 325 Z M 400 325 \"/>\n",
"<path fill-rule=\"nonzero\" fill=\"rgb(80%, 80%, 80%)\" fill-opacity=\"1\" d=\"M 104 325 C 104 327.210938 102.210938 329 100 329 C 97.789062 329 96 327.210938 96 325 C 96 322.789062 97.789062 321 100 321 C 102.210938 321 104 322.789062 104 325 Z M 104 325 \"/>\n",
"<path fill=\"none\" stroke-width=\"2\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\" stroke=\"rgb(55.294118%, 62.745098%, 79.607843%)\" stroke-opacity=\"1\" stroke-miterlimit=\"10\" d=\"M -200 325 L -199.851562 319.140625 L -199.40625 313.289062 L -198.667969 307.449219 L -197.632812 301.628906 L -196.304688 295.828125 L -194.6875 290.058594 L -192.773438 284.320312 L -190.574219 278.625 L -188.089844 272.972656 L -185.316406 267.375 L -182.265625 261.832031 L -178.933594 256.351562 L -175.328125 250.941406 L -171.449219 245.601562 L -167.300781 240.339844 L -162.890625 235.164062 L -158.222656 230.074219 L -153.296875 225.078125 L -148.125 220.183594 L -142.707031 215.390625 L -137.046875 210.703125 L -131.152344 206.132812 L -125.035156 201.679688 L -118.691406 197.34375 L -112.132812 193.136719 L -105.363281 189.0625 L -98.394531 185.117188 L -91.226562 181.3125 L -83.871094 177.652344 L -76.335938 174.132812 L -68.625 170.765625 L -60.746094 167.550781 L -52.710938 164.488281 L -44.527344 161.585938 L -36.195312 158.84375 L -27.734375 156.265625 L -19.144531 153.855469 L -10.4375 151.613281 L -1.621094 149.542969 L 7.292969 147.644531 L 16.300781 145.925781 L 25.394531 144.378906 L 34.558594 143.011719 L 43.785156 141.824219 L 53.070312 140.816406 L 62.398438 139.988281 L 71.765625 139.347656 L 81.164062 138.886719 L 90.578125 138.613281 L 100 138.519531 L 109.421875 138.613281 L 118.835938 138.886719 L 128.234375 139.347656 L 137.601562 139.988281 L 146.929688 140.816406 L 156.214844 141.824219 L 165.441406 143.011719 L 174.605469 144.378906 L 183.699219 145.925781 L 192.707031 147.644531 L 201.621094 149.542969 L 210.4375 151.613281 L 219.144531 153.855469 L 227.734375 156.265625 L 236.195312 158.84375 L 244.527344 161.585938 L 252.710938 164.488281 L 260.746094 167.550781 L 268.625 170.765625 L 276.335938 174.132812 L 283.871094 177.652344 L 291.226562 181.3125 L 298.394531 185.117188 L 305.363281 189.0625 L 312.132812 193.136719 L 318.691406 197.34375 L 325.035156 201.679688 L 331.152344 206.132812 L 337.046875 210.703125 L 342.707031 215.390625 L 348.125 220.183594 L 353.296875 225.078125 L 358.222656 230.074219 L 362.890625 235.164062 L 367.300781 240.339844 L 371.449219 245.601562 L 375.328125 250.941406 L 378.933594 256.351562 L 382.265625 261.832031 L 385.316406 267.375 L 388.089844 272.972656 L 390.574219 278.625 L 392.773438 284.320312 L 394.6875 290.058594 L 396.304688 295.828125 L 397.632812 301.628906 L 398.667969 307.449219 L 399.40625 313.289062 L 399.851562 319.140625 L 400 325 L 399.851562 330.859375 L 399.40625 336.710938 L 398.667969 342.550781 L 397.632812 348.371094 L 396.304688 354.171875 L 394.6875 359.941406 L 392.773438 365.679688 L 390.574219 371.375 L 388.089844 377.027344 L 385.316406 382.625 L 382.265625 388.167969 L 378.933594 393.648438 L 375.328125 399.058594 L 371.449219 404.398438 L 367.300781 409.660156 L 362.890625 414.835938 L 358.222656 419.925781 L 353.296875 424.921875 L 348.125 429.816406 L 342.707031 434.609375 L 337.046875 439.296875 L 331.152344 443.867188 L 325.035156 448.320312 L 318.691406 452.65625 L 312.132812 456.863281 L 305.363281 460.9375 L 298.394531 464.882812 L 291.226562 468.6875 L 283.871094 472.347656 L 276.335938 475.867188 L 268.625 479.234375 L 260.746094 482.449219 L 252.710938 485.511719 L 244.527344 488.414062 L 236.195312 491.15625 L 227.734375 493.734375 L 219.144531 496.144531 L 210.4375 498.386719 L 201.621094 500.457031 L 192.707031 502.355469 L 183.699219 504.074219 L 174.605469 505.621094 L 165.441406 506.988281 L 156.214844 508.175781 L 146.929688 509.183594 L 137.601562 510.011719 L 128.234375 510.652344 L 118.835938 511.113281 L 109.421875 511.386719 L 100 511.480469 L 90.578125 511.386719 L 81.164062 511.113281 L 71.765625 510.652344 L 62.398438 510.011719 L 53.070312 509.183594 L 43.785156 508.175781 L 34.558594 506.988281 L 25.394531 505.621094 L 16.300781 504.074219 L 7.292969 502.355469 L -1.621094 500.457031 L -10.4375 498.386719 L -19.144531 496.144531 L -27.734375 493.734375 L -36.195312 491.15625 L -44.527344 488.414062 L -52.710938 485.511719 L -60.746094 482.449219 L -68.625 479.234375 L -76.335938 475.867188 L -83.871094 472.347656 L -91.226562 468.6875 L -98.394531 464.882812 L -105.363281 460.9375 L -112.132812 456.863281 L -118.691406 452.65625 L -125.035156 448.320312 L -131.152344 443.867188 L -137.046875 439.296875 L -142.707031 434.609375 L -148.125 429.816406 L -153.296875 424.921875 L -158.222656 419.925781 L -162.890625 414.835938 L -167.300781 409.660156 L -171.449219 404.398438 L -175.328125 399.058594 L -178.933594 393.648438 L -182.265625 388.167969 L -185.316406 382.625 L -188.089844 377.027344 L -190.574219 371.375 L -192.773438 365.679688 L -194.6875 359.941406 L -196.304688 354.171875 L -197.632812 348.371094 L -198.667969 342.550781 L -199.40625 336.710938 L -199.851562 330.859375 \"/>\n",
"<path fill=\"none\" stroke-width=\"1\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\" stroke=\"rgb(0%, 0%, 0%)\" stroke-opacity=\"1\" stroke-miterlimit=\"10\" d=\"M 335 325 L 183.699219 145.925781 \"/>\n",
"<path fill=\"none\" stroke-width=\"1\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\" stroke=\"rgb(0%, 0%, 0%)\" stroke-opacity=\"1\" stroke-miterlimit=\"10\" d=\"M 395 325 C 395 303.308594 383.289062 283.304688 364.375 272.683594 C 345.460938 262.0625 322.285156 262.480469 303.765625 273.773438 \"/>\n",
"<path fill-rule=\"nonzero\" fill=\"rgb(0%, 0%, 0%)\" fill-opacity=\"1\" d=\"M 306.007812 276.871094 L 296.277344 279.167969 L 301.535156 270.660156 \"/>\n",
"<path fill=\"none\" stroke-width=\"1\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\" stroke=\"rgb(0%, 0%, 0%)\" stroke-opacity=\"1\" stroke-miterlimit=\"10\" d=\"M 150 325 C 150 306.132812 139.378906 288.871094 122.535156 280.367188 \"/>\n",
"<path fill-rule=\"nonzero\" fill=\"rgb(0%, 0%, 0%)\" fill-opacity=\"1\" d=\"M 121.144531 283.929688 L 113.949219 276.984375 L 123.949219 276.808594 \"/>\n",
"<path fill=\"none\" stroke-width=\"1\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\" stroke=\"rgb(0%, 0%, 0%)\" stroke-opacity=\"1\" stroke-miterlimit=\"10\" d=\"M 183.699219 325 L 183.699219 36.910156 \"/>\n",
"<path fill=\"none\" stroke-width=\"1\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\" stroke=\"rgb(0%, 0%, 0%)\" stroke-opacity=\"1\" stroke-miterlimit=\"10\" d=\"M 100 325 L 183.699219 36.910156 \"/>\n",
"</svg>\n"
],
"text/plain": []
},
"execution_count": 77,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"drawing_height = 400\n",
"drawing_width = 500\n",
"Drawing(drawing_width, drawing_height, :svg)\n",
"box(O, Point(drawing_width, drawing_height), :stroke)\n",
"# bbox = BoundingBox(;centered=false)\n",
"x_axis_height = 13/16*drawing_height\n",
"origin(drawing_width/2, x_axis_height)\n",
"\n",
"@layer begin\n",
" setdash(\"dash\")\n",
" setline(linewidth/2)\n",
" rule(O)\n",
"end\n",
"\n",
"origin(100, x_axis_height)\n",
"semimajor = 300\n",
"periapsis = Point(semimajor, 0)\n",
"r_p = 65\n",
"m1 = Point(semimajor - r_p, 0)\n",
"e = 1 - r_p/semimajor\n",
"semiminor = -semimajor * sqrt(1 - e^2)\n",
"epoly = ellipse(m1, -m1, 2semimajor, vertices=true)\n",
"B = epoly[60]\n",
"angle = slope(m1, B)\n",
"circle_point = B * Point(1, -semimajor/semiminor)\n",
"angle_E = slope(O, circle_point)\n",
"\n",
"@layer begin\n",
" setcolor(sethue(\"goldenrod\")..., 0.8)\n",
" move(periapsis)\n",
" poly(epoly[60:101])\n",
" carc(O, semimajor, 0, angle_E)\n",
" fillpath()\n",
"end\n",
"@layer begin\n",
" setcolor(sethue(\"mediumpurple\")..., 0.2)\n",
" move(O)\n",
" line(circle_point)\n",
" line(m1)\n",
" line(O)\n",
" fillpath()\n",
"end\n",
"@layer begin\n",
" setcolor(sethue(\"mistyrose\")..., 0.8)\n",
" move(epoly[60])\n",
" poly(epoly[60:101])\n",
" line(m1)\n",
" line(epoly[60])\n",
" fillpath()\n",
"end\n",
"\n",
"@layer begin\n",
" setcolor(\"gray80\")\n",
" circle(m1, pointradius, :fill)\n",
" circle(O, semimajor, :stroke)\n",
" circle(O, pointradius, :fill)\n",
"end\n",
"@layer begin\n",
" setcolor(141/255, 160/255, 203/255, 1.0)\n",
" poly(epoly, :stroke)\n",
"end\n",
"@layer begin\n",
" setline(linewidth/2)\n",
" line(m1, B, :stroke)\n",
" arrow(m1, semimajor/5, 0, angle, clockwise=false)\n",
" arrow(O, 50, 0, angle_E, clockwise=false)\n",
" line(Point(B.x, 0), circle_point, :stroke)\n",
" line(O, circle_point, :stroke)\n",
" # line(m1, circle_point, :stroke)\n",
"end\n",
"\n",
"top_left_corner = getworldposition(Point(0, 0), centered=false)\n",
"finish()\n",
"preview()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "48a2242c-c291-4e13-bc40-bccc228ce5b4",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "ac93eb1a-1e34-4db4-b612-2623af426e7c",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Julia 1.10.2",
"language": "julia",
"name": "julia-1.10"
},
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.10.2"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading