mymesh.primitives.Circle#
- mymesh.primitives.Circle(center, radius, theta_resolution=20, radial_resolution=10, axis=2, ElemType=None, Type='surf')[source]#
Construct a circle from a center and radius.
- Parameters:
center (array_like) – Center of the circle
radius (float) – Radius of the circle
theta_resolution (int, optional) – Number of circumferential points, by default 20
radial_resolution (int, optional) – Number of radial points from center to edge, by default 10
axis (int, optional) – Axis perpendicular to the plane of the circle, specified as by integers (0=x, 1=y, 2=z), by default 2.
ElemType (None, str, optional) – Element type of final mesh. If None, the result will contain predominantly quadrilateral elements with triangular elements at the center. If ‘tri’, the result will be a purely triangular mesh, by default None.
Type (str, optional) – Mesh type of the final mesh. This could be ‘surf’ for a surface mesh or ‘line’ for a line mesh of just the circumference of the circle, by default ‘surf’.
- Returns:
circle – Mesh object containing the circle mesh.
- Return type:
Examples
circle = primitives.Circle([0, 0, 0], 1) circle.plot(bgcolor='w', show_edges=True)