Navigation: Geometry > Curves

 

Curves

 

Contact Us: fredsupport@photonengr.com

 

 

 

Description


FRED has a number of curve-based surface types: the Tabulated Cylinder, the Ruled Surface, and the Surface of Revolution. These surfaces allow for a great deal of flexibility in generating complicated surface geometries but also have some simple rules and limitations that do not apply to more conventional surface functions.  These rules are the following:

 

1.

 

A curve based surface surface cannot be used to trim another surface.

2.

 

At least some portion of the generating curve must be located inside the bounding volume of the surface.

3.

 

Curves are used to create surfaces and  not volumes, although a fully enclosed volume may be the end result.

4.

 

Curves by themselves are non-traceable.

 

On Rule #1 

Curve based surfaces are generated as parametric functions, and as such they do not have an easily identifiable positive and negative side.  In other words, the +Z direction of the local surface normal, which is used to establish rules for trimming, is ambiguous.  However, these surfaces are bounded in space and can be trimmed by function-based surface types.

 

On Rule #2

Only the portion of the curve inside the bounding volume will be created.  Putting both the curve and the surface in the same coordinate system most easily satisfies this requirement.

 

On Rule #3

For example, a rod lens that uses a surface of revolution to create the cylinder must also include separate surfaces for each end to close the volume.  Failure to do so may result in ray failures due to a material mismatch.

 

On Rule #4

A curve entity by itself will not interact with rays during a raytrace.  Therefore you cannot specify materials, raytrace controls, coatings etc. for curves.

 

 

Curve Types


FRED has number of simple curve types. In general, each curve is defined parametrically over an interval from [0,1] with the starting point at u = 0 and the ending point at u = 1.   The following sections discuss each curve individually.

 

          Line segment 

Line segments are the simplest curve type, defined as the line connecting the starting point (x0, y0, z0)  to the end point  (x, y, z) end.

 

          Circular arc

As the name implies, this is a simple circular arc. By default, a circular arc is defined in the local XY plane centered at x = 0, y = 0 with radius r.  The start and end points for the arc are given by the start angle and the sweep angle, respectively, and are measured in degrees counter-clockwise from the X-axis (q = 0).  Both the start and sweep angles can be any value between 0 and 360 degrees.

 

 

          Conic arc 

The conic arc is a more general form of the circular arc, and is used primarily for IGES™ import. The conic arc is defined by the equation:

 

f(x,y) = Ax2 + Bxy + Cy2 + Dx + Ey + F = 0

 

The following relationships apply to the conic arc:

A and C are non-zero valued, the function f(x,y) is a second-degree curve.

B2 = 4AC,  the curve is a parabola

AC > 0, the curve is an ellipse

A = C, the curve is a circle whose radius is sqr(|F|)

AC < 0, the curve is a hyperbola

The B coefficient represents a rotation of the coordinate axes. If B = 0, the curves are not rotated about the local x- and y-axes.

The D and E coefficients represent coordinate shifts.

 

User inputs include the desired coefficients and the range of values over which the curve is defined: xstart, ystart and xend, yend. These points do not have to lie on the curve. Rather, these points define the polar angle subtended by the curve in a manner analogous to the convention used for the circular arc. The starting and ending angles are simply:

          


 

Parabola

The equation Ax2 + Bxy + Cy2 + Dx + Ey + F = 0 is a parabola when B2=4AC.  The B coefficient rotates the curve, the D and E coefficients shift the curve and the coefficient F is a constant offset.  Suppose, for example, that a conic arc curve lying in the x-z plane of a local coordinate system was required.  This parabolic curve can be constructed by setting coefficients A = -1/Radius, E = 2 and B = C = D = F = 0, where Radius is the base radius of curvature of the parabola, and by applying a rotation about the x-axis on the curve's Location/Orientation tab.

 

Ellipse

An ellipse centered at the point (x0, y0) has the following form,

 

 

where a and b are the semi-major and semi-minor axis lengths, respectively. The coefficient values A thru F can be found by equating the two forms. The following table supplies one method of coefficient conversion between the conic arc equation and the equation for an ellipse centered at the point (x0, y0) in which both a and b are known and which is also not rotated in the XY-plane.

 

Curve Coefficient

Value

A

1 / a2

B

0

C

1 / b2

D

-2Ax0

E

-2Cy0

F

[ D2 / (4A) ] + [ E2 / (4C) ] - 1

         

If the conic constant, k, and the radius of curvature, r, are known, then a and b can be computed using the following relationships (-1 < k ≤ 0).

          

 

