
QUICK LUNEX v2 INFO WITH EXAMPLE

To use these POV programs, you need to install
POV-Win-3.7-AGPL3

And then Install
POV-Win-3.7-Editor-DLL


==============================================================================
LUNEX for POV-Ray (LUNar EXplorer) is a FREEWARE program script designed to
render high-quality, photo-realistic images of the moon from virtually any
perspective using the free, open-source POV-Ray v3.7.0 ray-tracing software.

To use LUNEX, you will need the POV-Ray rendering software to run the scripts
and optionally a simple graphics editor to add any desired text labels to the
rendered images or diagrams.

For information on POV-Ray, visit
the official POV-Ray web site at:
https://www.povray.org

LUNEX and POV-Ray are both open-source FREEWARE - No cost, ads or malware.

The program serves as a virtual telescope or spacecraft.

LUNEX is ideal for making customized lunar charts and diagrams for hobby or
educational purposes. It does not apply text labels. It simply renders your
customized user-defined 3D lunar scenes. Any simple image editor can be used
to easily add text labels to the rendered images.

------------------------------------------------------------------------------
IMPORTANT NOTES:

##############################################################################
THIS LUNEX 2 VERSION IS NOT BACKWARDS COMPATIBLE WITH ANY PREVIOUS VERSIONS.
##############################################################################

There are two kinds of scene templates.

==========================
DEFAULT-SCENE-TEMPLATE.pov

This template is used to create a new custom scene from scratch by changing
the initial default settings to your new settings used to create your scene.
Initially, the default rendering is a full moon in quick RenderMode 1. From
there, you make whatever changes it takes to create your own custom scene.

========================
EMPTY-SCENE-TEMPLATE.pov

You can save the complete settings in the SCENE DEFINITION PANEL as a plain
text file and then use this template to render them by simply replacing the
template text string (XXX_YYY_ZZZ) with the custom settings block.

------------------------------------------------------------------------------
When orienting the camera or eye, the moon is initially treated as if it was
a globe sitting on a table directly in front of you (at 238,857 miles away),
its average distance and viewed equatorially.

The sun moves clockwise in a circle around you from 0 to 360 degrees, where
zero degrees is directly ahead and 90 degrees is directly to the right, etc.
The phase angle is the position of the sun on the relative phase circle.

When the moon is in front of you at 0 degrees and the sun is directly behind
you, it is directly opposite the moon at 180 degrees, the greatest possible
separation.  That is why the full moon has the phase angle of 180 degrees.

---------------------------------
RELATIVE PHASE ANGLES

New           =   0 deg / 360 deg
First Quarter =  90 deg
Full          = 180 deg
Last Quarter  = 270 deg
New           = 360 deg / 0 deg

The lunar phase is always relative to the selenographic longitude of the
camera or eye.

Up/down/left/right movements and rotations assume you are looking at the
moon from the front, as we see it from Earth.

Mathematically, we are looking at the moon through a geocentric telescope
from the mean lunar distance of 238,857 miles. This is the default view.

You can control the precise lunar phase angle and the scene will be rendered
with natural-looking shading accordingly (in RenderMode 2).

The virtual telescope can also zoom in for a closer look at certain details.

Other lunar perspectives are possible by rotating the moon and/or relocating
the camera to allow viewing the moon from an external perspective that can
only be realized by a spacecraft.

The lunar globe can be rotated on its axis and/or the view centered on any
given selenographic coordinates anywhere from pole-to-pole over the entire
lunar surface.

If you move the camera (eye) the program automatically accounts for the 3D
distance and perspective change and the curvature of the lunar surface and
proper phase shading as viewed from the new location.

----------------------------------------------------------------------------
There is a subfolder within this LUNEX home folder containing some completed
demo scripts that can be copied, run, studied and edited any way you wish.

That folder is called:
! DEMO-SCRIPTS-AND-RENDERS

To run one of the demo scripts in POV-Ray, simply copy it into the LUNEX
home folder and run and execute it from there.  The image should also be
rendered and output into the same home folder.

You should only work with copies of the templates to protect against the
event of accidental loss or damage to the originals, since they are the
starting point for all projects.

================================
TO MAKE A NEW CUSTOM LUNEX SCENE

1 ... Make a copy of the 'DEFAULT-SCENE-TEMPLATE.pov' file in the LUNEX
      home folder and rename that copy to whatever name you wish to give
      your POV-Ray rendering.

2 ... Replace the default full moon settings in the SCENE DEFINITION PANEL
      with the settings required to create your custom scene by experiment-
      ing with the settings until you find the scene you want.

=============
QUICK EXAMPLE

There is a quick, ready-to-run script to render the full moon.

However, what if we wanted to view the hidden or far side of the moon instead
and view it in relative last quarter phase (270 deg) instead of full phase.


Copy the file:
DEFAULT-SCENE-TEMPLATE.pov

Then rename the copy to:
Far-Side-Phase-270.pov

We are looking at the moon with the eye at longitude zero degrees on the
lunar equator. We want to view the moon from the other side looking back.

To do this we locate the camera (eye) to the opposite side of the moon by
changing the camera longitude from its initial 0 (zero) value to 180.
There is no need to change the latitude value for this.


The initial selenographic camera (eye) coordinates
at the center of the view are:

   #declare CamLon  = +000.0; // -W/E+

We only need to change the camera longitude to 180 degrees, on the
opposite side of the moon.

   #declare CamLon  = +180.0; // -W/E+

To observe the far side at a relative last quarter phase, we next change
the phase angle from the default 180 degrees to 270 degrees.

   #declare PhaseAng = 270.0; // Range 0 to 360

It will render the far side in last quarter in quick preview RenderMode 1,
which does not fully render the terminator (shadow line) and uses a simple
bump map to speed up the preview process.

To see the final finished product, change the render mode to RenderMode 2.

Full RenderMode 2 uses a spherical isosurface with a height field to render
the properly shaded lunar surface can take considerably longer to finish.

The RenderMode setting is near the top of the SCENE DEFINITION PANEL, just
below the SurfaceMap selection setting.

1 = FAST 2D bump map for quick 3D previews at lower quality.
or
2 = SLOWER 3D isosurface + height field for maximum quality.

   #declare RenderMode = 2;

Now we should get a nice view of the far side of the moon in last quarter
phase.  That is what we would see during first quarter phase from Earth if
we were on the other side of the moon looking back from the same distance.


