• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

  • sources
  • kde-4.12
  • kdeedu
  • kstars
  • kstars
  • projections
azimuthalequidistantprojector.cpp
Go to the documentation of this file.
1 /*
2  <one line to give the program's name and a brief idea of what it does.>
3  Copyright (C) <year> <name of author>
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License along
16  with this program; if not, write to the Free Software Foundation, Inc.,
17  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 
19 */
20 
21 #ifdef _WIN32
22 #include <windows.h>
23 #endif
24 
25 #include "azimuthalequidistantprojector.h"
26 
27 AzimuthalEquidistantProjector::AzimuthalEquidistantProjector(const ViewParams& p)
28  : Projector(p)
29 {
30 
31 }
32 
33 SkyMap::Projection AzimuthalEquidistantProjector::type() const
34 {
35  return SkyMap::AzimuthalEquidistant;
36 }
37 
38 double AzimuthalEquidistantProjector::radius() const
39 {
40  return 1.57079633;
41 }
42 
43 double AzimuthalEquidistantProjector::projectionK(double x) const
44 {
45  double crad = acos(x);
46  return ( (crad != 0 ) ? crad/sin(crad) : 1 ); // This handles the 0/0 case. The limit of x / sin(x) is 1 as x -> 0.
47 }
48 
49 double AzimuthalEquidistantProjector::projectionL(double x) const
50 {
51  return x;
52 }
53 
SkyMap::Projection
Projection
Definition: skymap.h:96
SkyMap::AzimuthalEquidistant
Definition: skymap.h:97
AzimuthalEquidistantProjector::radius
virtual double radius() const
Get the radius of this projection's sky circle.
Definition: azimuthalequidistantprojector.cpp:38
Projector
This class serves as an interface to handle projections.
Definition: projector.h:49
AzimuthalEquidistantProjector::projectionK
virtual double projectionK(double x) const
This function handles some of the projection-specific code.
Definition: azimuthalequidistantprojector.cpp:43
azimuthalequidistantprojector.h
AzimuthalEquidistantProjector::type
virtual SkyMap::Projection type() const
Return the type of this projection.
Definition: azimuthalequidistantprojector.cpp:33
AzimuthalEquidistantProjector::projectionL
virtual double projectionL(double x) const
This function handles some of the projection-specific code.
Definition: azimuthalequidistantprojector.cpp:49
AzimuthalEquidistantProjector::AzimuthalEquidistantProjector
AzimuthalEquidistantProjector(const ViewParams &p)
Definition: azimuthalequidistantprojector.cpp:27
ViewParams
This is just a container that holds infromation needed to do projections.
Definition: projector.h:37
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kstars

Skip menu "kstars"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal