MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: A question about Graphics3D

  • To: mathgroup at
  • Subject: [mg107384] Re: [mg107350] A question about Graphics3D
  • From: "David Park" <djmpark at>
  • 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:

   VertexColors -> {Red, Red, Green, Green, Blue}]

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

  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  

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

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 ?

I need your advice.

Marwa Ali

  • Prev by Date: Re: Upright \[Micro] in AxesLabel
  • Next by Date: Re: Exception message from java: MathLink connection was lost.
  • Previous by thread: Re: A question about Graphics3D
  • Next by thread: Checking that MathKernel is still running