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 ForwardDiff | |
const T = Float64 # the datatype used, probably Float64 | |
const dof = 4 | |
fn!(;T_::Type=T, dof_=dof) = zeros(T_,dof_) | |
function fn!(res, y)#, dydt) | |
@show typeof(res), typeof(y) | |
for i=1:dof |
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
""" | |
Determines the winding number of a point and a polygon, i.e. how many | |
times a polygon winds around the point. | |
It follows Dan Sunday: http://geomalgorithms.com/a03-_inclusion.html. | |
""" | |
function windnr(p, poly::Matrix) | |
@assert length(p)==2 | |
@assert poly[:,1]==poly[:,end] | |
# Loop over edges |
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
[deps] | |
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee" |
OlderNewer