[Date Index]
[Thread Index]
[Author Index]
Re: Displaying cylinders
*To*: mathgroup at smc.vnet.net
*Subject*: [mg110844] Re: Displaying cylinders
*From*: Albert Retey <awnl at gmx-topmail.de>
*Date*: Thu, 8 Jul 2010 06:50:09 -0400 (EDT)
*References*: <i13trd$7hu$1@smc.vnet.net>
Am 08.07.2010 09:13, schrieb S. B. Gray:
> I have displays like this:
>
> th = .01;
> cp1 = { 1, -1, 2};
> cp2 = { 2, 0, 1};
> cp3 = {-1, 3, 2};
> Graphics3D[{Opacity[.4],
> Yellow, Cylinder[{cp1, cp1 + {th, -th, th}}, 12],
> Green, Cylinder[{cp2, cp2 - {th, th, -th}}, 15],
> Red, Cylinder[{cp3, cp3 + {-th, -th, -th}}, 12]},
> Boxed -> False]
>
> but the cylinders are stand-ins for what I really want, which is circles
> in 3D. (I would like a 3D circle primitive with circles defined by three
> points, rather than the way cylinders are specified.)
>
> The smallest number of circles in the actual application is 20, so it is
> almost impossible to see how they interact, no matter what Opacity is
> set to. It would be much better if I could make the edges thicker and
> opaque (with EdgeForm), and have the cylinder ends or sides transparent.
> That way the edges (rings or circles) would occlude each other so it
> would be clear what is in front of what. So far as I know, the edges
> cannot be contolled separately. If you set "th" to a higher value, you
> get a double ring which is really the cylinder side, which also cannot
> be given its own Opacity.
I think I am missing your point, the following does what you described
and seems to work, is it something else that you want?
th = .01;
cp1 = {1, -1, 2};
cp2 = {2, 0, 1};
cp3 = {-1, 3, 2};
Graphics3D[{
Opacity[0],
EdgeForm[Directive[Opacity[1], Thickness[th], Yellow]],
Cylinder[{cp1, cp1 + {th, -th, th}}, 12],
EdgeForm[Directive[Opacity[1], Thickness[th], Green]],
Cylinder[{cp2, cp2 - {th, th, -th}}, 15],
EdgeForm[Directive[Opacity[1], Thickness[th], Red]],
Cylinder[{cp3, cp3 + {-th, -th, -th}}, 12]
}, Boxed -> False]
I have included Opacity in EdgeForm to show that this works, but of
course with a value of 1 you could just as well omit it...
hth,
albert
Prev by Date:
**Re: Pattern: x_List with conditions on elements**
Next by Date:
**Re: First nonzero in list**
Previous by thread:
**Displaying cylinders**
Next by thread:
**Re: Displaying cylinders**
| |