This is one of my attempts to find the answer to my wireframe question in Mathematica .
Given a set of line segments, how one connects two segments that are connected AND lie on the same line. For example, consider line segments l1 = {(0,0), (1,1)}and l2 = {(1,1), (2,2)}. These two line segments can be combined into one line segment, namely l3 = {(0,0), (2,2)}. This is due to the fact that l1they l2divide the point (1,1), and the slope of each line segment is the same. Here's a visual:
l1 = JoinedCurve[{{{0, 2, 0}}}, {{{0, 0}, {1, 1}}}, CurveClosed -> {0}];
l2 = JoinedCurve[{{{0, 2, 0}}}, {{{1, 1}, {2, 2}}}, CurveClosed -> {0}];
Graphics[{Red, l1, Blue, l2}, Frame -> True]

It should be noted that in the above example, l1and l2can be combined into one line indicated by three dots, that is {{0,0},{1,1},{2,2}}.
: , , , . :
lines = {
{{0,0}, {1,1}},
{{3,3}, {2,2}},
{{2,2}, {1,1}},
{{1,1}, {0.5,0.5}},
{{0,1}, {0,2}},
{{2,3}, {0,1}}
}
, , say REDUCE, :
R = {
{{0,0}, {1,1}, {2,2}, {3,3}},
{{1,1}, {0.5,0.5}},
{{2,1}, {0,1}, {0,2}}
}
, , - {1,1}. , , : R lines , R, R. lines {{2,2},{1,1}}, {1,1} R, {2,2} R. {{1,1}, {0.5,0.5}} R, {{0,1}, {0,2}}. lines , R, , {{2,1}, {0,1}, {0,2}}. , R , - , {{3,3}, {2,2}} R, {3,3}, {2,2}.
, , . , , , , . :
3 , , , , , . , 3 .
, , , , . :
g1 = ListPlot3D[
{{0, -1, 0}, {0, 1, 0}, {-1, 0, 1}, {1, 0, 1}, {-1, 1, 1}},
Mesh -> {2, 2},
Boxed -> False,
Axes -> False,
ViewPoint -> {2, -2, 1},
ViewVertical -> {0, 0, 1}
]

Mathematica 8 3D- ( ), :
G3TOG2INFO[g_] := Module[{obj, opt},
obj = ImportString[ExportString[g, "PDF", Background -> None], "PDF"][[1]];
opt = Options[obj];
obj = Cases[obj, _JoinedCurve, \[Infinity]];
obj = Map[#[[2]][[1]] &, obj];
{obj, opt}
]
, Mathematica 7 _JoinedCurve _Line. g1,
{lines, opt} = G3TOG2INFO[g1];
Row[{Graphics[Map[Line[

90 , 12 ( ).
, . lines, , .