Continuous line from edges of a 3D object

LalaGhost

New member
Joined
Dec 7, 2019
Messages
4
Hey is there a way, a formula, to get a continuous line on a three-dimensional object along the edges of the object?
I basically have the position of all vertices and need a continuous line of going over each edge.
So that the result is a 'hollow' version of it.
I can basically go an infinite time over each edge, even two times over the same, but the the less the better. So there is definitely an answer but I do no know how to find.
See the screenshots for what I mean.
 

Attachments

  • Screenshot_1.png
    Screenshot_1.png
    19.6 KB · Views: 3
There's a standard way to determine whether there is an "Eulerian path" (going over every edge exactly once), which is often introduced in connection with the "bridges of Konigsberg" problem; look that up!

The method will also help you see what is the fewest edges you need to double.
 
Hey is there a way, a formula, to get a continuous line on a three-dimensional object along the edges of the object?
I basically have the position of all vertices and need a continuous line of going over each edge.
So that the result is a 'hollow' version of it.
I can basically go an infinite time over each edge, even two times over the same, but the the less the better. So there is definitely an answer but I do no know how to find.
See the screenshots for what I mean.
Please clarify how your object is represented. Is it a list of faces, each face containing a list of edges? Do you need to collect a chain of edges that might be used to draw the wireframe?
 
Please clarify how your object is represented. Is it a list of faces, each face containing a list of edges? Do you need to collect a chain of edges that might be used to draw the wireframe?
Either a list of edges, or a list of vertices.
What does "Do you need to collect a chain of edges that might be used to draw the wireframe?" mean?
But the end result should be a wireframe
 
Hey is there a way, a formula, to get a continuous line on a three-dimensional object along the edges of the object? I basically have the position of all vertices and need a continuous line of going over each edge. I can basically go an infinite time over each edge, even two times over the same, but the the less the better. So there is definitely an answer but I do no know how to find.
You have a graph with eight vertices and twelve edges. But to have an Eulerian path a graph must have at most two odd vertices. In this graph every vertex is odd, so no Eulerian path. However, there is a path of length nine that uses each of the nine exactly once. At this point I fail to follow your description. Please clarify.
 
Hey is there a way, a formula, to get a continuous line on a three-dimensional object along the edges of the object?
I basically have the position of all vertices and need a continuous line of going over each edge.
So that the result is a 'hollow' version of it.
I can basically go an infinite time over each edge, even two times over the same, but the the less the better. So there is definitely an answer but I do no know how to find.
See the screenshots for what I mean.
Clearly we need to know more about the context and goal of the question. We know that it is not possible to trace all edges of a polyhedron, in general, with a single continuous "line" without retracing any part; but what is it that you actually need? Is it an algorithm to find the shortest path that covers all the edges? Will that algorithm just produce a sequence of vertices to pass through, or the actual path? Also, as lev888 asked, what are the inputs? A list of coordinates of vertices is not enough, as that doesn't indicate which are joined by edges, or which sets of vertices are associated with faces.

The more you can tell us about your project (not just this particular question), the more likely you can get a truly useful answer. Is this a programming project for a class, or what?
 
Either a list of edges, or a list of vertices.
What does "Do you need to collect a chain of edges that might be used to draw the wireframe?" mean?
But the end result should be a wireframe
If you already have the list of edges you can loop through it and draw each edge once. Why do you need this continuous "line"?
 
I am writing a script for a 3D program that goes over each edge and draws a line over it to make a wireframe representation of the original object. I tried already looping through each edge and drawing one and but because the way the 3D program works the result was in some situations strange. Therefore I would like to draw one continuous line.

Retracing an edge would not be a problem, but the number of retraces should be as low as possible.
I have a list of all edges of the object and can access the vertices of each edge so that I do know which edges are connected.
 
I am writing a script for a 3D program that goes over each edge and draws a line over it to make a wireframe representation of the original object. I tried already looping through each edge and drawing one and but because the way the 3D program works the result was in some situations strange. Therefore I would like to draw one continuous line.

Retracing an edge would not be a problem, but the number of retraces should be as low as possible.
I have a list of all edges of the object and can access the vertices of each edge so that I do know which edges are connected.
Did you follow the advice response #2?

Did you look up "Eulerian path" and how you can apply that concept here?

We can "help you get the answer - but you have to take part in getting the answer.
 
I am writing a script for a 3D program that goes over each edge and draws a line over it to make a wireframe representation of the original object. I tried already looping through each edge and drawing one and but because the way the 3D program works the result was in some situations strange. Therefore I would like to draw one continuous line.

Retracing an edge would not be a problem, but the number of retraces should be as low as possible.
I have a list of all edges of the object and can access the vertices of each edge so that I do know which edges are connected.
If you don't know what caused the strange result you may get the same result with the new script.
 
If you don't know what caused the strange result you may get the same result with the new script.
I know what causes the strange result, but it is just the way the 3D program works.

I think I can come up with some result with response #2.
Thank you all! :)
 
Hey is there a way, a formula, to get a continuous line on a three-dimensional object along the edges of the object?
I basically have the position of all vertices and need a continuous line of going over each edge.
So that the result is a 'hollow' version of it.
I can basically go an infinite time over each edge, even two times over the same, but the the less the better. So there is definitely an answer but I do no know how to find.
See the screenshots for what I mean.
can you "parametrize" or "vectorize" the edge line and then scale it to+- infinity ???

your start point = edgeStartPoint
your end point = edgeEndPoint

Now take the points and you first parametrize them

vectorized_I = edgeEndPointX - edgeStartPointX
vectorized_J = edgeEndPointY - edgeStartPointY
vectorized_K = edgeEndPointZ - edgeStartPointZ

Then your equation for the line will be in the form of:

x = edgeStartPointX + vectorized_I * t
y = edgeStartPointY + vectorized_j * t
z = edgeStartPointZ+ vectorized_k * t

t is "time" or the "Scalar" I think they also may call it the parameter.

Now you can just multiple t by some scalar
 
Top