kcl-std → functions → parabolic

parabolicFunction in std::sketch

Add a parabolic segment to an existing sketch.

parabolic(
  @sketch: Sketch,
  end: Point2d,
  endAbsolute?: Point2d,
  coefficients?: [number; 3],
  interior?: Point2d,
  interiorAbsolute?: Point2d,
  tag?: tag,
): Sketch

Arguments

NameTypeDescriptionRequired
sketchSketchWhich sketch should this path be added to?Yes
endPoint2dWhere should the path end? Relative to the start point. Incompatible with interiorAbsolute or endAbsolute.Yes
endAbsolutePoint2dWhere should this segment end? Requires interiorAbsolute. Incompatible with interior or end.No
coefficients[number; 3]The coefficients [a, b, c] of the parabolic equation y = ax^2 + bx + c. Incompatible with interior.No
interiorPoint2dA point between the segment's start and end that lies on the parabola. Incompatible with coefficients or interiorAbsolute or endAbsolute.No
interiorAbsolutePoint2dAny point between the segment's start and end. Requires endAbsolute. Incompatible with coefficients or interior or end.No
tagtagCreate a new tag which refers to this segment.No

Returns

Sketch - A sketch is a collection of paths.

Examples

exampleSketch = startSketchOn(XY)
  |> startProfile(at = [0, 0])
  |> parabolic(end = [10, 0], coefficients = [2, 0, 0])
  |> close()

Rendered example of parabolic 0

Found a typo?