Skip to content

Commit 8355e73

Browse files
authored
Add files via upload
1 parent ef9bb60 commit 8355e73

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

DOCUMENTATION.pdf

13.2 KB
Binary file not shown.

EXAMPLES.m

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
%planet3D('Pluto');
3939

4040
% light source
41-
light('Position',[1 -1 0]);
41+
light('Position',[1,-1,0]);
4242

4343

4444

@@ -47,7 +47,7 @@
4747
% plot
4848
figure;
4949
planet3D('Saturn',[],[],'ecliptic')
50-
light('Position',[1 -1 0]);
50+
light('Position',[1,-1,0]);
5151
grid on;
5252

5353

@@ -79,22 +79,22 @@
7979
si*sw si*cw ci];
8080

8181
% rotates coordinates of orbit to ECI frame
82-
r_I = zeros(size(nu));
83-
r_J = zeros(size(nu));
84-
r_K = zeros(size(nu));
82+
rI = zeros(size(nu));
83+
rJ = zeros(size(nu));
84+
rK = zeros(size(nu));
8585
for j = 1:length(nu)
8686
new_coordinates = R_PQW_to_IJK*[r_P(j);r_Q(j);r_W(j)];
87-
r_I(j) = new_coordinates(1);
88-
r_J(j) = new_coordinates(2);
89-
r_K(j) = new_coordinates(3);
87+
rI(j) = new_coordinates(1);
88+
rJ(j) = new_coordinates(2);
89+
rK(j) = new_coordinates(3);
9090
end
9191

9292
% plot
9393
figure;
9494
background('Black');
9595
hold on;
9696
planet3D('Earth Cloudy',[],[],[],[],0.25);
97-
plot3(r_I,r_J,r_K,'color',[140,21,21]/255,'linewidth',1.5);
97+
plot3(rI,rJ,rK,'color',[140,21,21]/255,'linewidth',1.5);
9898
hold off;
9999
grid on;
100100
ax = gca;

planet3D.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,18 @@
5252
% included with the download.
5353
%
5454
% Copyright (c) 2021 Tamas Kis
55-
% Last Update: 2021-03-27
55+
% Last Update: 2021-04-05
5656

5757

5858

5959
%% FUNCTION
6060

6161
% INPUT: planet - name of celestial body
62-
% position - position of planet's geometric center
63-
% gmst - Greenwich mean sidereal time [deg]
64-
% reference_plane - 'equatorial' or 'ecliptic'
65-
% units - units for drawing planet
66-
% transparency - 0 for 100% transparent, 1 for 100% solid
62+
% position - (OPTIONAL) position of planet's geometric center
63+
% gmst - (OPTIONAL) Greenwich mean sidereal time [deg]
64+
% reference_plane - (OPTIONAL) 'equatorial' or 'ecliptic'
65+
% units - (OPTIONAL) units for drawing planet
66+
% transparency - (OPTIONAL) 0 for 100% transparent, 1 for 100% solid
6767
% OUTPUT: 3D plot of specified celestial body
6868
function planet3D(planet,position,gmst,reference_plane,units,transparency)
6969

0 commit comments

Comments
 (0)