This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Thebes | |
using Luxor | |
using Rotations | |
using Colors | |
julia_colors = [Luxor.julia_red, | |
Luxor.julia_purple, | |
Luxor.julia_blue, | |
Luxor.julia_green | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Colors, Luxor, Dates, JSON, DataFrames, Downloads | |
theyear = 2024 | |
data_url = "https://svs.gsfc.nasa.gov/vis/a000000/a005100/a005187/mooninfo_2024.json" | |
if !isfile(string(@__DIR__, "/nasa-moon-$(theyear)-data.json")) | |
Downloads.download(data_url, "nasa-moon-2024-data.json") | |
end | |
function getdata() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Luxor, Colors | |
function drawtape(spoolradius, separation, e) | |
@layer begin | |
# draw the 'tape' threading between the spools | |
# (e is normalized 0 to 1 for animation) | |
sr = spoolradius + 10 # outside spool, not realistic | |
spoolcenters = ngon(O, separation, 3, vertices = true) | |
top_point = Point(spoolcenters[2].x, spoolcenters[2].y - spoolradius - 10) | |
# top left spool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Luxor, Colors | |
# julia colors as extracted from the SVG | |
tidier_lighter_colors = [ | |
RGB(202 / 256, 60 / 256, 50 / 256), # lighter red | |
RGB(57 / 256, 151 / 256, 70 / 256), # lighter green | |
RGB(146 / 256, 89 / 256, 163 / 256), # lighter purple | |
RGB(76 / 256, 100 / 256, 176 / 256), # lighter blue | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Luxor, Colors | |
function draw_logo(color=colorant"black") | |
box(O, 580, 500, 40, :clip) | |
mountain = [ | |
Point(-300, 250), | |
Point(-300, 200), | |
Point(-64, -70), | |
Point(40, 40), | |
Point(105, -5), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Luxor, Colors | |
function blade(θ, n) | |
@layer begin | |
rotate(θ) | |
move(Point(46, 3.693)) | |
curve(Point(147.98, -101.378), Point(366.389, 35.292), Point(240, 145)) | |
curve(Point(43, 316), Point(107, 16), Point(46, 3.693)) | |
sethue(Colors.JULIA_LOGO_COLORS[mod1(n - 1, end)]) | |
fillpath() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Luxor | |
function main() | |
Drawing(500, 500, "/tmp/juliaperformance.svg") | |
origin() | |
squircle(O, 245, 245, :clip, rt=0.3) | |
sethue("ivory") | |
paint() | |
@layer begin | |
translate(0, 200) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Luxor, Thebes, MathTeXEngine | |
function frame(scene, framenumber) | |
background("white") | |
sethue("black") | |
fontsize(15) | |
eased_n = scene.easingfunction(framenumber, 0, 1, scene.framerange.stop) | |
helloworld() | |
eyepoint(200, 200, 100) | |
setline(0.5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### A Pluto.jl notebook ### | |
# v0.12.15 | |
using Markdown | |
using InteractiveUtils | |
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error). | |
macro bind(def, element) | |
quote | |
local el = $(esc(element)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Luxor, DynamicalSystems, Colors | |
function frame(scene, framenumber, datas) | |
background("black") | |
# datas contains two datasets | |
# each dataset is an array of sarrays of 4 floats | |
d1, d2 = datas | |
offset = π / 2 | |
L = 200 | |
disksize = 15 |
NewerOlder