# 3D solar system simulator

**URL:** https://discourse.processing.org/t/3d-solar-system-simulator/5478
**Category:** Libraries
**Created:** [November 12, 2018, 5:52pm UTC](https://discourse.processing.org/t/3d-solar-system-simulator/5478 "2018-11-12T17:52:58Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![AidanLand](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/aidanland/32/614_2.png) [@AidanLand](https://discourse.processing.org/u/AidanLand)
#### Post date: [November 12, 2018, 5:52pm UTC](https://discourse.processing.org/t/3d-solar-system-simulator/5478/1 "2018-11-12T17:52:58Z")

</div>

**Hi,** I’m trying to build a 3d solar system simulator in processing ⭐ 🤔 . I was wondering what  
would be a good library to do this with. I want to be able to move around in my program and have moving objects in it. I’d also like to know if I if there is a way to have infinite mirror effects around the edges of the solar system. Instead of using processing to create the 3d objects, I would use .obj files for for the planets. Thanks! 🕶

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [November 12, 2018, 11:25pm UTC](https://discourse.processing.org/t/3d-solar-system-simulator/5478/2 "2018-11-12T23:25:17Z")

</div>

very good, would like to learn from you to improve my show

[http://kll.engineering-news.org/kllfusion01/articles.php?article\_id=154#here8](http://kll.engineering-news.org/kllfusion01/articles.php?article_id=154#here8)

of the objects/planets, also i still have problems with the orbits absolute angles  
( that is why i come here to the forum in the first place

> [@Sequence of rotation](https://discourse.processing.org/t/sequence-of-rotation/3184):
>
> does the sequence in what i use rotation matter? like by rotateZ(radians(alphaZ)); rotateY(radians(alphaY)); rotateX(radians(alphaX)); show\_object(); rotateX(radians(-alphaX)); rotateY(radians(-alphaY)); rotateZ(radians(-alphaZ));

) and initial settings (1.1.2000),  
the kepler elliptic orbits work.

![snap-083](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/5/519bf534a1674d4db8bff18443c41bf09c334dca.jpeg)  
( this one does not use a library,  
views , orbits, operation ( mouse and buttons ) are coded  
beginner style // difficult to read )

can you already show us some testcode?

---

<div class="post-metadata">

### Author: ![AidanLand](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/aidanland/32/614_2.png) [@AidanLand](https://discourse.processing.org/u/AidanLand)
#### Post date: [November 20, 2018, 8:27pm UTC](https://discourse.processing.org/t/3d-solar-system-simulator/5478/3 "2018-11-20T20:27:41Z")

</div>

Hi @Kll, sorry I wasn’t able to respond sooner all my attempts at creating it failed which is why I was wondering if I should be using a library. If I find any info about how this could be done a will be sure to reply back here!

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [November 21, 2018, 1:35am UTC](https://discourse.processing.org/t/3d-solar-system-simulator/5478/4 "2018-11-21T01:35:29Z")

</div>

> [@AidanLand](#):
>
> all my attempts at creating it failed

sorry, where you are stuck?  
are you talking about

- -a- astronomy / elliptic orbits / day position on these orbits ?
- -b- on your idea to make them look good ( by .obj .mtl .jpg )
- -c- with the operational view ( rotate zoom … )
- -d- realistic “galactic” background

i not know of any library so in my above version i did -a- and -c-  
manually, did you test it?

and if you read my blog you might have found my example  
for the moon  
-b- and -c- only: [moon\_obj](http://kll.engineering-news.org/kllfusion01/downloads/moon_obj.zip)

 ![snap-003](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/9/905dec163bcfbdd938a4e05e1a9f7d831d22463a.jpeg)

do you have all the ( planets ) data files already?

for -d- i must say it is a interesting idea, but again what data file you have already?  
did you ever test the processing globe example [my globe version](http://kll.engineering-news.org/kllfusion01/downloads/globe.zip)  
that is a sphere with a

```auto
globe.setTexture(earth);

```

using this picture  
 ![earth](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/1/10e3203cf62a49c77c8aa907de2774e82c4f75c0.jpeg)

why i repeat this? well did you ever try to zoom into the earth? what you see?  
so if you could get a photo “galaxy view from earth” but in this projection form  
you just make a big sphere, use the photo as texture and position yourself inside.  
and ready is your “planetarium” [untested idea]

---

<div class="post-metadata">

### Author: ![AidanLand](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/aidanland/32/614_2.png) [@AidanLand](https://discourse.processing.org/u/AidanLand)
#### Post date: [November 22, 2018, 1:31am UTC](https://discourse.processing.org/t/3d-solar-system-simulator/5478/5 "2018-11-22T01:31:35Z")

</div>

Right now I’m am using simple .obj sphere shaped files that have slightly different texture to them so I can tell what they are, and I was planning to replace them once the rest of the project is done. For the background I was just using a png image. Where I’m having trouble in it is being able to move around while scaling everything correctly. I also was want to have collision (for example have an asteroids crash into planets or each other.

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [November 22, 2018, 1:51am UTC](https://discourse.processing.org/t/3d-solar-system-simulator/5478/6 "2018-11-22T01:51:32Z")

</div>

> [@AidanLand](#):
>
> while scaling everything correctly

yes right,  
when you use the real numbers like orbit km and planet radius km  
you see nothing  
when i started cheating ( objects (radius) like \* 500 ), i run into problems,  
mercury run inside sun and moon inside earth  
so i cheated for sun radius and moon distance differently…
