102k views
5 votes
How to create overlapping arcs in asymptote?

User Harry Adel
by
8.5k points

1 Answer

3 votes

Final answer:

To create overlapping arcs in Asymptote, you use arc and ellipse drawing functions and ensure that arcs intersect by controlling the angles when defining them.

Step-by-step explanation:

To create overlapping arcs in Asymptote, a programming language focused on creating precise technical illustrations, you would typically utilize the drawing functions specific to arcs and ellipses. The code structure will involve specifying the center, radii, and angles that define your arcs. Overlapping can be achieved by carefully plotting arcs that share part of their circumference or by utilizing the concept of an ellipse as explained with the strings and pins method.One can draw an ellipse in Asymptote akin to the physical method of using pins and strings (as described in Figure 3.4), by creating an Asymptote command that continuously adjusts the tension points to ensure the sum of the distances from any point on the ellipse to the foci (the pins) is equal to the length of the string.

For overlapping arcs, whether part of circles (as seen in Figures 6.3 and 6.4) or ellipses, you must define points on the paths, and ensure the arcs intersect at those points. Using the parameterized equations of circles or ellipses, you can control the degrees to which each arc is drawn to create the desired overlapping effect.To create overlapping arcs in asymptote, you can use the arc command and specify the starting and ending angles. You can also specify the radius and center of the arc. By adjusting these parameters, you can create arcs that overlap with each other. Here's an example:draw(arc((0,0), 1, 0, 90))draw(arc((0,0), 1, 45, 135))In the above code, two overlapping arcs are drawn with the same at (0,0) and radius 1. The first arc starts at angle 0 and ends at angle 90, while the second arc starts at angle 45 and ends at angle 135.

User MrAndre
by
8.1k points