Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning forum!
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
• Campbell Ritchie
• Tim Cooke
• Paul Clapham
• Devaka Cooray
• Bear Bibeault
Sheriffs:
• Junilu Lacar
• Knute Snortum
• Liutauras Vilda
Saloon Keepers:
• Ron McLeod
• Stephan van Hulst
• Tim Moores
• Tim Holloway
• Piet Souris
Bartenders:
• salvin francis
• Carey Brown
• Frits Walraven

# Fluid Motion Moving Circles Smooth -solved-

Greenhorn
Posts: 15
I have a circle that follows another circle controlled by the user. But, the following circle works but can only move in angles. Is there any examples out there or some tips you can give me to have circles move fluidly.

x,y is the user controlled circle.
xpos,ypos is the following circle.

Here is my class:

[ October 25, 2007: Message edited by: Mark Quin ]
[ October 25, 2007: Message edited by: Mark Quin ]

author
Posts: 14112
So you want that circle to move at a fixed speed in the direction of the other circle?

I imagine there is a simple solution using Pythagoras' theorem.

Mark Quin
Greenhorn
Posts: 15
So, a^2+b^2=c^2 some how can make fluid movement? Unlike of the current 45 deg angles that the ball loves to move in. Interesting, I wonder if I can find anything about how to implement it.

Are there any simple examples or links to them?

[ October 25, 2007: Message edited by: Mark Quin ]

solved, Just had to change some thing and make them doubles. =)
[ October 25, 2007: Message edited by: Mark Quin ]

 I'm gonna teach you a lesson! Start by looking at this tiny ad: Two software engineers solve most of the world's problems in one K&R sized book https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton