How can I programmatically draw new circles on an image control

Hi, I'm fairly new LV and programming in general. I'm creating a program to get better. In this program, I have balls bouncing around on an image control. I use a table to keep track of the ball position (x, y) and the other to follow their speed. I want that whenever a ball reaches the border of the image, it splits into 2 balls. My problem is that I can't find a way to programmatically add these new balls for each draw circle screw must be serialy connected and then drawn on the image. What Miss me?

You need to iterate over your table of bullets.  This means that the use of automatic indexation.  Now, you have no reason of wire with a value of N in the loop For.  And wiring of this value to the array Index function gives you invalid data it's either nothing, or the ball even if it exists in the table.

I cleaned up a few other things in your code.

1 cancel the function.  No need to multiply by-1.

An array of Index 2.  It is expandable.  Drag the bottom border down.

Your next bit of code to add would be where you decide to add another ball and put it in the Position and speed tables.

Tags: NI Software

Similar Questions

Maybe you are looking for