16
English proofreading and French Translation by Ioana Simina Giurginca (http://www.regulus.ro/cv-giurginca-simina.pdf ) COPERNICUS v1.6 Tutorial © 2004-2008 Marc Eduard Frîncu ([email protected] ) Website: http://www.regulus.ro/copernic/en/index.htm

Copernicus v1.6 Tutorial - Regulus.ro › copernic › en › copernicus-space-simulator.pdf · 5 Copernicus v1.6 Tutorial 4. Folder structure The application folder structure is

  • Upload
    others

  • View
    30

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Copernicus v1.6 Tutorial - Regulus.ro › copernic › en › copernicus-space-simulator.pdf · 5 Copernicus v1.6 Tutorial 4. Folder structure The application folder structure is

English proofreading and French Translation by Ioana Simina Giurginca (http://www.regulus.ro/cv-giurginca-simina.pdf)

COPERNICUS v1.6 Tutorial © 2004-2008 Marc Eduard Frîncu ([email protected])

Website: http://www.regulus.ro/copernic/en/index.htm

Page 2: Copernicus v1.6 Tutorial - Regulus.ro › copernic › en › copernicus-space-simulator.pdf · 5 Copernicus v1.6 Tutorial 4. Folder structure The application folder structure is

2 Copernicus v1.6 Tutorial

1. About Copernicus .................................................................................................................................. 3

2. Changes from previous versions ........................................................................................................... 4

3. Requirements ........................................................................................................................................ 4

4. Folder structure .................................................................................................................................... 5

5. How To .................................................................................................................................................. 6

5.1. Move the camera .......................................................................................................................... 6

5.2. Zoom ............................................................................................................................................. 6

5.3. Change the Global Zoom Level ..................................................................................................... 6

5.4. GoTo a chosen object.................................................................................................................... 7

5.5. Determine your position in the Solar System ............................................................................... 8

5.6. Change the Date............................................................................................................................ 9

5.7. Change the Location ................................................................................................................... 10

5.8. View the 2D Polar Projection Map .............................................................................................. 11

5.9. View a planet 3D surface ............................................................................................................ 12

5.10. Take a screenshot of your screen ........................................................................................... 13

5.11. Define your own custom objects ............................................................................................ 14

6. Keyboard keys used by Copernicus ..................................................................................................... 15

7. Known issues and bugs ....................................................................................................................... 15

8. Future developments .......................................................................................................................... 16

9. Acknowledgements ............................................................................................................................. 16

Page 3: Copernicus v1.6 Tutorial - Regulus.ro › copernic › en › copernicus-space-simulator.pdf · 5 Copernicus v1.6 Tutorial 4. Folder structure The application folder structure is

3 Copernicus v1.6 Tutorial

1. About Copernicus

Copernicus started as an undergraduate project during my studies at the West University of

Timişoara, Romania. It was presented at the Romanian Academy Days in Timişoara 2005 and

represented the basis of my license thesis in 2006. It was first developed in C/C++ using OpenGL

but migrated in 2006 to C# using DirectX9. However, the roots for its development can be traced

back to my high school years when I tried to create my own program for visualizing 3D stars and

planets. It has nevertheless grown up since then and now it offers a wide range of functions

such as:

a) moving through the Solar System and the Local Space

b) Constellation lines and Deep Sky Objects image billboards in Solar System view

c) 3D view of planetary surfaces (only Mercury, Venus, Earth and Mars for now as this

functionality is still merely experimental)

d) ability to view the planetary configuration for the Solar System at different times in the past

or future (the range is from 1st January 1753 until 31st December 9998)

e) realistic comet tails

f) 3D meshes of comets and asteroids

g) lens flares for the Sun

h) billboard images for the Deep Sky objects (all Messier and several NGC objects included)

i) GoTo function for Solar System bodies (all planets, asteroids and comets)

j) possibility to define your own custom objects and load them into the program. The

maximum number of objects that can be loaded is 30

k) visualize the present position in the Solar System using one of the two 2D viewing options:

Static-Mode or Follow-Mode

l) visualize a 2D Polar Projection Map of the sky as it is seen from Earth at the present time

The application allows the loading of 87,475 stars, 168 Deep Sky Objects, 500 trans-neptunes,

200 asteroids, 400 comets and 30 planetary moons at any given moment. Despite these

restrictions, the actual databases that come with the program include 10,986 asteroids and 755

trans-neptunes. The reason for not being all of them displayed is purely due to memory

concerns.

License: Copernicus is a freeware and so, it can be freely distributed without any warranty to

