#
add_arc
Draw an arc in 2D, using N line segments between two points and a midpoint.
#
Parameters
- p0 : array
- First point: p0 = [x0,y0] in 2D, p0 = [x0,y0,z0] in 3D
- p1 : array
- Mid point: p1 = [x1,y1] in 2D, p1 = [x1,y1,z1] in 3D
- p2 : array
- Second point: p2 = [x2,y2] in 2D, p2 = [x2,y2,z2] in 3D
- N : int
- Number of linearly spaced line segments.
#
See also
#
Examples
model2d.add_arc([0,0], [1,0], [1,1], N=12)
model3d.add_arc([0,0,0], [1,0,0], [1,1,0], N=20)
model3d.add_arc([0,0,0], [np.sqrt(2)/2,1-np.sqrt(2)/2,0], [1,1,0], N=20)
See also
add_circle
Draw a circle in 2D, from center point and radius, using N line segments.
add_line
Add a line defined by two points.
add_polygons
Add a list of polygons defined by an array of two-dimensional arrays of vertex points for each polygon.
add_sphere
Add a sphere from center point and radius, using N line segments.
add_vertex
Create a point in 2D or 3D.