# Discusiones sobre Productos NI

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## ANIMACION DE CIRCULO EN XY GRAPH

Hola, necesito de su ayuda, me dejaron de tarea hacer un programa en el que el usuario controle el movimiento de un circulo dentro de la grafica xy, que el usuario pueda elegir hacia donde se mueve el circulo (derecha, izquierda, arriba o abajo), y que dicho circulo este creado con seno y coseno, y no se como hacerlo.

El archivo es un ejemplo de lo que debemos hacer, en el el circulo se mueve únicamente en diagonal.

Message 1 of 4
(285 Views)

## Re: ANIMACION DE CIRCULO EN XY GRAPH

Way too much code! here's a quick example to draw a circle at a given posittion. (There is no need for sine and cosine, and if you need both, there is also this function!).

To move the ball [up down left right] as controlled by the user, you need four buttons, one for each direction. Keep the xy position in a shift register and increment/decrement x or y depending on which button is held down. Not shown.

Attached is quick rewrite how to draw a circle. Now implement the idea with the four buttons.

LabVIEW Champion. It all comes together in GCentral
What does "Engineering Redefined" mean??
Message 2 of 4
(230 Views)
Solution
Accepted by topic author dominguez0987

## Re: ANIMACION DE CIRCULO EN XY GRAPH

@altenbach wrote:

To move the ball [up down left right] as controlled by the user, you need four buttons, one for each direction. Keep the xy position in a shift register and increment/decrement x or y depending on which button is held down.

Here is how that could look like (direction buttons are switch until released):

LabVIEW Champion. It all comes together in GCentral
What does "Engineering Redefined" mean??
Message 3 of 4
(200 Views)

## Re: ANIMACION DE CIRCULO EN XY GRAPH

Muchas gracias, saludos

Message 4 of 4
(156 Views)