FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version

ellipse-start-and-end

Arguments: center smaj-axis smin-axis smaj-axis-angle start-angle length-angle

This function may be used to find the x and y coordinates of the endpoints of an elliptical arc that was drawn (or might be drawn). This may be needed for example when drawing a pie chart where you need to draw an elliptical arc and then draw straight lines from its endpoints to the arc center.

The arguments should be the same as those passed to the functions draw-ellipse-arc, draw-ellipse-sector, and fill-ellipse-sector (excluding the initial stream argument to those functions).

ellipse-start-and-end returns four values:

  1. the x coordinate of the starting point
  2. the y coordinate of the starting point
  3. the x coordinate of the ending point
  4. the y coordinate of the ending point

This function may also be used along with draw-circle-arc, draw-circle-sector, and fill-circle-sector by passing the radius for both smaj-axis and smin-axis, and passing 0 for smaj-axis-angle.

Other calculations similar to the one performed by this function could be done by calling the Common Lisp trigonometry functions such as sin and cos. But note that the angle arguments to those functions are in radians, while angle arguments to Common Graphics functions are in degrees. To convert from degrees to radians, multiply degrees by the value returned by (/ (* 2.0 pi) 360.0). (That value is a double-float. Coerce it to a single-float if you wish to work with single-floats.)


Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version