%% ladybug_panorama.ldf
%% Created by Laurence D. Finston (LDF) Mi 7. Jun 17:35:02 CEST 2023

%% * (1) Copyright and License.

%%%% Copyright (C) 2023 Laurence Finston

%%%% You can redistribute this file and/or modify 
%%%% it under the terms of the GNU General Public License as published by 
%%%% the Free Software Foundation; either version 3 of the License, or 
%%%% (at your option) any later version.  

%%%% This file is distributed in the hope that it will be useful, 
%%%% but WITHOUT ANY WARRANTY; without even the implied warranty of 
%%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
%%%% GNU General Public License for more details.  

%%%% You should have received a copy of the GNU General Public License 
%%%% along with this file; if not, write to the Free Software 
%%%% Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA 

%%%% The author can be contacted at: 

%%%% Laurence.Finston@gmx.de

%% * (1) Top

input "plainldf.lmc";

verbatim_metapost "prologues := 3;outputtemplate := \"%j%3c.eps\";";

verbatim_tex "\font\large=cmr17 scaled \magstep2";

%% * (1) Macros

macro crosshair;

def crosshair {point aa, color cc} =

  point A[];

  A0 := aa shifted (-.5, 0);

  A1 := aa shifted (.5, 0);

  A2 := aa shifted (0, -.5);

  A3 := aa shifted (0, .5);

  draw A0 -- A1 with_color cc;
  draw A2 -- A3 with_color cc;

enddef;

%% * (1)

path frame;

numeric frame_wd;
numeric frame_ht;

frame_wd := 390mm;
frame_ht := 257mm;

frame := (-.5frame_wd, -.5frame_ht) -- (.5frame_wd, -.5frame_ht) --
         (.5frame_wd, .5frame_ht) -- (-.5frame_wd, .5frame_ht)
         -- cycle;



pen big_pen;

big_pen := pencircle scaled (.5mm, .5mm, .5mm);

pickup big_pen;

point p[];

for i = 0 upto 3:
  p[i] := get_point (i) frame;
endfor;

for i = 0 upto 3:
  p[i+4] := mediate(get_point (i) frame, get_point ((i+1) mod 4) frame);
endfor;

p8 := mediate(p4, p6);


circle c[];

pen dot_pen;

dot_pen := pencircle scaled (3mm, 3mm, 3mm);

%% * (1) Figures

%% ** (2) Fig. 1

beginfig(1);
  draw frame;

  %crosshair {p8, cyan};

  c0 := (unit_circle scaled (7.5, 0, 7.5)) rotated (90, 0);

  %draw c0;

  p9 := get_point (0) c0;

  %label.rt("{\large p9}", p9);  
  %drawdot p9 with_pen dot_pen;
  
  
endfig with_projection parallel_x_y;

bye;

%% ** (2) End

end;

%% Local Variables:
%% mode:MetaPost
%% abbrev-mode:t
%% End:
 