If the ellipse is centered on (x0, y0) = (0,0) then an alternate solution to specifying an ellipse which involves fewer parameters to calculate is to start with a circle whose radius equals the semi-major axis, then solve for either A or C to give the coefficient needed to give the required compression in the X or Y semi-minor direction.

 

e.g. For an ellipse of semi-major (in Y) = 4 and semi-minor (in X) =3 our starting values are

B = D = E = 0

A = C = 1

F = -1 * (semi-major ^ 2) = -(4^2) = -16

 

This gives us our starting point of a circle of radius = 4. Now we calculate the coefficient value for A (semi-minor is in X) for the value x=3, y=0, therefore the conic arc equation reduces to:

Ax^2 + F = 0

Because the other coeffs are zero, and C can be ignored at y=0. Substituting the values for x and F gives:

A*9 -16 = 0

therefore A = 16/9 or 1.777

 

Hyperbola

A hyperbola centered at the point (x0, y0) has the form

 

 

which describes a curve that intersects the x-axis (A > 0, C < 0). If the signs are reversed (A < 0, C > 0) the curve intersects the y-axis.  The terms a and b do not have the same geometric significance for a hyperbola as they do for an ellipse and are not used except to calculate the asymptotes of the curve.

 

When A > 0, both xstart and xend should be greater than zero.  Further, ystart and yend should be chosen so that the start and ending angles are between the asymptote lines.  When A < 0, chose ystart and yend to be greater than zero and xstart and xend to be between the asymptote lines.  Following these rules will help avoid unexpected results arising from the creation of multiple branches of the curve.

 

The curve coefficients for the hyperbola are analogous to those of the ellipse except that A and C have opposite signs. The following coefficient conversion table can be used.

 

Curve Coefficient

Value

A

1 / a2

B

0

C

-1 / b2

D

-2Ax0

E

-2Cy0

F

[ D2 / (4A) ] + [ E2 / (4C) ] - 1

 

Segmented Curve

A segmented curve is simply a collection of points in (x, y, z) connected by straight lines.  It is not necessary for the curve to be closed and FRED will not automatically close the surface, though this can be done by entering the same coordinates for the last point as entered for the first point.  A right mouse click in the spreadsheet area of the dialog box allows for row manipulation (append, insert, delete and scale).  In addition, options are given to read an ASCII text file of consisting of rows of X, Y, and Z points separated by spaces or generate the points automatically.

 

 

Racetrack Curve

A Racetrack curve is a rectangular closed curve with rounded corners, generated internally by connecting line segments with circular quadrants. Shapes of this type are often encountered as apertures in which the milling tool radius is used to finish the corners.  The corner radii of the racetrack curve are all equal.

 

 

Composite Curve 

A composite curve is two or more curves joined in the following fashion,

 

start1 > end1, start2 > end2, .., startn > endn

 

The start point of each subsequent curve is coincident with the end point of the previous curve. The "Reverse Sense" check box flips the starting and ending points of the curve. When two or more curves are joined, the parameterization is re-normalized so that the curve starts at ucomposite = 0 and ends at ucomposite = 1. The curves do not need to be the same type, and multiple composite curves can be joined together as well.

 

Composite Curve Closure and Aperture Curves

Only "closed curves" can be used in aperture curve collections for trimming. Curves that are not "closed" will not be available for selection in the Curve Designation list. For a composite curve to be a "closed" curve, the ending coordinates values of each curve MUST match the starting coordinates of the next curve to 12 decimal places.

 

The dialog for a composite curve displays 9 columns of data (not editable) that can be used to identify where the ending points and starting points between adjacent curves are misaligned.  The columns labeled, "X/Y/Z Mismatch", show the magnitude of the misalignment in the X,Y and Z positions between the end point of the curve in the corresponding row and the starting point of the next curve in the row below it.  For the last member curve in the list, the X/Y/Z mismatch values correspond to the end point of the last curve and the start point of the first curve.  The columns labeled, "X/Y/Z Start", show the starting point of the curve in the corresponding row in the curve's local coordinate system.  The columns labeled, "X/Y/Z End", show the end point of the curve in the corresponding row in the curve's local coordinate system.  Note that the values shown in these columns are only useful when the curves share a common coordinate system.

 

In the following example, a composite curve is used to create a ‘lighthouse’ lens profile by joining a circular arc and a number of segmented curves. Note that the curve is ‘open’.

 

 

