由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Computation版 - how to undo triangulation?
相关主题
寻支持有限元和差分法的画图软件any body have some experience using 64bit Linux?
From a picture to a 2D mesh靠,问个棘手的问题
[转载] Matlab helpAnyone works on Adaptive Mesh Refinement?
有什么算法可以确定一个点在不在多边形内?请教:求最值问题
BREP solid meshing问一下2d/3d的fast sovler
help! bilinear basis function convergenc3D FEM code
紧急求问: 是否可以将一个对称不定矩阵 A 分解为 A = B * B'scan 3D surface and generate mesh in FEM
how to submit multi-tasks to HPC linux cluster? (转载)请教 LS-DYNA 3D 的 Penetration 和 Remeshing
相关话题的讨论汇总
话题: line话题: node话题: boundary话题: polygons话题: holes
进入Computation版参与讨论
1 (共1页)
l*******G
发帖数: 1191
1
Here is a quick question on triangular meshes.
Lets say I have a 2D triangular mesh like this
or
How do I undo the triangulation and identify all the polygons that make up
the boundary (including the holes?)
Note that holes may "touch" other holes (sharing a vertex, but not edge)
or the outer boundary.
There could also be rings ( holes in another hole)
x*****w
发帖数: 8
2
line()=0
foreach Mesh
for i=1,3
line(node1,node2)++
endfor
endfor
if(line<2) line is boundary
connect all line seg
l*******G
发帖数: 1191
3
what's node1 node2 and what does i have to do with line()?
When collecting, how to prove the collected segments are in clockwise order
of the polygon points?
l*******G
发帖数: 1191
4
I see line() is NNxNN matrix, NN is number of nodes, Wow, that is huge if
NN>1million. But thanks, I think possible to walk through all edges
without using such a large 2D array. Still tough to ensure order of edges.
x*****w
发帖数: 8
5
the max number of nodes connect is small, less than 20. Try use dynamic
array like list. one line only check the smaller node, otherwise you
duplicate each line.
clockwise is easy just search online.
x*****w
发帖数: 8
6
What line (i,j) store is the node connected to node i.
line(1,1) is the first node connected to node 1. line(1,2) is
second node connected node 1. line(2,1) is first node for node 2.
Say you has a new line, search the node connect to the small node. if found,
remove it, since it is the second time, other wise add it. If you are using
list, line(i).size() is the number connect to node i. If not, you need
another array to store the number.
l*******n
发帖数: 344
7
second Majia:
Final result: the nodes belong to boundary have one and only one connect to
it. so you start from any boundary node say s1, n1=line(s1,1) will be next
node, go n2=line(n1,1),go line(n2,1)...until come back to s1.
This is a very interesting problem. Actually, it is used by me as a
interviews question. Nobody could give a good answer. If you understand
boundary means one side have something, another side is empty, solution is
obvious.
l*******G
发帖数: 1191
8
Thanks, sounds cool, walk through all edges, any edge that ever bounds two
or more element is an interior edge, then remove that edge. Rest of edges
make up the boundary . Start from any one of the remaining edge and walk
along to original point to find one polygon. Continue if still have edges
not identified. There is a problem if two polygons kiss each other by
sharing a node. The way to walk back to original point is not unique. In
that case, one finds the shared point will be walked twice or there will be
incomplete polygons. Find the shared point first and start from the shared
point. There will be more problems if two polygons share two or more nodes
but not any edge! Such as the hand drawn pentagon star shape.
not sure how to do it in 3d, i e find the faces that make up the boundary of
a polyhedral 3d grid with holes in it.
x*****w
发帖数: 8
9
My situation is finding outline of a model ,no holes. For your problem, I
only can give you some advice:
1. find shared point: a point has more than 1 point connect it. May need a
flag array, size=number of boundary nodes.
2. start from any share point,when a line hits another share point, stop.
3. Your have some line segments after searching. Try using some methods to
find best combination, such as two segments share same points. I don't
believe it is possible that all polygons connect more than 2 polygons.
3D is same thing, instead of line, you use face. a face shared by two
elements, it is interior edge. I need make it clear, a line or face cannot
shared by more than two elements, only two situations: 1 or 2.
l*******G
发帖数: 1191
10
Here is a quick question on triangular meshes.
Lets say I have a 2D triangular mesh like this
or
How do I undo the triangulation and identify all the polygons that make up
the boundary (including the holes?)
Note that holes may "touch" other holes (sharing a vertex, but not edge)
or the outer boundary.
There could also be rings ( holes in another hole)
相关主题
help! bilinear basis function convergencany body have some experience using 64bit Linux?
紧急求问: 是否可以将一个对称不定矩阵 A 分解为 A = B * B'靠,问个棘手的问题
how to submit multi-tasks to HPC linux cluster? (转载)Anyone works on Adaptive Mesh Refinement?
进入Computation版参与讨论
x*****w
发帖数: 8
11
line()=0
foreach Mesh
for i=1,3
line(node1,node2)++
endfor
endfor
if(line<2) line is boundary
connect all line seg
l*******G
发帖数: 1191
12
what's node1 node2 and what does i have to do with line()?
When collecting, how to prove the collected segments are in clockwise order
of the polygon points?
l*******G
发帖数: 1191
13
I see line() is NNxNN matrix, NN is number of nodes, Wow, that is huge if
NN>1million. But thanks, I think possible to walk through all edges
without using such a large 2D array. Still tough to ensure order of edges.
x*****w
发帖数: 8
14
the max number of nodes connect is small, less than 20. Try use dynamic
array like list. one line only check the smaller node, otherwise you
duplicate each line.
clockwise is easy just search online.
x*****w
发帖数: 8
15
What line (i,j) store is the node connected to node i.
line(1,1) is the first node connected to node 1. line(1,2) is
second node connected node 1. line(2,1) is first node for node 2.
Say you has a new line, search the node connect to the small node. if found,
remove it, since it is the second time, other wise add it. If you are using
list, line(i).size() is the number connect to node i. If not, you need
another array to store the number.
l*******n
发帖数: 344
16
second Majia:
Final result: the nodes belong to boundary have one and only one connect to
it. so you start from any boundary node say s1, n1=line(s1,1) will be next
node, go n2=line(n1,1),go line(n2,1)...until come back to s1.
This is a very interesting problem. Actually, it is used by me as a
interviews question. Nobody could give a good answer. If you understand
boundary means one side have something, another side is empty, solution is
obvious.
l*******G
发帖数: 1191
17
Thanks, sounds cool, walk through all edges, any edge that ever bounds two
or more element is an interior edge, then remove that edge. Rest of edges
make up the boundary . Start from any one of the remaining edge and walk
along to original point to find one polygon. Continue if still have edges
not identified. There is a problem if two polygons kiss each other by
sharing a node. The way to walk back to original point is not unique. In
that case, one finds the shared point will be walked twice or there will be
incomplete polygons. Find the shared point first and start from the shared
point. There will be more problems if two polygons share two or more nodes
but not any edge! Such as the hand drawn pentagon star shape.
not sure how to do it in 3d, i e find the faces that make up the boundary of
a polyhedral 3d grid with holes in it.
x*****w
发帖数: 8
18
My situation is finding outline of a model ,no holes. For your problem, I
only can give you some advice:
1. find shared point: a point has more than 1 point connect it. May need a
flag array, size=number of boundary nodes.
2. start from any share point,when a line hits another share point, stop.
3. Your have some line segments after searching. Try using some methods to
find best combination, such as two segments share same points. I don't
believe it is possible that all polygons connect more than 2 polygons.
3D is same thing, instead of line, you use face. a face shared by two
elements, it is interior edge. I need make it clear, a line or face cannot
shared by more than two elements, only two situations: 1 or 2.
a**a
发帖数: 63
19
This is an interesting problem, and very practical when working with meshes.
I suggest that you construct a matrix of internal edges or faces when
dealing higher dimensions. Then use
Unique with 'rows' option to find the unique ones.
If program properly you can get the boundar edges/faces with less than 5/6
lines of code.
Now really interesting is you cast the matrix into a hash function and agan
use "unique", you can gain quite some speed with large meshes.
1 (共1页)
进入Computation版参与讨论
相关主题
请教 LS-DYNA 3D 的 Penetration 和 RemeshingBREP solid meshing
请教一个Patran问题help! bilinear basis function convergenc
Share hotel,moving boundaries conference紧急求问: 是否可以将一个对称不定矩阵 A 分解为 A = B * B'
急求FEM数据(2d mesh及其stiffness matrix)how to submit multi-tasks to HPC linux cluster? (转载)
寻支持有限元和差分法的画图软件any body have some experience using 64bit Linux?
From a picture to a 2D mesh靠,问个棘手的问题
[转载] Matlab helpAnyone works on Adaptive Mesh Refinement?
有什么算法可以确定一个点在不在多边形内?请教:求最值问题
相关话题的讨论汇总
话题: line话题: node话题: boundary话题: polygons话题: holes