comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Number of pixels
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Number of pixels [message #33377] Wed, 25 December 2002 19:17
idlfreak is currently offline  idlfreak
Messages: 47
Registered: October 2001
Member
Hi...
I'm trying to create a binary 2D and 3D object. I tried to create a
sphere with array size of (20x20x20). The sphere obtained was not
binary but had different grey levels. Also, when i calculated the
total number of pixels in the sphere it was more than 8000 (20x20x20).
Why does the pixel count differ? Then what is the use of declaring an
array size of 20x20x20. how can i draw a sphere based on the pixel
count? i.e. a sphere of radius 50 means 50 pixels.

Please help me.

Regards,
Akhila.

P.S: The code i used to create a sphere is given below.

PRO sphere

sphere = FltArr(20, 20, 20)
FOR x=0,19 DO FOR y=0,19 DO FOR z=0,19 DO $
sphere(x, y, z) = SQRT((x-10)^2 + (y-10)^2 + (z-10)^2)
Shade_Volume, sphere, 8, vertices, polygons
Scale3, XRange=[0,20], YRange=[0,20], ZRange=[0,20]
image = PolyShade(vertices, polygons, /T3D)
TV, image
sphere = bytscl(sphere)
Image_Statistics, sphere, MASK = sphere, COUNT = cntsphere
print, 'cntsphere', cntsphere

END
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Accessing an ASCII database?
Next Topic: Number of Pixels

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:07:41 PDT 2025

Total time taken to generate the page: 0.00463 seconds