|
From: Noko P. <np...@an...> - 2007-05-24 10:10:34
|
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)=3D=3D=3D0: #m=3D3D matrix
display a red circle
elif m(i,j,k)=3D=3D1:
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=20
"label" object which can be used to place text at locations in space.
Bruce Sherwood
Noko Phala wrote:
> Hi,
>=20
> I would like to visualize a 3D Matrix (with numbers) using VPython. Is
> this possible?
>=20
> Regards,
>=20
> 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
|
|
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 > |
|
From: Bruce S. <Bru...@nc...> - 2007-05-24 16:31:25
|
I see I misspoke. It is the color attribute you would set (as well as the pos attribute). 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 > |
|
From: Noko P. <np...@an...> - 2007-05-25 07:09:18
|
Thank you. I think I will be fine from here -:) -----Original Message----- From: vis...@li... [mailto:vis...@li...] On Behalf Of Bruce Sherwood Sent: 24 May 2007 06:31 PM To: vis...@li... Subject: Re: [Visualpython-users] FW: 3D Matrix visualization and rotation I see I misspoke. It is the color attribute you would set (as well as=20 the pos attribute). 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)=3D=3D=3D0: #m=3D3D matrix > display a red circle > elif m(i,j,k)=3D=3D1: > 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=20 > "label" object which can be used to place text at locations in space. > > Bruce Sherwood > > Noko Phala wrote: > =20 >> Hi, >> >> I would like to visualize a 3D Matrix (with numbers) using VPython. Is >> =20 > > =20 >> this possible? >> >> Regards, >> >> Noko >> =20 > > ------------------------------------------------------------------------ > - > 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 > =20 ------------------------------------------------------------------------ - 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 |