Comments (2)
Apologies for the late reply. I don't think we have exactly what you need here in the internal APIs. You can look at these functions to get an idea of how ambiguities are handled and so forth:
Lines 202 to 237 in 9e18fe6
Assuming what you mean by points is "indices" ?
from contour.jl.
Yeah, by points I mean indices.
Sorry for the super late response 🙈 😅
I realised that for getting the contour of a specific index one could just modify the trace_contour()
function https://github.com/JuliaGeometry/Contour.jl/blob/0160a4137bab2bb05480a01769b847cf5073caa5/src/Contour.jl#L295C2-L322C1
Removing the iteration and choosing the specific index as an initial box leaves you with one single contour line, namely that of the point (index) in question.
However, in my case I am looking for the contours through a previously calculated saddle point (hence, two contour lines). If I understand the algorithm correctly then getting those two lines directly will be impossible, for different reasons depending on the discretisation of the grid.
If the saddle point lies exactly on a grid point (e.g. point coordinates (x,y) = (0,0), i.e. grid point with index (2,2)) in the example below), then the two traced contour lines both run through it. However, the cell indexed (2,2) only gets called for one of the lines. Whereas for the other line the coordinates (0,0) become part of the curve as a result of the interpolation.
So, if I want to find the two lines that runs through point (0,0) I need to trace all contour lines and then check if they happen to intersect with it.
If the saddle point lies in between grid points (e.g. point (0,0) lies inside the cell indexed (2,2)), then the respective cell will be correctly identified it as a saddle point. The two traced contour lines will run along the edges of the cell and therefore not intersect with each other and also not exactly pass through the saddle point, making further analysis difficult. (Especially for the case of low resolution)
I would have thought one could somehow speed up the calculation of the contour lines through the saddle points by only tracing the contours starting from it, but seems like that's not possible ...
Cheers!
from contour.jl.
Related Issues (20)
- Upgrade error HOT 5
- Broken on Julia 0.4 HOT 5
- Ambiguity warnings on 0.4
- Broken on 0.4 master HOT 5
- Build contours from irregular and unsorted data HOT 1
- Contour not finding all branches of multi-branch contours HOT 2
- Provide a type-agnostic API and document it HOT 10
- Disable CI builds on OSX?
- Help wanted! HOT 6
- Error tagging new release
- accept non-float z
- Performance Improvements and New Algorithms HOT 3
- display() error HOT 1
- Tests depend on hasing algorithm in Base HOT 2
- TagBot trigger issue HOT 15
- Extracting the indices of the contour HOT 5
- v0.6.0 Documentation Updates
- `contour` fails on arrays of integers HOT 2
- Contours of discntinuous data HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from contour.jl.