DXF Group Codes ENTITIES Section ELLIPSE

The following group codes apply to ellipse entities.

Ellipse group codes
 Group codes Description 100 Subclass marker (AcDbEllipse) 10 Center point (in WCS). DXF: X value; APP: 3D point 20, 30 DXF: Y and Z values of center point (in WCS) 11 Endpoint of major axis, relative to the center (in WCS).DXF: X value; APP: 3D point. 21, 31 DXF: Y and Z values of endpoint of major axis, relative to the center (in WCS) 210 Extrusion direction. (optional; default = 0, 0, 1). DXF: X value; APP: 3D vector 220, 230 DXF: Y and Z values of extrusion direction 40 Ratio of minor axis to major axis 41 Start parameter (this value is 0.0 for a full ellipse) 42 End parameter (this value is 2pi for a full ellipse)

The group codes 41 and 42 are the start and end values for u in the equation below. The magnitude of the codes 11,21,31 vector is equal to 1/2 of the major axis which is the a value in the equation. The point 10,20,30 is the c value in the equation. Knowing all these, we can calculate the b value to complete the equation.

Explanation of the ELLIPSE Command's Parameter Option

The Parameter option of the ELLIPSE command, uses the following equation to define an elliptical arc.

p(u)=c+a*cos(u)+b*sin(u)

The variables a, b, c are determined when you select the endpoints for the first axis and the distance for the second axis. a is the negative of 1/2 of the major axis length, b is the negative of 1/2 the minor axis length, and c is the center point (2-D) of the ellipse.

Because this is actually a vector equation and the variable c is actually a point with X and Y values, it really should be written as:

p(u)=(Cx+a*cos(u))*i+(Cy+b*sin(u))*j

where

Cx is the X value of the point c

Cy is the Y value of the point c

a is -(1/2 of the major axis length)

b is -(1/2 of the minor axis length)

i and j represent unit vectors in the X and Y directions

In AutoCAD, once the axis endpoints are selected all you have left to specify is the start and end of the elliptical arc.

When you select the parameter option you are asked for a start parameter and an end parameter. These values are plugged into the equation to determine the actual start and end points on the ellipse. The rest of the ellipse is filled in between these two points in a counterclockwise direction from the first parameter to the second. The value entered for the parameter u is taken to be degrees for the purposes of obtaining the cos(u) and sin(u).

For example:

Axis endpoint 1 = 0,1

Axis endpoint 2 = 4,1

Other axis distance = 2,0

Start parameter = 270

End parameter = 0

will generate the start point at 2,2 and the end point at 0,1 and fill in the ellipse from 2,2 to 0,1 in a CCW direction.