• To: mathgroup at smc.vnet.net
• Subject: [mg107384] Re: [mg107350] A question about Graphics3D
• From: "David Park" <djmpark at comcast.net>
• Date: Thu, 11 Feb 2010 05:19:35 -0500 (EST)
• References: <14518777.1265791851281.JavaMail.root@n11>

```random3DPoint := Array[RandomReal, 3]
point3DSet = Table[random3DPoint, {5}];

To use different colors on the points you could use the VertexColors option
of Point:

Graphics3D[
{AbsolutePointSize[6],
Point[point3DSet,
VertexColors -> {Red, Red, Green, Green, Blue}]
}]

A second possibility is to extract sub-lists of points and color each list
individually:

Graphics3D[
{AbsolutePointSize[6],
Red, Point[Part[point3DSet, {1, 2}]],
Green, Point[Part[point3DSet, {3, 4}]],
Blue, Point[Part[point3DSet, 5]]
}]

The second question is not so easy. You could define little squares, circles
(Presentations has Circle3D and Disk3D), triangles, etc., as graphic
primitives and then use them instead of Points. One could define these as
'unit size' objects in the xy-plane and then use the geometric
transformations to scale, rotate and translate them into the place you want.
But the trouble with 2D objects in 3D space is orientation. First you have
to decide how to orient them and then their appearance depends on the
ViewPoint. If you happen to see them edge on they are nearly invisible.

David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/

From: Marwa Abd El-Wahaab [mailto:m.a.elwahaab at gmail.com]

Dear Sir,

I am a Mathematica 7 user.

I have two questions about Graphics3D[Point[my data]];

*First question:*
*
*
How can I color some points in my data in the above "Graphics3D" by
different colors?

*Second question:*

How can I represent some points also in my data in the above "Graphics3D" by
shapes like squares , some like triangles and some like circles ?