If the segments are not properly positioned, FRED will issue an error message.  A common error is to have the parameterization reversed so that FRED is trying to connect the start point of one curve to the start point of a different curve, which is an invalid operation.  It is often useful (but not required) to define the curves in that same coordinate system. The composite curve should also be located in the proper coordinate system as well.

 

TIP: After creating the composite curve, it is recommended that each component curve be placed in the coordinate system of the composite. This way, the composite curve can be repositioned anywhere in the system and the component curves will automatically follow.

 

Any curve used to create the composite can be edited and the changes are reflected automatically, though the rules governing the endpoint connections must still be obeyed.  If a composite curve is copied, FRED automatically creates a duplicate set of the generating curves.

 

 

Spline

The spline is a parametric curve used mainly in the representation of CAD geometry. The position vector P along the curve as a function of the parameter t is given by:

 

 

Knots, or 'breakpoints', given in ascending order define the parametric range of the variable t.

 

For the ith normalized B-spline basis function of order k (degree = k-1), the basis functions Ni,k(t) are defined by the Cox-de Boor recursion formulas:

                    

 

As an example, consider a 5th order (degree = 4) curve defined over the breakpoint values 0 to 1. The basis functions are then

 

N1,1 = 1 ;     N1,2 =  t ;    N1,3 = t2 ;    N1,4 = t3 ;    N1,4 = t4

 

These basis functions amount to the following polynomial expression with the Un vector coefficients a, b, c, d, & f:

 

P(t) = a + bt +ct2 + dt3 + ft4

 

Now consider a specific case of this polynomial curve; y(x) = x + 2x2 - 2x3 - x4. The x-coordinate of this curve is given by Px(t) = t and the y-coordinate by Py(t) =  t + 2t2 - 2t3 - t4. The dialog box below shows this curve cast in the form of a spline curve, where the coefficients in X and Y map to those of the Px(t) and Py(t) parametric equations.

 

 

Even Aspheric Surface Profile from Zemax

The following approach can be taken to transcribe the even asphere profile from Zemax into a Spline curve in FRED, where P refers to the radial aperture of the asphere and zcoeff refers to the aspheric coefficient in Zemax:

1.  Match the spline degree to the maximum aspheric term in Zemax

2.  Set the spline breakpoint range to go from 0 to 1

3.  Set all of the X coefficients of the spline curve to 0

4.  Set the U1 coefficient for Y to match the radial aperture of the asphere, P

5.  For each of the UN coefficients in Z, where N is the order of the aspheric term, set the spline coefficient to zcoeff*PN.

 

 

NURBS

The Non-Uniform Rational B-Spline (NURBS) is a standard parametric curve type broadly employed by Computer Aided Design (CAD) software to represent general curve shapes. A NURBS curve is defined by its order, a set of control points and a knot vector and is represented by a polynomial of degree one less than its order. The knot vector determines how and where the control points affect the curve, and the number of knots is always equal to the number of control points plus the curve degree plus one. The control points determine the shape of the curve.

            

The general representation of a NURBS curve is given by the following equations, where u is the parametric variable, k is the number of knots, P are the control points, w are the associated control point weights and N is a recursive basis function

 

                    

 

For more detailed information on NURBS, see one of the several texts listed on our References page.

 

 

Other curve types

FRED also has a number of special curve types that are used primarily to import IGES™ files and lenses from CODE V™, OSLO™, and ZEMAX™. These curve types are: NURB (Non-Uniform Rational B-spline), and Aperture Curve Collection. FRED automatically creates the fit coefficients for the NURB and Spline curves during a CAD system import. The user is not required to enter points manually. The Aperture Collection Curve is used to create complex or segmented apertures on a single surface (instead of creating multiple copies of the same surface). These curves must be closed and are used only to establish trimming boundaries in the aperture settings for the surface. Aperture curves will be created automatically during a lens file import. The user can also create and apply them manually.

 

 

Application Notes


Values for x, y, and z are all evaluated in the local coordinate system of the surface (or curve). Limits for x, y, and z are determined by the trimming volume outer boundary settings.

 

Curves and surfaces do not need to be defined in the same coordinate system. However, at least some portion of the generating curve must lie within the trimming volume outer boundary settings.

 

A curve-based surface cannot be used to trim another surface.

 

Copied surfaces also create duplicate generating curves.

 

The same curve may be used to create multiple surfaces.

 

 

Related Topics


Curve - Conic Arc

Curve - Segmented Curve Generation

Curve - Spline

Curve -Aperture Curve Collection

Surface - Ruled Surface

Surface - Surface of Revolution

Surface - Tabulated Cylinder

 

 

 

 

 

Copyright © Photon Engineering, LLC