third parties and used in nonprofit actions according to GPL rules. The C# source code is

available on demand at [email protected].

Page 4: Copernicus v1.6 Tutorial - Regulus.ro › copernic › en › copernicus-space-simulator.pdf · 5 Copernicus v1.6 Tutorial 4. Folder structure The application folder structure is

4 Copernicus v1.6 Tutorial

Tests: It was tested on a Pentium IV Celeron with 3.06Ghz with 1 GB RAM and a video card

[todo] and on an AMD Turion 64x2 1600Mhz with 2 GB RAM and an ATI Radeon Express 1150

with 256Mb onboard video card. Both systems were using a Windows XP SP2 Operating System.

INFO: Since its release in 2004 Copernicus has been downloaded by more than 1.400 people all

around the world. It has been used successfully in schools, presentations and for own private

purposes.

2. Changes from previous versions

Copernicus has considerably changed since version 1.5. Mainly, its code has been entirely

rewritten in C# using DirectX as a graphics engine.

Also, some new features were added such as lens flares and 3D planetary maps. A whole new

way of navigating through the Solar System was introduced by inserting the 2D Solar System

Map in Static and Follow Mode.

Ever needed to define your custom objects? Sought an object (a space station or a space probe)

at a certain position in space? All these are now possible thanks to the customobjects file which

allows you to define your own objects.

The user interface has been improved with the possibility to take a screenshot of your

application display image.

Several changes regarding the algorithms used to compute planetary positions were also made.

The Black Hole present in version 1.5 was however removed. If you still want to look at it, feel

free to use that version.

3. Requirements

A machine with at least 1GB of RAM and a video card of 128Mb should be enough to run

Copernicus in a “smooth” manner.

Also .NET Framework 2.01 and Microsoft’s DirectX 92 are required to be installed on the

machine.

1 http://www.microsoft.com/downloads/details.aspx?FamilyID=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&displaylang=en

2 http://www.microsoft.com/downloads/details.aspx?familyid=2da43d38-db71-4c1b-bc6a-9b6652cd92a3&displaylang=en

Page 5: Copernicus v1.6 Tutorial - Regulus.ro › copernic › en › copernicus-space-simulator.pdf · 5 Copernicus v1.6 Tutorial 4. Folder structure The application folder structure is

5 Copernicus v1.6 Tutorial

4. Folder structure

The application folder structure is organized as follows:

\copernicus-1.6\

.\copernicus.exe

.\ Odyssey UI.dll

.\data\

.\media\

.\logs\

.\screenshots\

The copernicus.exe file is the application executable.

The data folder contains all the files needed by the application to load and compute the object’s

position in space. The files have the .dat extension, except the customobjects file which has the .txt

extension. Nevertheless, the format of the files is plain text and you can freely modify it by updating

or adding new objects.

The media folder comprises images used to display the billboard objects or the planetary

surfaces. It also consists of special .x files containing particular 3D meshes for asteroid

representation, space probes, space stations, 3D nebulae etc. It has the following sub-folders:

3sd\ - contains the .x files and the Microsoft’s 3ds to x converter conv3ds.exe

3dstextures\ - contains the textures for the .x files

ds\ - contains the Deep Sky Object billboard images (.jpg)

lens\ - contains the lens flare textures

moons\ - contains the planetary textures for the moons (.jpg)

other\ - contains various textures used for displaying the 2D Solar System map

planets\ - contains the planetary textures (.jpg)

stars\ - contains the textures for the stars (.jpg)

topo\ - contains the topographic textures for the planets. They are used to

compute the 3D height map. Their format is .bmp so the occupied

space is quite large.

The logs folder deals with all the logs generated by the application. They can be used for

debugging purposes. In case something goes wrong, just send me the log file and I will try to fix the

bug. One log is created per day so that you don’t get a folder with a large amount of files in it. The

log file name has the following format: ddmmyyy-copernicusLog.txt.

The screenshots folder contains all the screenshots of the application you have taken. For

instructions on how to take a screenshot, see paragraph 3.8.

Page 6: Copernicus v1.6 Tutorial - Regulus.ro › copernic › en › copernicus-space-simulator.pdf · 5 Copernicus v1.6 Tutorial 4. Folder structure The application folder structure is

6 Copernicus v1.6 Tutorial

5. How To

5.1. Move the camera

The camera can be easily moved by clicking the left button of your mouse and then dragging it in

the desired direction.

Another way of aiming your camera is by using the arrow keys. This can be healpful for adjusting the

camera orientation.

Take your time and experiment with this feature as some found it quite difficult to control it at

