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

• To: mathgroup at smc.vnet.net
• Subject: [mg89327] Re: [mg89321] Re: Visualization of a list of 3D points coordinates with a perspective
• From: DrMajorBob <drmajorbob at att.net>
• Date: Fri, 6 Jun 2008 06:45:00 -0400 (EDT)
• References: <g25nta\$hu5\$1@smc.vnet.net> <39600.1212644089509.JavaMail.root@m08>

```Through is SO underutilised, don't you think? And why use Transpose then
Part, when Part does the job on its own?

lst = {{3.30414, -2.86064, -2.54648}, {4.06572, 3.80403,
1.68897}, {-1.72822, -2.03097, -4.1024}};
{ymin, ymax} = Through[{Min, Max}@lst[[All, 2]]]

Graphics3D[{Hue[0.8*(#[[2]] - ymin)/(ymax - ymin)],
Sphere[#, 1/(2 + #[[2]] - ymin)]} & /@ lst]

{-2.86064, 3.80403}

Bobby

On Wed, 04 Jun 2008 23:45:14 -0500, Jens-Peer Kuska
<kuska at informatik.uni-leipzig.de> wrote:

> Hi,
>
> lst = {{3.30414, -2.86064, -2.54648}, {4.06572, 3.80403,
>     1.68897}, {-1.72822, -2.03097, -4.1024}};
>
> and
> {ymin, ymax} = {Min[#], Max[#]} &[Transpose[lst][[2]]]
> Graphics3D[
>   {Hue[0.8*(#[[2]] - ymin)/(ymax - ymin)],
>      Sphere[#, 1/(2 + #[[2]] - ymin)]} & /@ lst]
>
> Regards
>    Jens
>
>
> Alexei Boulbitch 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
>>
>
>

--

DrMajorBob at longhorns.com

```

• Prev by Date: Re: Re: Clever Solution, How to quickly incorporate to
• Next by Date: Re: Bizarre Running Times
• Previous by thread: Re: Visualization of a list of 3D points coordinates with a perspective
• Next by thread: Re: Re: Re: Visualization of a list of 3D points coordinates with a perspective