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

Home » Public Forums » archive » objects in loop
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
objects in loop [message #23560] Wed, 31 January 2001 01:30
shearerm is currently offline  shearerm
Messages: 11
Registered: July 1999
Junior Member
I want to insert a bunch of spheres to represent instrument locations
into my model. At the moment I have something like:

for p=0,a do begin
ip = OBJ_NEW('orb',pos=[x(p), y(p), z(p)])
model -> ADD, ip
endfor

Where x, y and z are instrument coords.

This did work fine (although I guess it is not technically correct) I
could see all my instruments.

The problem is this bit of code is part of a program for creating
animations of data. When I want to change the instrument location I
destroy the model and recreate from scratch, which also works (for the
first couple of animations at least). However after a few loops IDL
turns into a memory gobbling monster, windows has a whine about running
out of memory and promptly collapses into a gibbering heap (this may be
because I am running 5.3 in Win2000?).

I think the solution might be to reuse the model after destroying only
the spheres that represent instrument location (since that is all I
really want to change). However because of the way I created the
spheres I can�t destroy them.

My question is therefore how do I create my spheres so that they are
all one object or automatically generate them with individual names?

Ps. I used to use mesh_obj to create the spheres but thanks to a recent
posting I now use orb, which is much neater!




Sent via Deja.com
http://www.deja.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: objects in loop
Next Topic: Fontifying large buffers in idlwave?

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

Current Time: Fri Oct 10 14:04:16 PDT 2025

Total time taken to generate the page: 0.00784 seconds