MathGroup Archive 2002

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

Search the Archive

Re: a visualization problem in Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg38366] Re: a visualization problem in Mathematica
  • From: "Borut L" <gollum at email.si>
  • Date: Fri, 13 Dec 2002 04:09:07 -0500 (EST)
  • References: <at4e6d$f34$1@smc.vnet.net> <at9c5g$ptp$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

I like this intuitive solution


Thank you


"Selwyn Hollis" <hollisse at mail.armstrong.edu> wrote in message
news:at9c5g$ptp$1 at smc.vnet.net...
| Borut,
|
| If you're willing to use a less "primitive" approach...
|
| First let's assume the radius is 1 and define
|
|   p[t_] := (1 - t)*p1 + t*p2
|
| and
|
|   curve[p1_,p2_] :=
ParametricPlot3D[Evaluate[Flatten[{p[t]/Sqrt[p[t].p[t]],
|      Thickness[0.01]}]], {t, 0, 1}, DisplayFunction->Identity]
|
| This generates random points for testing:
|
|     randompoint := Module[{u=2*Pi*Random[], v=Pi*Random[]},
|       {Cos[u]Sin[v], Sin[u]Sin[v], Cos[v]}]
|
| Now,
|
|     <<Graphics`Shapes`;
|     wiresphere=WireFrame[{GrayLevel[.7],Sphere[]}];
|
|     p1 = randompoint
|     p2 = randompoint
|     Show[wiresphere, curve[p1,p2]]
|
|
| Cheers,
| Selwyn Hollis




  • Prev by Date: Re: The number of solutions to n_1 + n_2 + n_3 + ... + n_k = m
  • Next by Date: Re: Why can't Mathematica find this root?
  • Previous by thread: RE: a visualization problem in Mathematica
  • Next by thread: Solve and using the solutions further