Discusiones sobre Productos NI

cancel
Showing results for 
Search instead for 
Did you mean: 

ANIMACION DE CIRCULO EN XY GRAPH

Solved!
Go to solution

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. 

Agradecería su ayuda y saludos a toda la comunidad. 

 

0 Kudos
Message 1 of 4
(285 Views)

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.

 

altenbach_0-1621409074265.png

 


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

@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):

 

altenbach_0-1621445671430.png

 


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

Muchas gracias, saludos 

0 Kudos
Message 4 of 4
(156 Views)