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

Home » Public Forums » archive » 2D and 3D filled objects.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: 2D and 3D filled objects. [message #33466 is a reply to message #33373] Fri, 27 December 2002 09:16 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning (david@dfanning.com) writes:

> Well, then, how about this:
>
> 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-9.5)^2 + (y-9.5)^2 + (z-9.5)^2)
> indices = Where(sphere GT 0)
> sphere(indices) = 255

Whoops! I guess I should have tested that code. I was
distracted by the plumber telling me know what the problem
is in the bathroom. Let's just say the era of free advice
may be a thing of the past. :-(

Try this:

sphere = FltArr(40, 40, 40)
FOR x=0,19 DO FOR y=0,19 DO FOR z=0,19 DO $
sphere(x+10, y+10, z+10) = SQRT((x-9.5)^2 + (y-9.5)^2 + (z-9.5)^2)
indices = Where(sphere Lt 9.5 AND sphere NE 0)
sphere(indices) = 255

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: 2D and 3D filled objects.
Next Topic: Can't get an cell select event

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

Current Time: Sat Oct 11 15:28:59 PDT 2025

Total time taken to generate the page: 1.99888 seconds