Hello all,
I need to build something that shows the interaction of about 100,000 objects. The objects need to display by position and color. I have x,y positions and colors programmed. What is the best way to display these items?
I saw some of the simulation programs, and that looks like that may be what I need. If you have some tips for hooking the simulations up to my objects please let me know.
I tried just turning on and off single pixels but the result was too small. I could do some math and turn on more then one pixel to make the display larger but I thought I'd ask if anyone had some ideas for a better way to do this.
Thanks,
Ron Teitelbaum
It's difficult to understand your needs. Is your data laid out in a grid? Can you have multiple objects with the same positions?
Depending on what you're trying to do, it might make sense to render them using OpenGL.
Josh
On Mar 27, 2006, at 1:44 PM, Ron Teitelbaum wrote:
Hello all,
I need to build something that shows the interaction of about 100,000 objects. The objects need to display by position and color. I have x,y positions and colors programmed. What is the best way to display these items?
I saw some of the simulation programs, and that looks like that may be what I need. If you have some tips for hooking the simulations up to my objects please let me know.
I tried just turning on and off single pixels but the result was too small. I could do some math and turn on more then one pixel to make the display larger but I thought I’d ask if anyone had some ideas for a better way to do this.
Thanks,
Ron Teitelbaum
Each object has its own unique position. The grid is calculated to get the x,y. I tell the display how long each row is and it plots each object on rows and columns. It is actually plotting in circles as it moves down a group of rows at a time. Color is determined by what the objects are doing. I will look at OpenGL.
Thanks,
Ron
_____
From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev-bounces@lists.squeakfoundation.org] On Behalf Of Josh Gargus Sent: Monday, March 27, 2006 2:52 PM To: Ron@USMedRec.com; The general-purpose Squeak developers list Subject: Re: Graphical Display of 100,000 objects
It's difficult to understand your needs. Is your data laid out in a grid? Can you have multiple objects with the same positions?
Depending on what you're trying to do, it might make sense to render them using OpenGL.
Josh
On Mar 27, 2006, at 1:44 PM, Ron Teitelbaum wrote:
Hello all,
I need to build something that shows the interaction of about 100,000 objects. The objects need to display by position and color. I have x,y positions and colors programmed. What is the best way to display these items?
I saw some of the simulation programs, and that looks like that may be what I need. If you have some tips for hooking the simulations up to my objects please let me know.
I tried just turning on and off single pixels but the result was too small. I could do some math and turn on more then one pixel to make the display larger but I thought I'd ask if anyone had some ideas for a better way to do this.
Thanks,
Ron Teitelbaum
Hi Ron,
i don't know if it really answers your problem, but maybe you should have a look at Kedama.
Nicolas
Thanks Nicolas,
I saw it but wasn't sure how difficult it would be to plug it in, and I was wondering if it was overkill, holding simulation functionality, when I already have objects doing the work.
Ron
-----Original Message----- From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev- bounces@lists.squeakfoundation.org] On Behalf Of nicolas cellier Sent: Monday, March 27, 2006 2:55 PM To: 'The general-purpose Squeak developers list' Subject: Re: Graphical Display of 100,000 objects
Hi Ron,
i don't know if it really answers your problem, but maybe you should have a look at Kedama.
Nicolas
Ron,
I saw it but wasn't sure how difficult it would be to plug it in, and I was wondering if it was overkill, holding simulation functionality, when I already have objects doing the work.
What do you mean by "plug it in"? Even you don't do the tile scripting, it should be much, much easier than "plug Open GL in".
-- Yoshiki
Yoshiki,
Ok I'll give it a try and see. I see that it's a 100x100 display, so 10,000 objects. Each object would be its own turtle, I suppose, and only the color needs to change, there is no movement. I'm thinking for what I'm trying to show that will probably be good.
Thanks,
Ron
-----Original Message----- From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev- bounces@lists.squeakfoundation.org] On Behalf Of Yoshiki Ohshima Sent: Monday, March 27, 2006 6:19 PM To: The general-purpose Squeak developers list Subject: Re: Graphical Display of 100,000 objects
Ron,
I saw it but wasn't sure how difficult it would be to plug it in, and I
was
wondering if it was overkill, holding simulation functionality, when I already have objects doing the work.
What do you mean by "plug it in"? Even you don't do the tile scripting, it should be much, much easier than "plug Open GL in".
-- Yoshiki
Ron,
Ok I'll give it a try and see. I see that it's a 100x100 display, so 10,000 objects. Each object would be its own turtle, I suppose, and only the color needs to change, there is no movement. I'm thinking for what I'm trying to show that will probably be good.
The size is only the default value. You can change it (err) by modifying the class method #defaultDimensions, and of course the turtles can overlap with each other, so you can have as many turtles as you like in 100x100 or any size of display.
If you create an eToys tile script that looks like:
turtle1 turtleCount <- 10000 Test turtle1 y < 50 Yes turtle1 color <- xxx No turtle1 color <- yyy
you'll see that you can change the individual turtles' color.
Oh, and don't forget to have the plugin (shared library). In practice, that is essential for practical performance. With the plugin, you should get 10-20 fps with 100,000 turtles moving on a 1GHz or such computer.
-- Yoshiki
Yoshiki,
I see the plugin http://macos.tuwien.ac.at:9009/1033496103.asHtml . I'm running windows. Do I need more then the dll placed in the main squeak directory?
Thanks for your help!
Ron Teitelbaum
-----Original Message----- From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev- bounces@lists.squeakfoundation.org] On Behalf Of Yoshiki Ohshima Sent: Tuesday, March 28, 2006 8:04 AM To: The general-purpose Squeak developerslist Subject: Re: Graphical Display of 100,000 objects
Ron,
Ok I'll give it a try and see. I see that it's a 100x100 display, so
10,000
objects. Each object would be its own turtle, I suppose, and only the
color
needs to change, there is no movement. I'm thinking for what I'm trying
to
show that will probably be good.
The size is only the default value. You can change it (err) by modifying the class method #defaultDimensions, and of course the turtles can overlap with each other, so you can have as many turtles as you like in 100x100 or any size of display.
If you create an eToys tile script that looks like:
turtle1 turtleCount <- 10000 Test turtle1 y < 50 Yes turtle1 color <- xxx No turtle1 color <- yyy
you'll see that you can change the individual turtles' color.
Oh, and don't forget to have the plugin (shared library). In practice, that is essential for practical performance. With the plugin, you should get 10-20 fps with 100,000 turtles moving on a 1GHz or such computer.
-- Yoshiki
Ron,
I see the plugin http://macos.tuwien.ac.at:9009/1033496103.asHtml . I'm running windows. Do I need more then the dll placed in the main squeak directory?
One of these should work with Kedama in the SqueakPlugin image. Just put it in the VM directory or the image directory.
-- Yoshiki
Yoshiki,
Ok I got it working in the squeak plugin image. That was kind of difficult; I'm still not very familiar with the SqueakLand stuff. I got the plugin image installed, then figured out I needed to change the vm preferences to remove the console. I followed your instructions on how to get an atom simulation going. That was fun.
So then I figured I'd try what you suggested. I'm also still new at this tile programming thing. I tried to build a test using the tiles, but couldn't get the color to drop into the true or false block. I finally figured out that I needed to pick up the full tile including the arrow before it would drop in.
The problem is that it appears that 10,000 turtles are still randomly placed. I have blanks spots. I tried 100,000 turtles and still had some blank spots. Is there a way to remove the random placement of turtles and get an even distribution? (I could probably figure this out on my own [I assume it's in the add turtle code], but if you have a trick up your sleeve, or a place to start, that makes it easier please let me know)
This looks very much like something I could use, but is it possible to run this in a regular squeak image, including the plug in? That's where my objects are.
Thanks for your help!
Ron Teitelbaum
-----Original Message----- From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev- bounces@lists.squeakfoundation.org] On Behalf Of Yoshiki Ohshima Sent: Tuesday, March 28, 2006 8:46 AM To: The general-purpose Squeak developers list Subject: Re: Graphical Display of 100,000 objects
Ron,
I see the plugin http://macos.tuwien.ac.at:9009/1033496103.asHtml . I'm running windows. Do I need more then the dll placed in the main squeak directory?
One of these should work with Kedama in the SqueakPlugin image. Just put it in the VM directory or the image directory.
-- Yoshiki
On 28.03.2006, at 19:24, Ron Teitelbaum wrote:
Yoshiki,
Ok I got it working in the squeak plugin image. That was kind of difficult; I'm still not very familiar with the SqueakLand stuff. I got the plugin image installed, then figured out I needed to change the vm preferences to remove the console. I followed your instructions on how to get an atom simulation going. That was fun.
So then I figured I'd try what you suggested. I'm also still new at this tile programming thing. I tried to build a test using the tiles, but couldn't get the color to drop into the true or false block. I finally figured out that I needed to pick up the full tile including the arrow before it would drop in.
The problem is that it appears that 10,000 turtles are still randomly placed. I have blanks spots. I tried 100,000 turtles and still had some blank spots. Is there a way to remove the random placement of turtles and get an even distribution? (I could probably figure this out on my own [I assume it's in the add turtle code], but if you have a trick up your sleeve, or a place to start, that makes it easier please let me know)
This looks very much like something I could use, but is it possible to run this in a regular squeak image, including the plug in? That's where my objects are.
All Kedama code is in 3.9a (to be tested and debugged), but the regular VM does not contain the Kedama Plugin, as much as I know.
Marcus
Thanks Marcus,
That's good to know. I'm not sure how the VM interacts with the DLL. Do you know if the VM itself have to change? Does it make sense to integrate Kedama and not support the plugins? Yoshiki said it will work without it just not very well.
Ron Teitelbaum
From: Marcus Denker Sent: Tuesday, March 28, 2006 12:36 PM
On 28.03.2006, at 19:24, Ron Teitelbaum wrote:
Yoshiki,
Ok I got it working in the squeak plugin image. That was kind of difficult; I'm still not very familiar with the SqueakLand stuff. I got the plugin image installed, then figured out I needed to change the vm preferences to remove the console. I followed your instructions on how to get an atom simulation going. That was fun.
So then I figured I'd try what you suggested. I'm also still new at this tile programming thing. I tried to build a test using the tiles, but couldn't get the color to drop into the true or false block. I finally figured out that I needed to pick up the full tile including the arrow before it would drop in.
The problem is that it appears that 10,000 turtles are still randomly placed. I have blanks spots. I tried 100,000 turtles and still had some blank spots. Is there a way to remove the random placement of turtles and get an even distribution? (I could probably figure this out on my own [I assume it's in the add turtle code], but if you have a trick up your sleeve, or a place to start, that makes it easier please let me know)
This looks very much like something I could use, but is it possible to run this in a regular squeak image, including the plug in? That's where my objects are.
All Kedama code is in 3.9a (to be tested and debugged), but the regular VM does not contain the Kedama Plugin, as much as I know.
Marcus
On 28.03.2006, at 20:18, Ron Teitelbaum wrote:
Thanks Marcus,
That's good to know. I'm not sure how the VM interacts with the DLL. Do you know if the VM itself have to change? Does it make sense to integrate Kedama and not support the plugins? Yoshiki said it will work without it just not very well.
Best would be to have Kedama as an external package to load. But this was not possible to do: Either SqueakLand with Kedama or no SqueakLand sync. Refactoring Kedama was not possible to do in the short time (and it is, to be honest, not my job). Thus I decided for adding Kedama for now.
As for the vm-plugin: I think you just need to get the kedama plugin and put it into the path where the other plugins are and it should work.
To have it part of VMaker, Yoshiki would needs to coodinate that with Tim, if he's interested in having the plugin be part of the standard vm.
Marcus
On 28-Mar-06, at 11:04 AM, Marcus Denker wrote:
As for the vm-plugin: I think you just need to get the kedama plugin and put it into the path where the other plugins are and it should work.
That *should* be generally true. The plugin mechanism was designed to allow for internal and external plugins and all of them should work either way. For example, win32 VMs are typically delivered with all plugins made internal and this linked into the single .exe file. This is done because we know most win32 users are going to be terribly confused by a large number of files and wold probably delete most of them and then complain about stuff not working. Mac VMs come with most plugins made internal but some as external, which is probably historical - the osx bundle idea makes it easy to have a large collection of files hidden in what looks like a single file. The RISC OS vm application comes with all plugins external and uses the original application bundle idea to hide all the complexity. The unix vm... ech, I don't have the patience to care about unix anymore.
Note that an external plugin will override an internal one; so we can distribute bug fixes in plugins by sticking an external copy of (say) FilePlugin in the right place and next time FilePlugin is *loaded* the external one will be found and bound in. Note the *loaded* qualifier. If you are running an image that has done anything to use FilePlugin then the plugin is bound and you would have to explicitly unload it - SmalltalkImage current unloadModule: 'FilePlugin' - before it could be replaced with the new version. Plugins are *supposed* to be unloadable but I'd bet there is at least one that isn't, just on general principles.
To have it part of VMaker, Yoshiki would needs to coodinate that with Tim, if he's interested in having the plugin be part of the standard vm.
In general if a plugin is reasonably stable and reasonably broadly useful then it would be sensible to add it to the VMMaker package. A plugin still in early stages of development and undergoing rapid changes would not be a good candidate. A plugin for connecting to an obscure database only used by tapeworm biologists in Elbonia would probably not be.
tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Make sure your code "does nothing" gracefully.
On 28-Mar-06, at 11:30 AM, tim Rowledge wrote:
Note that an external plugin will override an internal one; so we can distribute bug fixes in plugins by sticking an external copy of (say) FilePlugin in the right place and next time FilePlugin is *loaded* the external one will be found and bound in.
To clarify on the mac vm universal series of VMs 3.8.11bx the plugin is first looked for in the bundle's resource folder, then externally in the Plugins folder outside the bundle. This was changed from 3.8.10 or earler because likely loose plugins floating about are powerpc only and won't load on the MacIntel boxes thus causing mass confusion. Therefore to override the supplied plugin you need to read this note or earlier notes...
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com 1-800-477-2659 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
Tim,
I couldn't have made up my mind, but now I think it is good idea to include the Plugin into the VMMaker. Especially because the redesigned new version in Tweak is working so the old one can be frozen^^;
Would you include the attached changeset? Thank you!
-- Yoshiki
Ron,
The problem is that it appears that 10,000 turtles are still randomly placed. I have blanks spots. I tried 100,000 turtles and still had some blank spots. Is there a way to remove the random placement of turtles and get an even distribution? (I could probably figure this out on my own [I assume it's in the add turtle code], but if you have a trick up your sleeve, or a place to start, that makes it easier please let me know)
The easiest thing is to drop a painting onto a Kedama World. Draw a big (bigger than 200x200) blob by the painting tool, and drop it onto a Kedama World so that the painting covers it. Then turtles are created at all grid point of the Kedama World.
-- Yoshiki
Yoshiki,
Thank you. That is a nice trick!
Ron Teitelbaum
-----Original Message----- From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev- bounces@lists.squeakfoundation.org] On Behalf Of Yoshiki Ohshima Sent: Tuesday, March 28, 2006 5:26 PM To: The general-purpose Squeak developers list Subject: Re: Graphical Display of 100,000 objects
Ron,
The problem is that it appears that 10,000 turtles are still randomly placed. I have blanks spots. I tried 100,000 turtles and still had
some
blank spots. Is there a way to remove the random placement of turtles
and
get an even distribution? (I could probably figure this out on my own
[I
assume it's in the add turtle code], but if you have a trick up your
sleeve,
or a place to start, that makes it easier please let me know)
The easiest thing is to drop a painting onto a Kedama World. Draw a big (bigger than 200x200) blob by the painting tool, and drop it onto a Kedama World so that the painting covers it. Then turtles are created at all grid point of the Kedama World.
-- Yoshiki
Ron, tough it is not squeak related, if you can code in python I've made a very simple opengl-based library called 'devachan':
http://www.cesaremarilungo.com/sw/devachan
10,000 objects represented as squares are 20,000 triangles, which is not a problem for opengl accelerated cards.
The source code is in c and it's so easy to understand and modify that you can easily add a specific function to draw your grid (and modify the color of each square) in c to overcome the performance limitation of the python interpreter.
If you want you can control the animation from squeak via OSC (devachan can display its content in a system window as well as in fullscreen).
Cheers,
Cesare
Ron Teitelbaum wrote:
Yoshiki,
Ok I'll give it a try and see. I see that it's a 100x100 display, so 10,000 objects. Each object would be its own turtle, I suppose, and only the color needs to change, there is no movement. I'm thinking for what I'm trying to show that will probably be good.
Thanks,
Ron
-----Original Message----- From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev- bounces@lists.squeakfoundation.org] On Behalf Of Yoshiki Ohshima Sent: Monday, March 27, 2006 6:19 PM To: The general-purpose Squeak developers list Subject: Re: Graphical Display of 100,000 objects
Ron,
I saw it but wasn't sure how difficult it would be to plug it in, and I
was
wondering if it was overkill, holding simulation functionality, when I already have objects doing the work.
What do you mean by "plug it in"? Even you don't do the tile scripting, it should be much, much easier than "plug Open GL in".
-- Yoshiki
c.
squeak-dev@lists.squeakfoundation.org