Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: Graphics3D. How to join random points with a single line

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113087] Re: Graphics3D. How to join random points with a single line
  • From: Patrick Scheibe <pscheibe at trm.uni-leipzig.de>
  • Date: Tue, 12 Oct 2010 13:50:28 -0400 (EDT)

Usually I never do someones homework!!

liste[n_] :== RandomReal[{0, 1}, {n, 3}];
points[n_] :== With[{pts == liste[n]}, Graphics3D[{PointSize[0.03], Table[
      {Hue[i/n], Point[pts[[i]]]}, {i, 1, n}]},
    PlotRange -> {{0, 1}, {0, 1}, {0, 1}}]
   ];
ligne[n_] :==
 With[{pts == liste[n]}, Graphics3D[{Line[pts], PointSize[0.03], Table[
     {Hue[i/n], Point[pts[[i]]]}, {i, 1, n}]},
   PlotRange -> {{0, 1}, {0, 1}, {0, 1}}]
  ]

Cheers
Patrick




On Oct 12, 2010, at 6:06 PM, Deepsstroat Blade wrote:

> Hello,
> i tried. but it only works if i am generation only one random point for H=
ue and that my list of point is know.
> The liste of points is random as week for thte coordonate and for the num=
ber of points.
> And i need all the points genereted to be of a different color. Then i wa=
nt i line to link them.
> I have enclose a pdf so you can see what i need to do. It s in french but=
 you have the graphics which will hekp you have an idea
>
>
> lnci
>
>
>
>  
> > Subject: Re: [mg113066] Graphics3D. How to join random points with a si=
ngle line
> > From: pscheibe at trm.uni-leipzig.de
> > To: deepstroat at hotmail.com
> > CC: mathgroup at smc.vnet.net
> > Date: Tue, 12 Oct 2010 11:24:56 +0200
> >
> > Hi,
> >
> > create the list of random points and then use it like that:
> >
> > pts == RandomReal[{-1, 1}, {10, 3}];
> > Graphics3D[
> > {PointSize[0.05], {Hue[RandomReal[]], Point[#]} & /@ pts, Line[pts]}]
> >
> > > I have a work. I need to have n points with different color. ANd then=
 i need to link them with the same line.
> > > NB: i don t even know if my way is ok.
> > > thx
> >
> > I think I don't completely get what you want if it's something differen=
t
> > from what I showed above. Can you explain it a bit better?
> >
> > Cheers
> > Patrick
> >


  • Prev by Date: discrete numerical 2D gradient
  • Next by Date: Re: What is the ESC sequence for the "Matching Double Brakets"? From
  • Previous by thread: Re: Graphics3D. How to join random points with a single line
  • Next by thread: Re: Why I keep getting error exporting notebooks to HTML? Crashes