first.

5.2. Zoom

Zooming is achieved as easily as aiming the camera. Just click your right mouse button and drag your

mouse. Dragging towards you makes the camera zoom in, while dragging in the opposite direction

makes it zoom out.

Of course, once the camera is zooming, you may need to stop it otherwise it will take you to another

global zoom level (see 3.3 for further details) once the maximum distance for this level is reached.

This can be accomplished by pressing the key S (small or capital, it does not matter).

If for various reasons, you want to return to the initial camera coordinates – i.e. where the camera

was positioned when you first launched the application – press key I (“I” as in Input).

Take your time and experiment with this feature as some found it quite difficult to control it at

first.

5.3. Change the Global Zoom Level

So, you want to go beyond the borders of the Solar System? No problem. Just change the Global

Zoom Level according to your needs. Currently, there are four levels: PLANETSPACELEVEL,

SOLARSYSTEMLEVEL, LOCALSPACELEVEL and GALAXYSPACELEVEL.

The first one can only be reached if you come really close to a planet and is done automatically (see

3.7. for details).

The rest of them can be changed in one of the following ways:

- Automatically by the application: this means that if you zoom out farther enough from the Sun

for example, you will automatically be “transported” in the LOCALSPACELEVEL. The same is true

if you zoom out far enough in the LOCALSPACELEVEL and so on.

Page 7: Copernicus v1.6 Tutorial - Regulus.ro › copernic › en › copernicus-space-simulator.pdf · 5 Copernicus v1.6 Tutorial 4. Folder structure The application folder structure is

7 Copernicus v1.6 Tutorial

- Manually by the user: press key O and choose Zoom Level from the Copernicus Options Menu

(Image 5.1.), then select from the drop down list your desired level. Afterwards, press Ok for

confirming changes or Cancel if you want to abort.

Image 5.1. Manually changing the Global Zoom Level

The LOCALSPACELEVEL will show you thousands of stars in 3D space. Considering their number

and distances, they are only dots but if you come close to one of them you will actually be able

to see its image!

The GALAXYSPACELEVEL shows all those wonderful Deep Sky Objects you have been dreaming

about. The objects are displayed as billboards without any 3D content of themselves. Yet it is

great to move around all of them.

5.4. GoTo a chosen object

There are times when you are bored of wandering through the Solar System looking for various

objects and you just want to get to them. Easier done than said! All you need is to go in the

Copernicus Options Menu (Image 5.2.) and pick the GoTo option. You can choose between Planets,

Asteroids, Comets and Custom objects. Just select one and press Ok. You will automatically be

placed on its orbit. However, the camera may not be oriented properly so you might want to move it

a little bit until you are able to see the object you desired.

Page 8: Copernicus v1.6 Tutorial - Regulus.ro › copernic › en › copernicus-space-simulator.pdf · 5 Copernicus v1.6 Tutorial 4. Folder structure The application folder structure is

8 Copernicus v1.6 Tutorial

Image 5.2

5.5. Determine your position in the Solar System

The Solar System is a rather vast place even in a simulator such a Copernicus, so it is quite easy to

get lost. But do not worry, the application comes to your aid and offers you the option to view your

present location in a 2D Map. You will be able to see all the objects surrounding you as well as the Z

values of each of them, including your own. Why the Z value? Because the map is projected on the

XOY plane which causes the loss of the Z coordinate allowing you to navigate in space. Starting from

the 2D map and the Z value of both yourself and the other objects you should be able to navigate

your way through the Solar System.

Bringing up the 2D map is easy. Just press key M and you will see something similar to what is

exhibited in Image 5.3. However this does not end here. In this default viewing mode, all objects are

stationary and you are the one moving. Still, you can change this by pressing the Z key. This will

make you stationary and all the objects moving around you (Image 5.4.).

Hiding the 2D map is obtained by pressing the same keys once more.

Page 9: Copernicus v1.6 Tutorial - Regulus.ro › copernic › en › copernicus-space-simulator.pdf · 5 Copernicus v1.6 Tutorial 4. Folder structure The application folder structure is

9 Copernicus v1.6 Tutorial

Image 5.3. The 2D map of the Solar System in Static Mode

Image 5.4. The 2D map of the Solar System in Follow Mode

5.6. Change the Date

Copernicus does not confine you to viewing the Solar System for the current date only. It also allows

you to go for a date and check out how the Planets were positioned then. For that, just press key O

Page 10: Copernicus v1.6 Tutorial - Regulus.ro › copernic › en › copernicus-space-simulator.pdf · 5 Copernicus v1.6 Tutorial 4. Folder structure The application folder structure is

