summaryrefslogtreecommitdiff
path: root/fonts/astro/astrosym.xtr
blob: 1d9489d92df6db86d0129dc0a874fb1e3f1b4d1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
% ASTROSYM.XTR : AstroSym (Version 2.20,  Aug. 10, 2002) - file 7 of 8
% Peter Schmitt                      eMail: Peter.Schmitt@univie.ac.at
% Institute of Mathematics, University of Vienna       Vienna, Austria
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

beginchar(O+0,U#,U#,0u#); "(moon face) full moon";
   corners; centers;
   VV:=(BC-BL) rotated 90;
   TC:=CC+VV; BC:=CC-VV; D:=U/9;
   hh:=(U/6,0); vv:=(0,U/6);
   PEN; draw TC..CR..BC..CL..TC..cycle;                            % circle
   Pen; draw CC--(CC-vv);                                          % nose
        filldraw fullcircle scaled D shifted (CC-hh+vv/2);         % left eye
        filldraw fullcircle scaled D shifted (CC+hh+vv/2);         % right eye
        draw (CC-vv-hh)..(CC-1.8vv)..(CC-vv+hh);                   % mouth
        draw (CC-vv+hh)..(CC-1.5vv)..(CC-vv-hh);
   endchar;

beginchar(O+1,U#,U#,0u#); "(moon face) new moon";
   PEN; fill TC..CR..BC..CL..TC..cycle;                            % circle
   Pen; undraw CC--(CC-vv);                                        % nose
        unfilldraw fullcircle scaled D shifted (CC-hh+vv/2);       % left eye
        unfilldraw fullcircle scaled D shifted (CC+hh+vv/2);       % right eye
        undraw (CC-vv-hh)..(CC-1.8vv)..(CC-vv+hh);                 % mouth
        undraw (CC-vv+hh)..(CC-1.5vv)..(CC-vv-hh);
   endchar;

  path moon;
beginchar(O+2,2/3U#,U#,0u#); "(moon face) last quarter";
  corners; Centers(3/4,1/2);
  VV:=(TL-BL)/2; HH:=VV rotated -90;
  BC:=BL+HH; TC:=TL+HH; % CL=BL+VV;
  R:=length(HH); D:=length(BR-BL);
  t:=(R+-+(D-R))/2R;
  RT (1/2-t,1/2+t);
  rr:=(2u,2u); ll:=(-5u,-3u); mm:=(0,-5u);
  moon := bR..BC..CL..TC..tR                                     % outer circle
          & tR..{dir -45}(CC+rr)                                 % forehead
          & {dir 180}(CC+rr)..(CC+ll)..(CC+2ll){dir 180}         % nose
          & (CC+2ll){dir -10}..(CC+mm)
          & (CC+mm){dir -135}..bR                                % mouth
          & bR--cycle;                                           % chin
  D:=U/9; filldraw fullcircle scaled D shifted (CC-hh+vv/2);     % eye
  Pen; draw moon;
  endchar;

  temp := currentpicture;
beginchar(O+3,2/3U#,U#,0u#); "(moon face) first quarter";
  currentpicture := temp xscaled -1 shifted (w,0);
  endchar;

beginchar(O+4,2/3U#,U#,0u#); "(moon face) last quarter - inverse";
  fill moon;
  D:=U/9; unfilldraw fullcircle scaled D shifted (CC-hh+vv/2);    % eye
  endchar;

  temp := currentpicture;
beginchar(O+5,2/3U#,U#,0u#); "(moon face) first quarter - inverse";
  currentpicture := temp xscaled -1 shifted (w,0);
  endchar;

endinput;

beginchar(O+6,U#,U#,0u#); "full moon";
   corners; centers;
   VV:=(BC-BL) rotated 90;
   TC:=CC+VV; BC:=CC-VV; D:=U/9;
   hh:=(U/6,0); vv:=(0,U/6);
   PEN; draw TC..CR..BC..CL..TC..cycle;                   % circle
   endchar;

beginchar(O+7,U#,U#,0u#); "new moon";
   fill TC..CR..BC..CL..TC..cycle;                        % disk
   shade (CL,CR, BC,TC);
   Pen; draw TC..CR..BC..CL..TC..cycle;                   % circle
   endchar;

  temp:=currentpicture;
beginchar(O+8,2/3U#,U#,0u#); "Luna 2 = (moon 2) last quarter";
  corners; Centers(3/4,1/2);
  VV:=(TL-BL)/2; HH:=VV rotated -90;
  BC:=BL+HH; TC:=TL+HH; % CL=BL+VV;
  R:=length(HH); D:=length(BR-BL);
  t:=(R+-+(D-R))/2R;
  RT (1/2-t,1/2+t);
  currentpicture := temp;
  Pen; unfilldraw tR..TC..CL..BC..bR                  % outer circle
                & bR..CC..tR                          % inner arc
                & tR--cycle;
  cullit;
  Pen; draw tR..TC..CL..BC..bR;                  % outer circle
       draw tR..CC..bR;                          % inner arc
  endchar;

  temp := currentpicture;
beginchar(O+9,2/3U#,U#,0u#); "(moon 2) first quarter";
  currentpicture := temp xscaled -1 shifted (w,0);
  endchar;

beginchar(O+9,2/3U#,U#,0u#); "(moon 2) last quarter - inverse";
  PEN; filldraw tR..TC..CL..BC..bR                   % big circle
                & bR..CC..tR -- cycle;               % small circle
  cullit; addto currentpicture also -temp; cullit;
  Pen; draw tR..TC..CL..BC..bR                       % big circle
          & bR..CC..tR -- cycle;                     % small circle
  endchar;

  temp := currentpicture;
beginchar(O+10,2/3U#,U#,0u#); "(moon 2) first quarter - inverse";
  currentpicture := temp xscaled -1 shifted (w,0);
  endchar;

endinput;
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% end of ASTROSYM.XTR %%%