(@v1.7) pkg> add MathTeXEngine@0.4
├─restricted by compatibility requirements with MathTeXEngine [0a4f8689] to versions: 0.4.1-0.4.2
│ └─MathTeXEngine [0a4f8689] log:
│ ├─possible versions are: 0.1.0-0.4.1 or uninstalled
│ └─restricted to versions 0.4 by an explicit requirement, leaving only versions 0.4.0-0.4.1
└─restricted by compatibility requirements with StructArrays [09ab397b] to versions: 0.1.0-0.3.10 or uninstalled — no versions left
└─StructArrays [09ab397b] log:
├─possible versions are: 0.0.1-0.6.8 or uninstalled
├─restricted to versions * by an explicit requirement, leaving only versions 0.0.1-0.6.8
├─restricted by compatibility requirements with PooledArrays [2dfb63ee] to versions: [0.0.1-0.2.2, 0.4.2-0.6.8] or uninstalled, leaving only versions: [0.0.1-0.2.2, 0.4.2-0.6.8] │ └─PooledArrays [2dfb63ee] log:
│ ├─possible versions are: 0.3.0-1.4.2 or uninstalled
│ ├─restricted to versions 1.2.1-1 by InMemoryDatasets [5c01b14b], leaving only versions 1.2.1-1.4.2
│ │ └─InMemoryDatasets [5c01b14b] log: │ │ ├─possible versions are: 0.7.3 or uninstalled
│ │ └─InMemoryDatasets [5c01b14b] is fixed to version 0.7.3
│ └─restricted to versions 1.3.0-1 by DataFrames [a93c6f00], leaving only versions 1.3.0-1.4.2
│ └─DataFrames [a93c6f00] log: │ ├─possible versions are: 1.4.0 or uninstalled
│ └─DataFrames [a93c6f00] is fixed to version 1.4.0
└─restricted by compatibility requirements with IndexedTables [6deec6e2] to versions: 0.4.1-0.4.4, leaving only versions: 0.4.2-0.4.4
└─IndexedTables [6deec6e2] log:
├─possible versions are: 0.7.4-1.0.0 or uninstalled
├─restricted to versions * by an explicit requirement, leaving only versions 0.7.4-1.0.0
├─restricted by compatibility requirements with Compat [34da2185] to versions: 0.8.0-1.0.0 or uninstalled, leaving only versions: 0.8.0-1.0.0 │ └─Compat [34da2185] log:
│ ├─possible versions are: 1.0.0-4.1.0 or uninstalled
│ └─restricted to versions 3.17.0-3 by InMemoryDatasets [5c01b14b], leaving only versions 3.17.0-3.45.0
│ └─InMemoryDatasets [5c01b14b] log: see above └─restricted by compatibility requirements with PooledArrays [2dfb63ee] to versions: 1.0.0 or uninstalled, leaving only versions: 1.0.0
└─PooledArrays [2dfb63ee] log: see above
This is cool, but the straight line segments seem not to be animated in steps right? I immediately jumped to the source to see what you’re doing because animating beziers with linear speed along the curve was a wish of mine once. Like a train along a track.
Yes, it’s cheating with straight-line and samples. I’m not good at maths, but if I was, I’d certainly use pomax’s web page to do this sort of thing, because I like cool things like that.
Perhaps these two variants better capture the spirit of the “until convergence” request.
Obviously there are many types of “convergences”.
Here are just two examples with somewhat naive norms.
using Plots; gr()
sier = scatter(1,xlim = (0, 1),ylim = (0, sqrt(3)/2), legend = false, marker = 1)
m=0.5 .* ((0,0).+ (1,0))
@gif for i=1:5000
global m=0.5 .*(m .+ rand([(0,0),(1,0),0.5.*(1,sqrt(3))]))
push!(sier, m)
end every 10
The algorithm comes from a math letters post.
The explanation, in my opinion, (not a real formal demonstration, but very substantially) lies in the fact that the operation of taking the midpoint between a generic point and one of the vertices ensures that there will never be any points in the “median triangle” (i.e. the triangle that has vertices at the midpoints of the sides) and this happens at every “level”
The so-called “ternary operator”, ?:, is closely related to the if-elseif-else syntax, but is used where a conditional choice between single expression values is required, as opposed to conditional execution of longer blocks of code. It gets its name from being the only operator in most languages taking three operands:
a ? b : c
The expression a, before the ?, is a condition expression, and the ternary operation evaluates the expression b, before the :, if the condition a is true or the expression c, after the :, if it is false. Note that the spaces around ? and : are mandatory: an expression like a?b:c is not a valid ternary expression (but a newline is acceptable after both the ? and the :).
using Pkg
List = [b.name for (a, b) in reduce(vcat, [x.pkgs for x in Pkg.Registry.reachable_registries()])]
filter!(x -> !occursin("jll", x), List)
Pkg.add(rand(List))