10 Copernicus v1.6 Tutorial

and choose DateTime from the Copernicus Options Menu (Image 5.5.). You can choose any date

ranging between January 1st 1753 and December 31st 9998. Remember however that the

algorithms used in computing the positions will suffer perturbations whenever the difference

between the current date and yours is significant.

Image 5.5. Changing the Date

5.7. Change the Location

Alright. So you can change the Date but that does not help very much people located on a different

Latitude or Longitude than I. No problem! This issue is also taken care of. To do this, you will use

again the Copernicus Options Menu (Image 3.6.) but by choosing My Location this time. You now

have the ability to define your own position by entering your Latitude and Longitude in the following

way:

o Latitude from 0° to 90° positive for North and negative for South.

o Longitude from 0° to 180° positive for East and negative for West.

In Image 5.6. you can see the coordinates for my position.

NOTE: You can define your coordinates as real numbers. Consequently, if, for example, you are

located at Longitude 20°15´ South, you can write this in the Options Menu as -20.25, where we have

converted the Longitude into degrees exclusively with the following fomula:

Long=Longdegrees+Longminutes/60+ Longseconds/3600 (5.1)

The same is true and equivalent for the Latitude.

Page 11: Copernicus v1.6 Tutorial - Regulus.ro › copernic › en › copernicus-space-simulator.pdf · 5 Copernicus v1.6 Tutorial 4. Folder structure The application folder structure is

11 Copernicus v1.6 Tutorial

Image 5.6. Changing one’s location

5.8. View the 2D Polar Projection Map

For those interested in discovering how the sky as seen from Earth looks like at the current time or

at custom given date and from a given place, the option of displaying a Polar Projection Map is at hand.

It can be seen by pressing key 2. In order to hide it, press again the same key. The map shows the

planets, the deep sky objects, the constellation lines and boundaries and the main stars. Its image is

overlapped on the Solar System Image. Image 5.7. shows how the map would be seen.

Page 12: Copernicus v1.6 Tutorial - Regulus.ro › copernic › en › copernicus-space-simulator.pdf · 5 Copernicus v1.6 Tutorial 4. Folder structure The application folder structure is

12 Copernicus v1.6 Tutorial

Image 5.7. Polar Projection Map

5.9. View a planet’s 3D surface

A quite new and daring feature is that of displaying a full 3D map of various planets. The planets

presently supported are Mercury, Venus, Earth and Mars. The map is conceived on the basis of a

topographic image of the planet on which the actual “real” texture has been placed. Nevertheless,

this feature is experimental and the maps might show some strange things such as oceans raised at

a higher level than the continents (for planet Earth for instance). But it is still a great improvement

that allows you to travel and actually see distant worlds!

In order to actually view a planet’s 3D surface (Images 5.8. and 5.9.) you must enter in the planet’s

atmosphere. The operation is quite simple: aim the camera towards one of the planets and zoom.

The program will automatically show you the surface once the planet’s edge is reached.

To go back to the Solar System or other Global Zoom Level, proceed as described in 5.3.

Page 13: Copernicus v1.6 Tutorial - Regulus.ro › copernic › en › copernicus-space-simulator.pdf · 5 Copernicus v1.6 Tutorial 4. Folder structure The application folder structure is

13 Copernicus v1.6 Tutorial

Image 5.8. First view of Mars’s 3D surface.

Image 5.9. Closer view of Venus’s surface. You can actually see the mountains and valleys!

5.10. Take a screenshot of your screen

There are times when you found something interesting or looking nice and you would have liked to

take a screenshot. Do not worry, Copernicus helps you in this direction too. Simply press key P and

an image is automatically saved in your screenshots folder. The image file name format is as follows:

Page 14: Copernicus v1.6 Tutorial - Regulus.ro › copernic › en › copernicus-space-simulator.pdf · 5 Copernicus v1.6 Tutorial 4. Folder structure The application folder structure is

14 Copernicus v1.6 Tutorial

ddmmyyy-screenshot-hh-mm-ss.bmp. Image 5.10. shows the screenshot of a comet crossing in front

of the Sun. Lens flares and comet tail are also visible. The size of the bmp image is 3Mb for a

1024x768 pixel image.

Image 5.10. Screenshot of a comet crossing in front of the Sun

5.11. Define your own custom objects

A nice feature of the applications is that they permit you to set your own data. Copernicus also

offers this functionality under the form of the customobjects.txt file located in the data folder. It

