desc.geometry.FourierPlanarCurve

class desc.geometry.FourierPlanarCurve(center=[10, 0, 0], normal=[0, 1, 0], r_n=2, modes=None, grid=None, name='')[source]

Curve that lines in a plane.

Parameterized by a point (the center of the curve), a vector (normal to the plane), and a Fourier series defining the radius from the center as a function of a polar angle theta.

Parameters:
  • center (array-like, shape(3,)) – x,y,z coordinates of center of curve

  • normal (array-like, shape(3,)) – x,y,z components of normal vector to planar surface

  • r_n (array-like) – fourier coefficients for radius from center as function of polar angle

  • modes (array-like) – mode numbers associated with r_n

  • grid (Grid) – default grid for computation

  • name (str) – name for this curve

Methods

change_resolution([N])

Change the maximum angular resolution.

compute_coordinates([center, normal, r_n, ...])

Compute values using specified coefficients.

compute_curvature([center, normal, r_n, grid])

Compute curvature using specified coefficients.

compute_frenet_frame([center, normal, r_n, ...])

Compute Frenet frame vectors using specified coefficients.

compute_length([center, normal, r_n, grid])

Compute the length of the curve using specified nodes for quadrature.

compute_torsion([center, normal, r_n, grid])

Compute torsion using specified coefficients.

copy([deepcopy])

Return a (deep)copy of this object.

eq(other)

Compare equivalence between DESC objects.

flip(normal)

Flip the curve about the plane with specified normal.

get_coeffs(n)

Get Fourier coefficients for given mode number(s).

load(load_from[, file_format])

Initialize from file.

rotate([axis, angle])

Rotate the curve by a fixed angle about axis in xyz coordinates.

save(file_name[, file_format, file_mode])

Save the object.

set_coeffs(n[, r])

Set specific fourier coefficients.

translate([displacement])

Translate the curve by a rigid displacement in x, y, z.

Attributes

N

Maximum mode number.

basis

Spectral basis for Fourier series.

center

Center of planar curve polar coordinates.

grid

Default grid for computation.

name

Name of the curve.

normal

Normal vector to plane.

r_n

Spectral coefficients for r.