hollow polygonCutout
It is a more specific type of polygon that is mainly used for solving math problems related to shape, size, and position.
Cutout
Polygons can define the surface of an objectsinkholesmaybedepressionsparts, thus more accurately modeling complex shapes in the real world.
For examplePCB
(printed circuit board) design by placing theCutout
With hollow polygons, designers can precisely control the area of copper coverage to optimize circuit layout and signal integrity.
During machining, theCutout
Polygons can also be used to guide the trajectory of the cutting tool to facilitate the formation of precise cavities or grooves in the material.
In fact, when we studied geometry during our school years, we often encounteredCutout
polygon, except that it does not generally begin withCutout
The name appears.
For example, when calculating the area of a complex figure, it is often divided into several simple polygons (e.g., triangles, rectangles, etc.) and then calculated separately;
In proving that two figures are equal in area, two line segments are equal, or two angles are equal, it is sometimes necessary to construct auxiliary lines or auxiliary figures, which is essentially a kind of "cut out" operation.
manim
Although it is also possible to construct geometric objects by combining the geometric objects mentioned in the previous posts in theCutout
Graphics.
But the direct use of itsmanim
offeredCutout
Objects are simpler and more convenient.
1. Main parameters
Cutout
There are just two main parameters of the object.
Parameter name | typology | clarification |
---|---|---|
main_shape | VMobject | Cut body shape |
mobjects | *VMobject | One or more small shapes cut from main_shape |
2. Examples of use
Cutout
It is relatively simple to use, and the following generic example shows how hollow polygons can be used.
The remaining few examples demonstrate theCutout
Applications in some common geometry topics.
2.1 Generic examples
Generic example demonstrating theCutout
The way to use it, cut triangles, quads, pentagons and hexagons in a large quadrilateral.
main = Square()scale(2)
sub1 = Triangle().scale(0.5)
sub2 = Square().scale(0.5)
sub3 = RegularPolygon(5).scale(0.5)
sub4 = RegularPolygon(6).scale(0.5)
Cutout(
main,
sub1,
sub2,
sub3,
sub4,
fill_opacity=1,
color=BLUE,
stroke_color=YELLOW,
)
2.2. Triangles in rectangles
Solving for the area of one of the triangles in a rectangle is a common type of problem, using theCutout
The effect of "cutting" a triangle in a rectangle can be constructed.
points = [A, B, C, D]
sub_points = [D, F, E]
main = Polygon(*points)
sub = Polygon(*sub_points)
Cutout(
main,
sub,
fill_opacity=1,
color=BLUE,
stroke_color=GREEN,
)
2.3 Tangents to a circle
The same applies to problems related to the tangent line of a circle, which can be "cut" along the tangent line.
In the following example, a triangle is cut along the tangent line of a small circle.
main = Polygon(A, P, B, O)
sub = Polygon(A, P, O)
Cutout(
main,
sub,
fill_opacity=1,
color=BLUE,
stroke_color=GREEN,
)
2.4. The median of a trapezoid
The key in the proof of the median theorem for trapezoids is the congruence of two congruent triangles, the
The following example "cuts" away the rest of the trapezoid, leaving only the two congruent triangles.
main = Polygon(A, B, F, G, D)
sub = Polygon(A, F, C, D)
Cutout(
main,
sub,
fill_opacity=1,
color=BLUE,
stroke_color=GREEN,
)
3. Annexes
The complete code for the article is on a web disk (),
Download at.Full Code (Access code: 6872)