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
| ### 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 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 meshlogo(fname) | |
| Drawing(600, 600, fname) | |
| origin() | |
| # background | |
| squircle(O, 285, 285, :clip, rt=0.2) | |
| sethue("slateblue4") | |
| paint() |
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, ColorSchemes | |
| """ | |
| draw a box with noisy top edge and straight sides | |
| """ | |
| function layer(leftminheight, rightminheight, noisefrequency; | |
| detail=1, | |
| persistence=0) | |
| bottomleft, topleft, topright, bottomright = box(BoundingBox(), vertices=true) | |
| ip1 = between(bottomleft, topleft, leftminheight) |
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(nrows, ncols, startpattern; | |
| firstcolor = "rebeccapurple", | |
| secondcolor = "darkorange", | |
| backgroundcolor = "black", | |
| backgrounddotcolor = "grey15", | |
| highlightcolor = "white") | |
| lw = (500/ncols) - 20 | |
| r_pattern = [ |
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, Thebes, Zalgo | |
| leafverts = convert.(Point3D, Point[Point(-22.25390625, 44.8359375), Point(-42.9765625, 26.78515625), Point(-43.40625, 26.03125), Point(-35.67578125, 21.640625), Point(-35.66015625, 21.33984375), Point(-50.12109375, 7.46875), Point(-52.17578125, 4.1328125), Point(-47.66796875, 1.4140625), Point(-47.66015625, 1.17578125), Point(-61.1015625, -27.94140625), Point(-60.84375, -29.23828125), Point(-35.09375, -24.734375), Point(-34.35546875, -25.7109375), Point(-21.59375, -13.56640625), Point(-21.11328125, -13.94921875), Point(-22.65625, -40.26953125), Point(-22.44921875, -40.9609375), Point(-1.359375, -62.5703125), Point(-0.55078125, -62.203125), Point(5.35546875, -82.87109375), Point(5.80859375, -82.890625), Point(10.83203125, -62.71484375), Point(10.69921875, -61.34375), Point(29.7734375, -42.10546875), Point(30.01171875, -41.58203125), Point(24.234375, -13.328125), Point(24.4140625, -13.02734375), Point(36.2734375, -21.5625), Point(37.09375, -21.87109375), Point(57.6875, -23.015625), |
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, MiniFB, Colors | |
| mutable struct Guilloche | |
| f1::Float64 | |
| f2::Float64 | |
| f3::Float64 | |
| f4::Float64 | |
| # damping factors: increase to make the energy losses faster | |
| xd1::Float64 | |
| xd2::Float64 |
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, ColorSchemes | |
| struct Point4D <: AbstractArray{Float64, 1} | |
| x::Float64 | |
| y::Float64 | |
| z::Float64 | |
| w::Float64 | |
| end | |
| Point4D(a::Array{Float64, 1}) = Point4D(a...) |
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, ColorSchemes | |
| function sinecurveincreasing(thecurve, width=5.0; initialwidth=1, finalwidth=2) | |
| leftcurve = Point[] | |
| rightcurve = Point[] | |
| for n in 1:length(thecurve)-1 | |
| # find slope of curve at those points | |
| pt1 = Point(thecurve[n].x, cos(thecurve[n].y)) | |
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 | |
| plotpoints = Point[ | |
| Point(-90.36775, 109.412), | |
| Point(-17.1930000000000, 20.175), | |
| Point(-60.1385, -121.20), | |
| Point(29.972500000000025, -61.73075), | |
| Point(109.87098, -41.90625), | |
| Point(83.43848, 55.41374), | |
| Point(208.39248, -38.902475), |
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 main() | |
| Drawing(500, 500, "/tmp/juliaperformance.svg") | |
| origin() | |
| squircle(O, 245, 245, :clip, rt=0.3) | |
| sethue("ivory") | |
| paint() | |
| @layer begin | |
| translate(0, 200) |