MathGroup Archive 1996

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

Search the Archive

Re: Graphics3D

  • To: mathgroup at smc.vnet.net
  • Subject: [mg5417] Re: Graphics3D
  • From: Jens Potschadtke <Jens.Potschadtke at stud.uni-erlangen.de>
  • Date: Sat, 7 Dec 1996 00:25:45 -0500
  • Organization: Institute for Biomedical Engineering at the FAU Erlangen
  • Sender: owner-wri-mathgroup at wolfram.com

Rick Tschudin wrote:
> 
> I defined 4 Points , created a List of them and used Show to display
> them. This worked nicely. Then I defined 3 Lines, created a list of
> lines and tried to use Show to display them.  Can anyone tell me why
> this failed and how to succeed. Thanks for your time.
> 
>         AAP = Point[{5.66, 18.33, -5.66}];
>         BBP = Point[{8, 17.5, 0}];
>         CCP = Point[{6.36, 17, 6.36}];
>         DDP = Point[{0, 16.75, 9.75}];
>         pts1 = {AAP,BBP,CCP,DDP};
> 
>         Show[ Graphics3D[List[pts1]]]
> 
>         AAPBBP = Line[{{AAP},{BBP}}];
>         BBPCCP = Line[{{BBP},{CCP}}];
>         CCPDDP = Line[{{CCP},{DDP}}];
> 
>         lns1 = {AAPBBP,BBPCCP,CCPDDP};
> 
>         Show[ Graphics3D[Line[lns1]]]
> 
>         Graphics3D::nlist3:
>            Line[{{Point[{-1.18, 27.5, -1.18}]}, {Point[<<1>>]}}]
>              is not a list of three numbers.
Hi Rick!
The error message pointed it out: Line[] expects a list of three
Numbers.
How to work around:

  AAP = {5.66, 18.33, -5.66}; (*only the coordinates*)
  BBP = {8, 17.5, 0};
  CCP = {6.36, 17, 6.36};
  DDP = {0, 16.75, 9.75};
  pts1 = Map[Point,{AAP,BBP,CCP,DDP}]; (*wraps Point[] around each
member*)

To draw the lines:

   AAPBBP = Line[{AAP,BBP}];
   BBPCCP = Line[{BBP,CCP}];
   CCPDDP = Line[{CCP,DDP}];

   lns1 = {AAPBBP,BBPCCP,CCPDDP};
   (* or in this case only one line code is enough: lnsl
=Line[aap,bbp,ccp,ddp]; *)
Show all:

   Show[ Graphics3D[{pts1,lns1}]];

I hope this will work 'cause I didn't try it in MMA.

-- 
Jens Potschadtke

Institute for biomedical engineering at the FAU Erlangen (germany).

mailto:Jens.Potschadtke at stud.uni-erlangen.de
http://www.uni-erlangen.de/~sz0438/


  • Prev by Date: Re: Graphics3D
  • Next by Date: How can I use different symbols to reperesent my 2D data?
  • Previous by thread: Re: Graphics3D
  • Next by thread: Combinations function?