desc.geometry.FourierPlanarCurve

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

Curve that lies 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

  • name (str) – name for this curve

Methods

change_resolution([N])

Change the maximum angular resolution.

compute(names[, grid, params, transforms, ...])

Compute the quantity given by name on grid.

copy([deepcopy])

Return a (deep)copy of this object.

equiv(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.

pack_params(p)

Convert a dictionary of parameters into a single array.

rotate([axis, angle])

Rotate the curve by a fixed angle about axis in X, Y, Z coordinates.

save(file_name[, file_format, file_mode])

Save the object.

set_coeffs(n[, r])

Set specific Fourier coefficients.

to_FourierXYZ([N, grid, s, name])

Convert Curve to FourierXYZCurve representation.

to_SplineXYZ([knots, grid, method, name])

Convert Curve to SplineXYZCurve.

translate([displacement])

Translate the curve by a rigid displacement in X, Y, Z.

unpack_params(x)

Convert a single array of concatenated parameters into a dictionary.

Attributes

N

Maximum mode number.

center

Center of planar curve polar coordinates.

dim_x

total number of optimizable parameters.

dimensions

dictionary of integers of sizes of each optimizable parameter.

name

Name of the curve.

normal

Normal vector to plane.

optimizable_params

string names of parameters that have been declared optimizable.

params_dict

dictionary of arrays of optimizable parameters.

r_basis

Spectral basis for Fourier series.

r_n

Spectral coefficients for r.

rotmat

Rotation matrix of curve in X, Y, Z.

shift

Displacement of curve in X, Y, Z.

x_idx

arrays of indices for each parameter in concatenated array.