Re: Visualization of a list of 3D points coordinates with

• To: mathgroup at smc.vnet.net
• Subject: [mg89319] Re: [mg89296] Visualization of a list of 3D points coordinates with
• From: Bob Hanlon <hanlonr at cox.net>
• Date: Thu, 5 Jun 2008 00:44:52 -0400 (EDT)

```data = RandomReal[{0, 1}, {10, 3}];

index = 2;(* 1 for x, 2 for y, 3 for z *)

minPtSize = 4;
maxPtSize = 8;
hueMin = .5;
hueMax = 1.;
valMin = Min[data[[All, index]]];
valMax = Max[data[[All, index]]];
d = valMax - valMin;

Show[Graphics3D[{
AbsolutePointSize[(maxPtSize - minPtSize) (#[[index]] - valMin)/
d + minPtSize],
Hue[(hueMax - hueMin) (#[[index]] - valMin)/d + hueMin],
Point[#]} & /@ data],
Axes -> True,
BoxRatios -> {1., 1., 0.4}]

Bob Hanlon

---- Alexei Boulbitch <Alexei.Boulbitch at iee.lu> wrote:
> Dear MathGroup members,
>
> I have a list containing 3D coordinates of a number of points, like this one
> lst={{3.30414, -2.86064, -2.54648}, {4.06572, 3.80403,
>    1.68897}, {-1.72822, -2.03097, -4.1024}, ...}
>
> I would like to visualize them by plotting them. To plot them as a set
> of points may be trivially done by say, ListPointPlot3D. Alternatively,
> it may be visualized as a set of spheres with unit radius and centered
> in the points specified by the list, e.g. in the point {3.30414,
> -2.86064, -2.54648}, in {4.06572, 3.80403, 1.68897} etc.
>
> Now comes the question. I would like to do it in such a way that the
> size (and may be the color) of each point or sphere would depend upon
> one of the coordinates (say, y). In other words, the size and the of the
> first point specified by lst with y=-2.86064 would be smaller than that
> of the second point that has y=3.80403. The color or darkness may also
> depend upon y. This would give a feeling of a perspective.
>
> Do you have an idea of how to do this?
>
> Best, Alexei
>
> --
> Alexei Boulbitch, Dr., habil.
> Senior Scientist
> IEE S.A.
> Material Development,
> ZAE Weiergewan
> 11, rue Edmond Reuter,
> L-5326 Contern,
> Luxembourg
> Tel.: +352 2454-2566
> Fax:  +352 2454-3566
> e-mail: alexei.boulbitch at iee.lu
>
> --
> This e-mail may contain trade secrets or privileged, undisclosed or
> otherwise confidential information. If you are not the intended
> recipient and  have received this e-mail in error, you are hereby
> notified that any review, copying or distribution of it is strictly
> prohibited. Please inform us immediately and destroy the original
>

```

• Prev by Date: Re: Visualization of a list of 3D points coordinates with a perspective
• Next by Date: Re: Re: SetOptions[TableForm] doesn't seem to work?
• Previous by thread: Re: Bug in Default[] or Bug in My Understanding?
• Next by thread: Re: HypergeometricPFQ - simplification