3

How Do I combine the 2 arcs in the image below into a closed object in Xfig?

I want the left endpoint in the upper arc to be merged with the left endpoint in lower arc. And the same for the other side.

My goal is to close it so I can use it as a shape with the shapepar package. See image: enter image description here

3 Answers 3

2

Basically, you can't. There are no such objects as "compounded objects" in xfig. You can group them, that's it.

To be able to join/split shapes, you have to limit yourself to splines/lines (in blue), then you can cut/join points with the tool marked in red.

enter image description here

I also was (am?) an xfig supporter, but I feel that it's worth learning some new tool; Inkscape would be my choice, although the learning curve is quite steep (especially the not-always-intuitive interaction, especially coming from xfig 😉), so following a first-steps tutorial is more or less mandatory.

1
  • Thank you. Combined your and tkl's answer. Se my comment to his reply.
    – Daffy Duck
    Commented Jul 13, 2023 at 21:42
1

Arcs are objects that are defined by their center point, the radius, a start and an end angle. Hence, "joined arcs" are not an arc any more. Such a closed object would have to be approximated, e.g., by splines.

Hence, there are only workarounds to realize, or approximate a shape consisting of two arcs. Xfig uses X-splines to draw curves, which have the property that an approximated spline to an octogon (or any regular polygon with more than 8 edges) very closely approximates a circle. In xfig, on the bottom left of the drawing panel, one can draw regular polygons where the number of sides can be chosen. This regular polygon could be converted to a spline (shortcut "v", in the lower part of the editing panel). With the edit button, the shape factor of single points of an X-spline can be edited between approximated, interpolated, angular, and any value between (edit point, the alternate mouse button after clicking "Edit").

1
  • Thank you. I used the tool "POLYLINE drawing" to draw a 3 point curve. Then I copied this curve with "COPY Objects" to make the second curve. I used the EDIT to change the coordinates of the second curve. After that I used the "Join or split lines/splines" tool to bind the 2 curves together in each end. Finally I finished of the job with "Conversion between lines, polygons and splines" to get a smooth symetric object. But I got a problem. The object should be a "empty hole" but was not in Latex document despite change in figure file sequence. Had to click "Edit" tool to rduce depth by 1.
    – Daffy Duck
    Commented Jul 13, 2023 at 21:41
0

Try this code:

\documentclass{book}
\usepackage{tikz}

\begin{document}
    \begin{tikzpicture}[scale=3]
        \draw (0,0) to [out=20,in=160] (3,0);
        \draw (0,0) to [out=50,in=130] (3,0);
    \end{tikzpicture}
\end{document} 

Output:

enter image description here

2
  • Yes. Thank you. But I want to do this in Xfig because the shapes will be more complicated later on and to that in tikz would be hell.
    – Daffy Duck
    Commented Jul 11, 2023 at 21:29
  • Sorry, I dont know Xfig. Commented Jul 11, 2023 at 22:08

Not the answer you're looking for? Browse other questions tagged .