Gephi 0.9.1 does not display edge arrows whith curved edges - graph

I have a very simple network consisting of four nodes and seven directed edges.
When I look in the "Preview"-mode at the network with straight edges, the arrows are shown. But if there are edges back and forth between two nodes, only one edge is displayed and information of the edge weight is lost.
Here my example:
If I set the edges to be curved I can see all the edges, but the arrows are gone. See:
Thus, my question: Is there a way to show edge arrows when the edges are curved?

This is a bug or "feature" if you prefer...

Related

Creating a network graph with set node positions and concentrated edges with both circleheads and arrowheads in R

I've been trying to find a way to replicate the following network graph format in R using DiagrammeR/GraphViz, but without success (ignore the thick black arrow on N1): https://i.stack.imgur.com/oHpQz.png
The graph is a directed graph and each edge in a certain direction either ends with an arrowhead (-->) if the edge value is positive, or a circle/odot (--o) if the edge value is negative. Between a pair of nodes (ex. N1 -- A1), there can be an edge N1 --> A1 and an edge A1 --o N1, and these need to be concentrated so that the two edges look like one line with an arrowhead on one end and a circlehead on the opposite end (like this: o--->). These cannot be parallel or look like two edges ideally.
Another requirement is that the nodes have to be in very specific positions and remain there throughout model simulations where edges might change. From what I have tried and the documentation I have read, this is not possible to do in DOT format, but is possible in neato format.
This is where I get a problem. In neato, I can align the nodes exactly where I want them by defining their x,y positions. However, when I use concentrate = true to create the o---> edge from two otherwise parallel edges, only one type of arrowhead remains. So an edge that's supposed to look like o---> ends up looking like ---> or o---.
This is not a problem in DOT format as concentrate = true does what I want it to do, but in DOT I cannot assign exact node positions. I have tried getting around this using node ranks but without much luck. It seems to stack nodes I want in different ranks within the same rank. As well, concentrate = true doesn't seem to work for edges between nodes within the same rank, as it leaves them as two separate curved edges ---> and o--- without concentrating them.
The reason why I need this to work is because I'm running model simulations where the edges change, and I need to generate hundreds of such graphs. For easy comparison, the nodes need to stay in the same place for consistency.
This is the closest I could come up with using neato format (nodes are positioned the way I want but it's not showing the proper o---> for all the black edges minus self-edges; red edges are true one-way links): https://i.stack.imgur.com/YJBY7.jpg
If only the edges showed up as the proper o---> format, this would be perfect for my needs. If you know of any way to fix this issue using DiagrammeR/GraphViz, or even another program, I would be so grateful. Thanks!
You probably don't need concentrate. Look at arrowtail and dir (https://www.graphviz.org/doc/info/attrs.html#d:arrowtail and https://www.graphviz.org/doc/info/attrs.html#d:dir) and neato -n
digraph c {
graph[label="can neato do the work?"]
node[shape=circle]
a [pos="100,100"]
b [pos="200,100"]
c [pos="300,100"]
a->b [dir=both arrowtail=odot]
c->c [dir=both arrowtail=odot arrowhead=none]
}
Giving:

Get Edges between Vertices (outer polygon)

I'm using THREE.JS and I have a this mesh with different surfaces. Of each surface I got its vertices. Now I want to create edges ( connect the vertices with lines). The vertices are in an arbitrary order, so I can't simply connect v1 with v2, v2 with v3 and so on. I think I have to walk through them with a ray clockwise or counter clockwise and put them in the right order somehow and I have to somehow check their distances, so that the horizontal line between the inner vertices doesn't appear, rather it should go right along the real edges,but I don't know how... Any idea?
(the spheres are the vertices that are the real corners of the surface, the orange lines are the wrong edges that need to be corrected and the blue lines are the edges of each single face)
I need to create these 8 edges (red)
Assuming that you are able to assign a unique number to the vertices and to uniquely associate every triangle to a face, and that the triangulation is watertight, the edges of a face are those edges that are common to a triangle of that face and a triangle of another. When you have all edges of a face, it is a trivial matter to chain them in a polygon.

How to identified face from line drawing?

A line drawing is like a graph but its vertices have x,y position. There are no crossing edges. For example, a line drawing like this is a line drawing with 13 vertices numbered by 0-12. A face is a cycle that doesn't have a path that 'inside' it. Faces in the example would be
(0,1,3,2,0), (2,3,5,4,2), (4,5,8,7,4), (7,8,12,11,7) and (0,2,4,7,11,10,9,6,0)
The cycle (0,1,3,5,4,2,0) is NOT a face because there is a path that located inside it, named (2,3). Cycle (0,1,3,5,8,12,11,10,9,6,0) is also NOT a face because there is a path (0,2,4,7,11), located inside it. What algorithm can I use to identify faces like the ones in the example?
Assume all your edges are line segments; every planar graph can be drawn using only line segments. Also assume the graph is connected. Now the algorithm is pretty simple:
Construct a directed graph, such that the vertices are same as in the original graph and there's two directed edges for every original edge, one in each direction
Start with a random (directed) edge that's not been used yet. At its end, choose the next outgoing edge clockwise (or counterclockwise will do as well, just always the same). To decide which edge that is, you'll have to compute from the coordinates of vertices in the planar embedding. You'd better precompute this edge order for each vertex beforehand.
Keep doing that with the end of the selected edge, until you reach the starting vertex. At that point, you've completed a face.
When there's no unused edges, you've found all faces in the graph
Or, use a library like Boost, that has an efficient implementation of such task

How to detect border vertices of an open mesh 3d model?

There are two kinds of surface mesh models, closed mesh like a sphere or a cube and the second one is the open mesh model which means the surface of the model is not in a closed loop. It is open from somewhere like a hollow pipe.
Sp what I want is I want to detect the border vertices of the open mesh model. there is no border in closed loop mesh but in open mesh we have to detect border vertices for some smoothing, subdivision, etc. operations.
Kindly, suggest me how can I select/detect border vertices ? what is the optimal way to do this ?
by comparing edges of the triangles ? Give me some idea ?
Thanks.
Assuming that you have a manifold mesh, then the border of the mesh are those edges which belong to only one polygon. Edges that are not on the border will belong to two polygons. The border vertices are the vertices that belong to the border edges.
A naive way to find the border vertices is to iterate through all your edges, count how many polygons they belong to, and if they only belong to one polygon, then collect the edge's vertices as border vertices. You will have to remove duplicates vertices from your collection, though.
A second approach is to have your mesh data structure examine each edge as they are added to the mesh, or as polygons are attached to particular edges. In this way, the mesh data structure can keep a list of up-to-date border edges for you, so that when you needed the edges you would not have to find them each time. This will greatly reduce the overhead of determining border edges, although inserting edges and polygons will be slightly more expensive. Your mesh data structure will also take up a bit more memory.
Assuming that your mesh is a 2D (or 2.5D) regular, well-constructed triangulation. You can use some of the properties listed here: http://graphics.stanford.edu/courses/cs468-10-fall/LectureSlides/02_Basics.pdf
Page 9 defines the degree (or valence) of a vertex as the number of incident edges. As shown, all boundary vertices 4 incident edges. "Internal" vertices have 5 incident edges.
Page 17 defines a boundary edge as one that is adjacent to exactly one face.
You might find the discussion on page 22 helpful (closed 2-manifold triangle meshes)

Hidden edges in Graphviz

I'm trying to create a graph using Graphviz (complied with neato), and I would like to place nodes in specific locations. For this, I'm specifying exact edge lengths for all edges. However, I don't want all edges to be visible in the final image.
Do you know of any way to hide edges? I should mention that I tried coloring the edges white, but what happens is that I get white lines painted over the graph nodes - it's not very aesthetic...
It can be done using
nodeA -> nodeB [style=invis]
I found out that another way to go is to define:
outputorder="edgesfirst"
for the graph.

Resources