From: cherifrahal on
Hello,
I'm beginner in Mathematica !
I need some help to draw a 3D graph with different edge's thikness
Can someone help me !
I give here an example of my graphs !
Thank's in advance
cherif Rahal
GraphPlot3D[{1 -> 2, 1 -> 4, 1 -> 5, 2 -> 3, 2 -> 6, 3 -> 4, 3 -> 7,
4 -> 8, 5 -> 6, 5 -> 8, 6 -> 7, 7 -> 8, 5 -> 10, 6 -> 11, 10 -> 11,
10 -> 12, 11 -> 12, 12 -> 13, 9 -> 13},
EdgeRenderingFunction -> (Cylinder[{#1}, {0.05}] &),
VertexCoordinateRules -> {1 -> {-1, 1, 2}, 2 -> {1, 1, 2},
4 -> {-1, -1, 2}, 3 -> {1, -1, 2}, 5 -> {-2, 2, 0}, 6 -> {2, 2, 0},
7 -> {2, -2, 0}, 8 -> {-2, -2, 0}, 9 -> {0, 0, 2},
10 -> {-2, 4, 0}, 11 -> {2, 4, 0}, 12 -> {0, 3, 3},
13 -> {0, 2.2, 3.5}}]

From: David Park on
Look up Cylinder and Function in the Documentation Center.

The EdgeRenderingFunction plugs the points defining the two ends of the edge
into Cylinder where the #1 is. The second argument in Cylinder is the radius
(thickness) of the edge. So just increase it. You don't need the extra
brackets.

GraphPlot3D[{1 -> 2, 1 -> 4, 1 -> 5, 2 -> 3, 2 -> 6, 3 -> 4, 3 -> 7,
4 -> 8, 5 -> 6, 5 -> 8, 6 -> 7, 7 -> 8, 5 -> 10, 6 -> 11, 10 -> 11,
10 -> 12, 11 -> 12, 12 -> 13, 9 -> 13},
EdgeRenderingFunction -> (Cylinder[{#1}, 0.15] &),
VertexCoordinateRules -> {1 -> {-1, 1, 2}, 2 -> {1, 1, 2},
4 -> {-1, -1, 2}, 3 -> {1, -1, 2}, 5 -> {-2, 2, 0}, 6 -> {2, 2, 0},
7 -> {2, -2, 0}, 8 -> {-2, -2, 0}, 9 -> {0, 0, 2},
10 -> {-2, 4, 0}, 11 -> {2, 4, 0}, 12 -> {0, 3, 3},
13 -> {0, 2.2, 3.5}}]


David Park
djmpark(a)comcast.net
http://home.comcast.net/~djmpark/

From: cherifrahal [mailto:cherif.rahal(a)gmail.com]

Hello,
I'm beginner in Mathematica !
I need some help to draw a 3D graph with different edge's thikness
Can someone help me !
I give here an example of my graphs !
Thank's in advance
cherif Rahal
GraphPlot3D[{1 -> 2, 1 -> 4, 1 -> 5, 2 -> 3, 2 -> 6, 3 -> 4, 3 -> 7,
4 -> 8, 5 -> 6, 5 -> 8, 6 -> 7, 7 -> 8, 5 -> 10, 6 -> 11, 10 -> 11,
10 -> 12, 11 -> 12, 12 -> 13, 9 -> 13},
EdgeRenderingFunction -> (Cylinder[{#1}, {0.05}] &),
VertexCoordinateRules -> {1 -> {-1, 1, 2}, 2 -> {1, 1, 2},
4 -> {-1, -1, 2}, 3 -> {1, -1, 2}, 5 -> {-2, 2, 0}, 6 -> {2, 2, 0},
7 -> {2, -2, 0}, 8 -> {-2, -2, 0}, 9 -> {0, 0, 2},
10 -> {-2, 4, 0}, 11 -> {2, 4, 0}, 12 -> {0, 3, 3},
13 -> {0, 2.2, 3.5}}]



From: cherifrahal on
On Nov 8, 1:04 pm, "David Park" <djmp...(a)comcast.net> wrote:
> Look up Cylinder and Function in the Documentation Center.
>
> The EdgeRenderingFunction plugs the points defining the two ends of the edge
> into Cylinder where the #1 is. The second argument in Cylinder is the radius
> (thickness) of the edge. So just increase it. You don't need the extra
> brackets.
>
> GraphPlot3D[{1 -> 2, 1 -> 4, 1 -> 5, 2 -> 3, 2 -> 6, 3 -> 4, 3 -> 7,
> 4 -> 8, 5 -> 6, 5 -> 8, 6 -> 7, 7 -> 8, 5 -> 10, 6 -> 11, 10 -> 11,
> 10 -> 12, 11 -> 12, 12 -> 13, 9 -> 13},
> EdgeRenderingFunction -> (Cylinder[{#1}, 0.15] &),
> VertexCoordinateRules -> {1 -> {-1, 1, 2}, 2 -> {1, 1, 2},
> 4 -> {-1, -1, 2}, 3 -> {1, -1, 2}, 5 -> {-2, 2, 0}, 6 -> {2, 2, 0},
> 7 -> {2, -2, 0}, 8 -> {-2, -2, 0}, 9 -> {0, 0, 2},
> 10 -> {-2, 4, 0}, 11 -> {2, 4, 0}, 12 -> {0, 3, 3},
> 13 -> {0, 2.2, 3.5}}]
>
> David Park
> djmp...(a)comcast.nethttp://home.comcast.net/~djmpark/
>
> From: cherifrahal [mailto:cherif.ra...(a)gmail.com]
>
> Hello,
> I'm beginner in Mathematica !
thank you very much for your answer,
but what I need, is different thikness for different edges, for
exemple for the edge 1-> 2 I need the thikness to be 1 and for the
edge 2->3 i need the thikness to be 3 ... etc.
Is it possible to do that with mathematica ?
Thank you in advance

Cherif Rahal


> I need some help to draw a 3D graph with different edge's thikness
> Can someone help me !
> I give here an example of my graphs !
> Thank's in advance
> cherif Rahal
> GraphPlot3D[{1 -> 2, 1 -> 4, 1 -> 5, 2 -> 3, 2 -> 6, 3 -> 4, 3 -> 7,
> 4 -> 8, 5 -> 6, 5 -> 8, 6 -> 7, 7 -> 8, 5 -> 10, 6 -> 11, 10 -> 11,
> 10 -> 12, 11 -> 12, 12 -> 13, 9 -> 13},
> EdgeRenderingFunction -> (Cylinder[{#1}, {0.05}] &),
> VertexCoordinateRules -> {1 -> {-1, 1, 2}, 2 -> {1, 1, 2},
> 4 -> {-1, -1, 2}, 3 -> {1, -1, 2}, 5 -> {-2, 2, 0}, 6 -> {2, 2, 0},
> 7 -> {2, -2, 0}, 8 -> {-2, -2, 0}, 9 -> {0, 0, 2},
> 10 -> {-2, 4, 0}, 11 -> {2, 4, 0}, 12 -> {0, 3, 3},
> 13 -> {0, 2.2, 3.5}}]