%%%% ellpcn01.ldf %%%% Created by Laurence D. Finston (LDF) Thu Nov 3 19:41:14 CET 2005 %% * (1) Copyright and License. %%%% This file is part of GNU 3DLDF, a package for three-dimensional drawing. %%%% Copyright (C) 2003, 2004, 2005 The Free Software Foundation %%%% GNU 3DLDF is free software; you can redistribute it and/or modify %%%% it under the terms of the GNU General Public License as published by %%%% the Free Software Foundation; either version 2 of the License, or %%%% (at your option) any later version. %%%% GNU 3DLDF 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 GNU 3DLDF; if not, write to the Free Software %%%% Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA %% Braikenridge-Maclaurin Construction. %% Constructing an ellipse from 6 points. %% LDF 2005.11.03. verbatim_metapost "verbatimtex \magnification=\magstep2 etex"; beginfig(1); ellipse e; e := unit_ellipse scaled (4, 0, 3); pen path_pen; path_pen := pencircle scaled (.7mm, .7mm); pickup path_pen; draw e; point A, B, C, D, E, F; A := get_point (15) e; B := get_point (11) e; C := get_point (8) e; D := get_point (6) e; E := get_point (3) e; F := get_point (0) e; pen dot_pen; dot_pen := pencircle scaled (1mm, 1mm); pickup dot_pen; dotlabel.rt("A", A) with_dot_color red; dotlabel.bot("B", B) with_dot_color red; dotlabel.lft("C", C) with_dot_color red; dotlabel.lft("D", D) with_dot_color red; dotlabel.top("E", E) with_dot_color red; dotlabel.rt("F", F) with_dot_color red; pickup pencircle scaled (.7mm, .7mm); %% **** (4) Point X path q[]; q0 := A -- C; q1 := B -- D; pickup path_pen; draw q0; draw q1; point X; X := q0 intersection_point q1; pickup dot_pen; dotlabel.llft("$X$", X) with_dot_color red; %% **** (4) Point Y q2 := B -- E; q3 := C -- F; pickup path_pen; draw q2; draw q3; point Y; Y := q2 intersection_point q3; pickup dot_pen; dotlabel.ulft("$Y$", Y) with_dot_color red; %% **** (4) Point Z q4 := A -- E; q5 := D -- F; pickup path_pen; draw q4; draw q5; point Z; Z := q4 intersection_point q5; pickup dot_pen; dotlabel.urt("$Z$", Z) with_dot_color red; %% **** (4) point Z'; Z' := mediate(Z, E, .5); dotlabel.urt("$Z'$", Z') with_dot_color red; point Y'; Y' := (B -- E) intersection_point (Z' -- X); dotlabel.lrt("$Y'$", Y') with_dot_color red; point G; G := mediate(C, Y', 2); dotlabel.rt("G", G); draw C -- G with_pen path_pen dashed evenly; point H; H := mediate(D, Z', 2); dotlabel.rt("$H$", H); draw D -- H with_pen path_pen dashed evenly; point J; J := (C -- G) intersection_point (D -- H); pickup dot_pen; drawdot J with_color red; label.urt("$J$", J shifted (0, 0, .25)); endfig with_projection parallel_x_z no_sort; verbatim_metapost "end"; end;