This file contains hidden or 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 frame(scene, framenumber) | |
| background("grey5") | |
| setline(1.2) | |
| eased = scene.easingfunction(framenumber-scene.framerange.start, 0, 1, scene.framerange.stop-scene.framerange.start) | |
| eased_n = sin(rescale(eased, (0, 1), (0, 2pi))) | |
| theta = eased_n/2 | |
| s = rescale(eased, 0, 1, 0.95, .01) | |
| t = rescale(eased, 0, 1, .01, 0.95) |
This file contains hidden or 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, Combinatorics, Random | |
| mutable struct Ball | |
| id::Int | |
| position::Point | |
| velocity::Point | |
| color::Union{NTuple, Colorant, String} | |
| ballradius::Float64 | |
| end |
This file contains hidden or 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
| # draw pi digits up to Feynman point to give illusion of rounding at 999999 | |
| using Luxor | |
| function pidigits(n) | |
| result = Int[] | |
| k, a::BigInt, b::BigInt, a1::BigInt, b1::BigInt = 2, 4, 1, 12, 4 | |
| while n > 0 | |
| p, q, k = k * k, 2k + 1, k + 1 | |
| a, b, a1, b1 = a1, b1, p * a + q * a1, p * b + q * b1 |
This file contains hidden or 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 | |
| # drawing pi with circles, rather than drawing circles with pi | |
| function perimeterize(s, n) | |
| # center it | |
| te = textextents(s) | |
| move(-te[3]/2, te[4]/2) | |
| textpath(s) | |
| p = pathtopoly()[1] |
This file contains hidden or 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 | |
| chunk(x, n) = [x[i:min(i+n-1,length(x))] for i in 1:n:length(x)] | |
| function frame() | |
| leftmargin = -230 | |
| @png begin | |
| background("white") | |
| pl = box(O, 600, 600, vertices=true) | |
| # data |
This file contains hidden or 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, Luxor, ColorSchemes, Colors | |
| juliacolorscheme = [ | |
| RGB(Luxor.darker_purple...), | |
| RGB(Luxor.darker_red...), | |
| RGB(Luxor.darker_red...), | |
| RGB(Luxor.darker_green...), | |
| RGB(Luxor.darker_green...), | |
| RGB(Luxor.darker_purple...), | |
| ] |
This file contains hidden or 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 drawicon(pos, w) | |
| @layer begin | |
| translate(pos) | |
| squircle(O, w, w, rt=0.3, :clip) | |
| sethue("white") | |
| paint() | |
| sethue("grey20") | |
| setline(15) |
This file contains hidden or 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 | |
| Drawing(1920, 525, "/tmp/splash-img.png") | |
| setblend(blend(boxtopcenter(BoundingBox()), boxbottomcenter(BoundingBox()), | |
| setcolor(.3, .34, .5, 0.7), | |
| setcolor(.1, .1, .15, 0.9))) | |
| paint() | |
| origin() | |
| sethue("grey50") | |
| setline(.25) |
This file contains hidden or 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 main(fname) | |
| weare = ["data scientists", "programmers", "physicists", "statisticians", "ecologists", "web developers", "mathematicians", "economists", "astrophysicists", "machine learning researchers", "HPC developers", "quants", "electrical engineers", "software developers", "bio-informaticists", "economic forecasters", "data engineers", "theoretical biologists", "psychologists", "educators", "insurers", "condensed matter theorists", "research software engineers", "space scientists", "energy forecasters", "geospatial analysts", "botanists", "chemists", "cryptographers", "cyber-security researchers", "algorithmists", "biologists", "natural language experts", "professors", "environmental economists", "flight dynamics engineers", "geophysicists", "materials scientists", "mechanical engineers", "computational mathematicians", "mathematical biologists", "computer vision experts", "quantum particle researchers", "machine learning developers", "whale conservationists", "signal proce |
This file contains hidden or 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
| # static lorenz drawing omitted | |
| function frame(scene, framenumber, lorenzpoints) | |
| background("white") # nontransparent PNG | |
| eased_n = scene.easingfunction(framenumber, 0, 1, scene.framerange.stop) | |
| uptoframe = convert(Int, floor(rescale(eased_n, 0, 1, 1, length(lorenzpoints)))) | |
| origin() | |
| draw(lorenzpoints[1:uptoframe], 350, 50, 750) | |
| end |