I have two arcs and I am trying to be able to correlate one to the other I know all of the points on my arc to the right and need to find a way to find the points on my arc to the left. I do know the starting point of the arc to the left but that is all.
Related
I'm trying to plot multiple arrows to and from different points. I'm using pyplot.quiver and here's my result.
As can be seen, in many places the arrows between two points are overlapping each other. However, I want something similar to this image below where the arrows instead of overlapping are juxtaposed against each other.
I realise that any two points can be connected by only one straight line so my method of simply passing in the list of x and y lists is probably wrong. I am looking for the best possible method to ensure that the arrows are next to each other instead of on top of each other
Any help would be appreciated.
EDIT (16/06/19): I stumbled upon a Python library called Networkx which allows to analyse, visualise, and do other stuff related to network data and that's what I used to create this. It has nice functions for drawing two juxtaposed arrows between a pair of points and trying other things - curved arrows, changing the arrowhead etc.
I'm using the Overpass API to query Open Street Maps for nearby road segments. I am pretty sure that my query is returning all of the nodes of the nearby way... but I only want nearby nodes of the nearby way.
In the documentation it references this problem:
In general, you will be rather interested in complete data than just
elements of a single type. First, there are several valid definitions
of what "complete map data" means. The first unclear topic is what to
do with nodes outside the bounding box which are members of ways that
lie partly inside the bounding box.
The same question repeats for relations. If you wait for a turn
restriction, you may prefer to get all elements of the relation
included. If your bounding box hits for example the border of Russia,
you likely don't want to download ten thousands kilometers of boundary
around half the world.
But I looked at the subsequent examples and didn't see the solution.
Basically, in their example, how would I restrict the elements returned to those strictly in the bounding box (rather than returning the whole boundary of Russia)?
My current query is
way (around:100,50.746,7.154) [highway~"^(secondary|tertiary)$"];
>;
out ids geom;
I'm thinking maybe I need to change it to node (around:...) and then recurse upwards to the way to query for the highway tag but I'm not sure if I am even on the right track.
Actually, it's even a bit more complicated, as you need the set intersection of all nodes in a 100m distance and those nodes belonging to one of the relevant ways. Here's how your query should look like: Adjust distance, tags for ways as needed.
Note that depending on the tagging, there's no guarantee that you will find a node in a certain distance, especially if roads tend to be rather straight and longish. This for sure will impact your results, so a bit experimenting with a suitable radius is probably needed.
// Find nodes up to 100m around center point
// (center is overpass turbo specific for center point lat/lon in current map view)
node(around:100,{{center}})->.aroundnodes;
// recurse up to ways with highway = secondary/tertiary
way(bn.aroundnodes)[highway~"^(secondary|tertiary)$"]->.allways;
// determine nodes belonging to found ways
node(w.allways)->.waynodes;
(
// determine intersection of all ways' nodes and nodes around center point
node.waynodes.aroundnodes;
// and return ways (intersection is just a workaround for a bug)
way.allways.allways;
);
out;
check it out in overpass turbo: http://overpass-turbo.eu/s/hPV
Normally Intersection of two planes A and B (not parallel) will return a line L. I know how to implement this, but if now given a plane A and the line of intersection L to find plane B. Is there a solution? Thanks in advance!
No, it is not possible to find (or "recover") the plane B, because an infinite number of planes (Bs) can intersect plane A exactly at the line L but still are allowed to "hinge" (or rotate) about it (within certain limits of course so as to not be parallel as you mention).
You need a little bit more information to define one single plane (three points, a point and a line, a point and a normal vector, for more information please see here). Also, Paul Bourke's website contains really a wealth of information if you are working in computer graphics.
Perhaps there is a way to get this little bit of information from your problem (?)
(By the way, i am not sure that this a question for Stackoverflow, perhaps it would fit better to the Mathematics part)
I have been looking for how to determine coordinates of the points which consist a polygon(feature) in OpenLayers.
Let's say I have created a polygon like the one in this example. I need to know the points which consist the polygon, so I can save them somewhere.
I bet it is an easy one. I just couldn't find anything, probably I don't know what I should search for.
Thanks in advance.
Found it finally!
vectors.features[0].geometry.getVertices()
Not a long question. Can anyone explain what the word "translation" means in the context of graphics? Thanks a lot.
Translation is just moving something (up, down, or sideways).
Move an object - don't rotate or scale or distort it, just move it
Translation, as said, is moving an object. This is one of the affine transformations (which means it doesn't distort the object). There are a few others, the 2D versions of which are described here. (Note that shearing, the final one listed, isn't affine).
It literally means to translate coordinates from one graph system to another using a mathmatical function.
In normal 2d/3d geometry this is accomplished by adding or subtracting values to move the origin of one system to the orgin of the other.
Ie - move the object from one spot to another.
(Ps this is somewhat simplified.)