# Earth to move in it's orbit

**URL:** https://discourse.processing.org/t/earth-to-move-in-its-orbit/1379
**Category:** Coding Questions
**Created:** [June 30, 2018, 8:17am UTC](https://discourse.processing.org/t/earth-to-move-in-its-orbit/1379 "2018-06-30T08:17:19Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![akash](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@akash](https://discourse.processing.org/u/akash)
#### Post date: [June 30, 2018, 8:17am UTC](https://discourse.processing.org/t/earth-to-move-in-its-orbit/1379/1 "2018-06-30T08:17:19Z")

</div>

![EARTH](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/1X/808bf87af11e582cf1dc3611609acb90c77d6194.jpg)  
I have two ellipse.  
one is larger ellipse and another is smaller ellipse.  
i want smaller ellipse to follow the path of the larger ellipse. Your suggestions are needed?.  
( i am a beginner).

---

<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: [June 30, 2018, 9:36am UTC](https://discourse.processing.org/t/earth-to-move-in-its-orbit/1379/2 "2018-06-30T09:36:42Z")

</div>

If you have an ellipse like this :

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/1X/abcf335d85ccfbb3b9ccf1300523c1b7fa9a8356.png)

You have the coordinates of your smaller ellipse with this formula :

![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/1X/ba0fc90b9c22dcada602c18d2f7dcb970e273e79.jpg)

Example :

```auto
float t = 0;
int a = 150;
int b = 100;

void setup(){
  size(400,400);
}

void draw(){
  background(255);
  translate(width/2,height/2);
  
  noFill();
  ellipse(0,0,a*2,b*2);
  
  fill(0,0,255);
  ellipse(a*cos(t),b*sin(t),10,10);
  
  t += 0.01;
}

```

You can find further informations on : [https://en.wikipedia.org/wiki/Ellipse](https://en.wikipedia.org/wiki/Ellipse)

---

<div class="post-metadata">

### Author: ![akash](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@akash](https://discourse.processing.org/u/akash)
#### Post date: [June 30, 2018, 4:09pm UTC](https://discourse.processing.org/t/earth-to-move-in-its-orbit/1379/3 "2018-06-30T16:09:45Z")

</div>

Thanks a lot for reply, with the suggestion you gave I successfully made whole solar system. However, all the planets are revolving with same speed. I want their speeds to be varied with each other. Your suggestion is required.

---

<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: [June 30, 2018, 4:11pm UTC](https://discourse.processing.org/t/earth-to-move-in-its-orbit/1379/4 "2018-06-30T16:11:17Z")

</div>

> [@akash](#):
>
> I want their speeds to be varied with each other.

Just create separate variables for each planets :

```auto
float t_sun, t_venus, t_mars ...

```

And increment them differently.

---

<div class="post-metadata">

### Author: ![akash](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@akash](https://discourse.processing.org/u/akash)
#### Post date: [July 3, 2018, 6:10pm UTC](https://discourse.processing.org/t/earth-to-move-in-its-orbit/1379/5 "2018-07-03T18:10:35Z")

</div>

My face detection is not working? Suggestion needed

 ![](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/1X/a8d31b7cef93efe2d35a20897da84853de46331a.jpg)

---

<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: [July 3, 2018, 7:14pm UTC](https://discourse.processing.org/t/earth-to-move-in-its-orbit/1379/6 "2018-07-03T19:14:51Z")

</div>

Hey,

Can you post your code using `<\>` in the message editor and press `Ctrl+T` in the processing IDE ?  
Don’t take pictures, take screenshots.

---

<div class="post-metadata">

### Author: ![akash](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@akash](https://discourse.processing.org/u/akash)
#### Post date: [July 4, 2018, 11:52am UTC](https://discourse.processing.org/t/earth-to-move-in-its-orbit/1379/7 "2018-07-04T11:52:43Z")

</div>

Is it necessary to install openCv to use openCv library for processing

---

<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: [July 4, 2018, 2:24pm UTC](https://discourse.processing.org/t/earth-to-move-in-its-orbit/1379/8 "2018-07-04T14:24:38Z")

</div>

Yes, go to `Sketch > Import a library > Add a library > install OpenCV`.

---

<div class="post-metadata">

### Author: ![akash](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@akash](https://discourse.processing.org/u/akash)
#### Post date: [July 14, 2018, 3:27pm UTC](https://discourse.processing.org/t/earth-to-move-in-its-orbit/1379/9 "2018-07-14T15:27:52Z")

</div>

what is the meaning of  
Client thisclient=myserver.available() ?

i am not getting the significance and meaning of available()

---

<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: [July 14, 2018, 4:24pm UTC](https://discourse.processing.org/t/earth-to-move-in-its-orbit/1379/10 "2018-07-14T16:24:01Z")

</div>

Go check out the documentation on the Network library (it is very helpful) 🙂 :

- [https://processing.org/reference/libraries/net/index.html](https://processing.org/reference/libraries/net/index.html)
- [https://processing.org/reference/libraries/net/Client\_available\_.html](https://processing.org/reference/libraries/net/Client_available_.html)
