The SEDRIS Data Representation Model
APPENDIX A - Classes
Arc

Class Name: Arc

Superclass - <Linear Geometry>

Subclasses

This DRM class is concrete and has no subclasses.

Definition

An instance of this DRM class specifies a circular arc, the endpoints of which are specified by the <Vertex> components, and the centre point is specified by the <Location> component.

Primary Page in DRM Diagram:

Secondary Pages in DRM Diagram:

This class appears on only one page of the DRM class diagram.

Example

  1. A geometric representation of a treeline, or a string of lights that follow the path of the <Arc> instance.

FAQs

An arc can be defined in different ways. Rather than using the DRM's method of three points that define the beginning, mid, and ending points on an <Arc> instance, consider a representation that specifies an arc with a centre point, radius, beginning angle, and ending angle. How can this be implemented using the DRM?

The following formulas show how centre point, radius, beginning and ending angles can be derived from the first set of information (beginning, mid, and ending points on the <Arc> instance).

        double x1, y1,              /* beginning point */
               x2, y2,              /* mid point */
               x3, y3,              /* ending point */

               sx1, sx2, sx3,       /* squared x values */
               sy1, sy2, sy3,       /* squared y values */
               ad, D, E, F,         /* determinate values */
               dc, ec, fc,          /* coefficient values */

               centrex, centrey,    /* centre point of arc */
               r,                   /* radius of arc */
               ab, ae;              /* beginning & ending angles */

        /* get squared values */
        sx1 = x1*x1;   sx2 = x2*x2;   sx3 = x3*x3;
        sy1 = y1*y1;   sy2 = y2*y2;   sy3 = y3*y3;

        /* get "a" determinate */
        ad = x1*(y2 - y3) - y1*(x2-x3) + x2*y3 - x3*y2;

        /* get "D" determinate */
        D = (sx1 + sy1)*(y2 - y3) - y1*((sx2 + sy2) - (sx3 + sy3))
            + y3*(sx2 + sy2) - y2*(sx3 + sy3);

        /* get "E" determinate */
        E = (sx1 + sy1)*(x2 - x3) - x1*((sx2 + sy2) - (sx3 + sy3))
            + x3*(sx2 + sy2) - x2*(sx3 + sy3);

        /* get "F" determinate */
        F = (sx1 + sy1)*(x2*y3 - x3*y2) -
             x1*(y3*(sx2 + sy2) - y2(sx3 + sy3)) +
             y1*(x3*(sx2 + sy2) - x2*(sx3 + sy3));

        D = -D;            F = -F;

        /* check for colinear point */
        if (ad == 0.0) {
            fprintf(stderr, "ERROR! colinear point\n");
            fflush(stderr);
            exit(-1);
        }

        /* get coefficients */
        dc = D/(2.0*ad);
        ec = E/(2.0*ad);
        fc = F/ad;

        /* get centre point */
        centrex = -dc;    centrey = -ec;

        /* get radius */
        r = sqrt((dc*dc + ec*ec - fc));

        /* get beginning and ending angles */
        ab = atan2(y1 - centrey, x1 - centrex);
        ae = atan2(y3 - centrey, x3 - centrex);
    

Constraints

Associated with (two-way) (inherited)

Composed of (two-way) (inherited)

Composed of (two-way)

Composed of (two-way metadata) (inherited)

Component of (two-way) (inherited)

Inherited Field Elements

SE_Short_Integer_Unsigned count; 2
SE_Boolean suppress_last; 3

Notes

Composed of Notes


Union_Of_Primitive_Geometry

A <Primitive Geometry> instance P has a <Union Of Primitive Geometry> component only when P can be decomposed into nested <Primitive Geometry> instances.

EXAMPLE  A <Polygon> instance can be decomposed into multiple <Polygon> instances representing subfaces.

Fields Notes

count

The count field of a <Linear Geometry> instance indicates how the <Linear Geometry> instance is to be rendered. A count field value of zero for a given <Linear Geometry> instance L indicates that L is to be rendered as one solid line segment, and the suppress_last field does not apply.

If count is greater than zero and L has a <Light Rendering Properties> component, the following applies:

  1. count is the number of evenly spaced light points to be rendered along L.
  2. The distance between light points is calculated by dividing the total length of L by count - 1.
  3. If count is one, a single light point is placed at the halfway point of L and the suppress_last field does not apply.
  4. The fields of the <Light Rendering Properties> component are applicable to each light point as described in 4.15.3.6 Simulating lighting effects of ISO/IEC 18023-1.
  5. If a <Rendering Properties> component is present, it is applicable to each light point as described in 4.15.3.4 Lighting effects of ISO/IEC 18023-1.
  6. No additional factors apply.

If count is greater than zero and L does not have a <Light Rendering Properties> component, the following applies:

  1. count is the number of evenly spaced line segments to be rendered along L.
  2. The length of a segment is calculated by dividing the total length of L by count.
  3. If count is one, a single solid line segment is used and the suppress_last field does not apply.
  4. If a <Rendering Properties> component is present, it is applicable to each light point as described in 4.15.3.4 Lighting effects of ISO/IEC 18023-1.
  5. No additional factors apply.

suppress_last

If count is greater than one, the suppress_last field specifies whether the last segment or point in the sequence is suppressed or rendered.


Prev: Animation Related Geometry. Next: Areal Feature. Up:Index.

Last updated: July 26, 2006 Copyright © 2006 SEDRIS