# How do I create a circle appears and floats circles but doesnt move out of the frame? something like the example below

**URL:** <https://discourse.processing.org/t/how-do-i-create-a-circle-appears-and-floats-circles-but-doesnt-move-out-of-the-frame-something-like-the-example-below/39290>\
**Category:** Coding Questions\
**Tags:** homework\
**Created:** [October 16, 2022, 4:43am UTC](https://discourse.processing.org/t/how-do-i-create-a-circle-appears-and-floats-circles-but-doesnt-move-out-of-the-frame-something-like-the-example-below/39290 "2022-10-16T04:43:38Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)\
**Post date:** [October 16, 2022, 10:50am UTC](https://discourse.processing.org/t/how-do-i-create-a-circle-appears-and-floats-circles-but-doesnt-move-out-of-the-frame-something-like-the-example-below/39290/7 "2022-10-16T10:50:58Z")

</div>

Hi @andreasarmiento,

This might help 😉

> [@Problems with my mini game](https://discourse.processing.org/t/problems-with-my-mini-game/21949/2):
>
> Hi, Welcome to the community! slight_smile Before trying to solve your problem, you are facing a well known problem where the structure of your code is actually describing [object oriented programming](https://en.wikipedia.org/wiki/Object-oriented_programming) : So object oriented programming is a way to structure your code by using objects to model the data that your are manipulating. In this special case, your are creating Balls, and a Ball is described as : a position (x and y coordinates on the screen) a speed (described as a vector, xDir and y…

---

_[View the full topic](https://discourse.processing.org/t/how-do-i-create-a-circle-appears-and-floats-circles-but-doesnt-move-out-of-the-frame-something-like-the-example-below/39290)._
