The idea is to reproduce the figure such that point U has abscissa -5/7 and point P has root 13. My practice of Metapost is not sufficient to finish the figure.

enter image description here

        u  = 1.5cm;
        z0 = (0,0);
        z1 = (-2u,0);
        z2 = (4u,0);
        z3 = (u,0);
        z4 = (sqrt(13)*u,0);
        z5 = ((-5/7)*u,0);
        z6 = (0,-3*u);
        z7 = (2u,-3u);
        z8 = (2u,0);

        path q;
        q = unitsquare scaled 5;

        picture X;
        X = image(
        drawoptions(withpen pencircle scaled 1.25 withcolor 1/4[blue, white]);
        draw (left--right) scaled 2;
        draw (down--up) scaled 2;

        draw X shifted z0;
        draw X shifted z3;
        draw X shifted z4;
        draw X shifted z5;

        fill q rotated 180 shifted z8 withcolor 1/3[green, white];
        draw q rotated 180 shifted z8 ;

        fill q rotated -90 shifted z0 withcolor 1/3[green, white];
        draw q rotated -90 shifted z0 ;

        fill q rotated 90  shifted z7 withcolor 1/3[green, white];
        draw q rotated 90 shifted z7 ;

        fill q  shifted z6 withcolor 1/3[green, white];
        draw q  shifted z6 ;

        draw z0 -- z7 withcolor 1/2[red, white];

        draw z1 -- z2;
        path rectangle;
        rectangle = z0 -- z6 -- z7 -- z8 -- cycle;
        draw rectangle;

        label.top("$O$",z0 + (0,3));
        label.top("$I$",z3 + (0,3));
        label.top("$P$",z4 + (0,3));
        label.lft("3",0.5[z0, z6]) withcolor 1/2[red, black];
        label.bot("2",0.5[z6, z7]) withcolor 1/2[red, black];
        label.bot("$-1$", (-u,0));

        path r;
        r = fullcircle scaled 7.211102551u;

        draw subpath (6.5, 8) of r;
        draw (-0.8)[z0, point 2.35 of rectangle] -- 1.8[z0, point 2.35 of rectangle]  withcolor 1/2[blue, white];

enter image description here

  • 1
    Sorry, but it is not clear to me what you want to achieve. Aren't the coordinates for U and P already correct? Sep 22 at 19:16
  • @Jasper Hello, my problem is not the positioning of the points P and Q whose abscissas were calculated with the theorems of Thales and Pythagoras but rather on how to draw the blue line and be able to divide it into seven equal segments.
    – Fabrice
    Sep 24 at 12:14
  • I see. But then, I fear that you need to help me understand how the blue line and the two red lines in the reference picture are defined. Sep 24 at 12:18
  • I don't know, but all you have to do is draw one arbitrarily.
    – Fabrice
    Sep 24 at 12:50


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.