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 umbrella(pos; | |
colors = Colors.JULIA_LOGO_COLORS, | |
scalefactor = 1) | |
pink = parse(Colorant, "#FFAFC8") | |
lblue = parse(Colorant, "#74D7EE") | |
brown = parse(Colorant, "#613915") | |
@layer begin |
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 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, 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
For version 3.17: | |
``` | |
julia> @time_imports using ColorSchemes | |
72.0 ms FixedPointNumbers | |
0.2 ms Reexport | |
75.7 ms ColorTypes 7.36% compilation time | |
223.3 ms Colors | |
12.5 ms ColorSchemes | |
``` |
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 | |
helsinkilogo = Path([ | |
PathMove(Point(4.245, 57.972)), | |
PathCurve(Point(9.725, 52.512), Point(17.013, 49.505), Point(24.763, 49.505)), | |
PathLine(Point(102.34, 49.505)), | |
PathCurve(Point(120.348, 49.505), Point(135, 35.014), Point(135, 17.203)), | |
PathLine(Point(135, -61.799)), | |
PathLine(Point(-134.588, -61.799)), | |
PathLine(Point(-134.588, 17.203)), |
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, Images, Luxor, Statistics | |
# tile of an image | |
struct ImageTile | |
image::Array | |
imagewidth::Real | |
imageheight::Real | |
tilewidth::Real | |
tileheight::Real | |
centerpos::Point |
NewerOlder