From: Bruce S. <Bru...@nc...> - 2007-05-24 16:30:30
|
If you simply want to display spheres at specified locations, that's easy. Just give the "pos" attribute of the sphere as pos=(i,j,k). The label object isn't relevant (it's just for displaying text). See the VPython reference manual for more information, available at vpython.org and installed with VPython. Also see the tutorial available at vpython.org. Bruce Sherwood Noko Phala wrote > Instead of placing text, I would like to place objects (say spheres) > whose color depend on the numerical value of the entry at the position > (x,y,z). Something like: > for i in range (1,n): > for j in range (1,n): > for k in range (1,n): > if m(i,j,k)===0: #m=3D matrix > display a red circle > elif m(i,j,k)==1: > dislay a blue circle > else: > display a green circle > I gather from your response thatthis is probably possible with the > "label" functionality. > Thanks, > Noko Phala > > -----Original Message----- > From: vis...@li... > [mailto:vis...@li...] On Behalf Of > Bruce Sherwood > Sent: 24 May 2007 12:53 AM > To: vis...@li... > Subject: Re: [Visualpython-users] FW: 3D Matrix visualization and > rotation > > I'm not sure what question you're asking, but there does exist the > "label" object which can be used to place text at locations in space. > > Bruce Sherwood > > Noko Phala wrote: > >> Hi, >> >> I would like to visualize a 3D Matrix (with numbers) using VPython. Is >> > > >> this possible? >> >> Regards, >> >> Noko >> > > ------------------------------------------------------------------------ > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |