192k views
5 votes
Difference between ARC and ARC2 command in MSWLOGO​

1 Answer

1 vote

Final Answer:

"ARC" in MSWLOGO draws circular arcs with basic parameters like radius and angle.

"ARC2" is an extended version offering more control, including elliptical arcs.

Step-by-step explanation:

In MSWLOGO, which is a programming language designed for educational purposes, the terms "ARC" and "ARC2" are related to drawing arcs (part of circles) on the screen. Let's discuss the differences between the two commands:

1. ARC Command:

  1. The `ARC` command is used to draw a circular arc on the screen.
  2. It requires several parameters to define the arc, including the radius, angle, and direction.
  3. The syntax typically looks like this: `ARC radius angle`.

Here, "radius" refers to the radius of the circle, and "angle" specifies the angle of the arc in degrees.

Example:

For example, the command `ARC 50 90` would draw a quarter circle with a radius of 50 units.

REPEAT 4 [ARC 50 90 RIGHT 90]

This example draws a square by repeating the arc command four times, turning right by 90 degrees after each arc.

2. ARC2 Command:

  • The `ARC2` command is an extended version of the `ARC` command, providing additional functionality.
  • It is used to draw circular arcs like the `ARC` command but includes extra parameters, allowing for more control over the appearance of the arc.
  • The syntax is more complex, including parameters for the radius, angle, direction and two additional parameters for the ellipse's X and Y axes.
  • The general syntax is: `ARC2 radius angle direction x-radius y-radius`

Example:

ARC2 50 180 "F" 80 40

This example draws a semicircle with a radius of 50 units, an angle of 180 degrees, in the forward direction ("F"), and with an ellipse aspect ratio of 80:40.

Conclusion:

Both `ARC` and `ARC2` are used to draw circular arcs in MSWLOGO, the `ARC2` command provides additional parameters for more precise control over the arc's appearance, including the option to create elliptical arcs. The choice between them depends on the specific requirements of the drawing you want to create.

User Jackinovik
by
8.6k points