allows you to define your own object by giving it a name, the name of the mesh, the parent Id and its

coordinates.

The initial content of the file is displayed below. Apart from explanations on how to define your

data, it includes an illustration under the form of the Pioneer probe located in Earth’s orbit.

###################################Copernicus Space Simulator 2008##########################################

#####################Custom object file, author Marc Eduard Frincu [email protected] #######################

############################################################################################################

#

# This file is used to define custom objects that should appear in the simulator

# The format of the file is:

# objectName,meshName,parentObject,N,i,w,a,e,M,Epoch,scaleX,scaleY,scaleZ

#

# Where:

#

# objectName : is the name you want to give to your custom object

# meshName : is the name of the mesh file. This file should be placed inside the media/3ds/ folder. IMPORTANT: DO NOT ADD THE .x

EXTENSION. IT IS ADDED AUTOMATICALLY

Page 15: Copernicus v1.6 Tutorial - Regulus.ro › copernic › en › copernicus-space-simulator.pdf · 5 Copernicus v1.6 Tutorial 4. Folder structure The application folder structure is

15 Copernicus v1.6 Tutorial

# parentObject : is the object that your custom object orbits around. For now only Sun, Mercury, Venus, Earth, Mars, Jupiter, Uranus and

Neptune are suported

# N : the Longitude of Ascending Node in degrees

# i : the inclination in degrees

# w : the Argument at perihelion in degrees

# a : the semi-major axis. Units are km for planets and a.u. for Sun

# e : the excentricity of the orbit

# M : the Mean Anomaly in degrees

# Epoch : The epoch for which the data was computed

# scaleX : The X axis scale factor. Use 1 for no scale

# scaleY : The Y axis scale factor. Use 1 for no scale

# scaleZ : The Z axis scale factor. Use 1 for no scale

# If your object cannot be read an error will appear in your log file, but the application will not halt

Pioneer,pioneer,earth,120,20,20,30000,0.8,240,2000,0.01,0.01,0.01

6. Keyboard keys used by Copernicus

Copernicus uses several keys in order to allow quick user input. They are listed in table 6.1.

Key Description

Arrow keys Move the camera in the specified direction.

I Resets the camera’s position to the one it had when first starting the application.

S Stops camera movement.

M Shows the 2D Solar System map in Static-Mode. If pressed while the map is visible, it hides it.

Z Shows the 2D Solar System map in Follow-Mode. This key is only effective if key M had been pressed prior to it.

P Takes a screenshot of the application’s content and saves it to a file.

O Shows the Options Menu.

2 Displays the Polar Projection Map. If pressed while the map is visible, it will hide it.

Escape Exits the application.

Table 6.1. Important keys used by the application

7. Known issues and bugs

There is only one problem (known of) that might occur with Copernicus:

If the application runs for a large amount of times, it will, at one moment, “freeze”. However, this

state is only temporarily and is caused by the following error:

FATALERROR: Microsoft.DirectX.Direct3D

Page 16: Copernicus v1.6 Tutorial - Regulus.ro › copernic › en › copernicus-space-simulator.pdf · 5 Copernicus v1.6 Tutorial 4. Folder structure The application folder structure is

16 Copernicus v1.6 Tutorial

at Microsoft.DirectX.Direct3D.Device.PresentInternal(tagRECT* sourceRectangle, tagRECT* destRectangle,

IntPtr overrideWindow)

at Microsoft.DirectX.Direct3D.Device.PresentInternal(tagRECT* sourceRectangle, tagRECT* destRectangle,

Control overrideWindow)

at Microsoft.DirectX.Direct3D.Device.Present()

The current solution involves resetting the D3D Device in case this error appears. Resetting the

device is responsible for this freezing behavior.

8. Future developments

Copernicus has been being an ongoing personal project for more than four years now and I strongly

believe it has already reached a stable maturity. Obviously, improvements are always needed but

due to lack of time, progress is slow. Therefore, I encourage anyone who wishes to “play” with the

code of it to email me.

9. Acknowledgements

Copernicus was developed by me in order to be able to see one of my greatest dreams come true:

walking through stars. This would not have been possible without the aid of some special people to

whom I would like to express my gratitude and regards:

- Lect. Drd. Lucian Cucu, my license thesis advisor who gave me precious advice regarding the C

language and graphics

- Guerino Frîncu, my father who “transmitted” me the “bug” of programming and helped me

“deal“ with it

- Ioana-Simina Giurgincă, without whose collaboration I would not have been able to correct my

English misspellings and who supported me during all those long nights when I worked late.