Cut the square into four triangles

CSS split square into 4 triangles

I am currently trying to make a square equal to 4 triangles of the same size that are triggered by events.

What I find is that each triangle sits above each other and only one triangle can be seen, here is my example,

As you can see, only the bottom triangle (hover at the bottom of the square) is dependent. What am I doing wrong? Is there a better way to do this?

the answer

As you already pointed out in your question, the reason the hover only works on the bottom triangle and not others is because the container of the bottom triangle is placed on top of the container of the other three triangles.

When using the boundary trick to create triangles, the actual shape is still a square. It looks like a triangle only because the other three borders are transparent. Now, when you hover over a shape, you are actually hovering over the transparent areas of the bottom triangle, not the containers of the other triangles, so their respective hover events are not fired.

3 Ways to Make 1/2 Square Triangles

I personally would recommend using SVG for these types of things, but the shape is not that hard to achieve with CSS.

In SVG, you can use polygon elements to create four triangles in a square, and each polygon can hover separately. If they should have their own target links, you can also wrap the polygons in the a (anchor) tag.

In a snippet, I have implemented snapping for only one triangle

This is an adaptation of the answer posted here via web ticks. I am posting a separate answer because the form in this question is much simpler and does not require the same work as the other.

The square is split into four triangles of the same size, depending on the type, using the following method:

  • The container is square and has borders on all sides. Borders are necessary for the parent because diagonal mowing lines on a triangle are much more difficult to achieve with CSS.
  • The four children are added to a container whose height and width are calculated using the Pythagorean theorem. They are then positioned so that their top-left corner is at the center point of the square (to help with rotation).
  • All children are rotated at appropriate angles to form triangles. transform-origin is set to top left for a rotation performed with the center point of the parent square as the axis.
  • The parent has overflow: hidden. to prevent the other half of each square from being visible.
  • Note that adding text to the 4 triangles will not be straight because they will also be rotated. The text must be placed inside a child element, which must either rotate counterclockwise.

Note. The script included in the demo is a free prefix library that is used to prevent browser prefixes.

How to make a square out of 3 triangles

Quick patchwork methods make the work of the craftswoman much easier and faster. Over the years, needlewomen have come up with a huge number of different ways to simplify their work. We will tell you about the most popular ones.

At the Anglo-American School of Quilting, all measurements are taken in inches (2.5 cm). If the square is a whole unit of the block, then the triangles in quilting are divided into halves. half square triangles, and quarters. a quarter square triangles. The difference is in the direction of the lobar thread. Therefore, some triangles are cut out two triangles in a square, and others. four triangles.

When using the quick method of sewing a square from triangles, it is important to correctly calculate the size of the workpiece and the allowances.

Half square triangles: Cut out a square equal to the side of the triangle 2 of the 6mm seam allowance, 8.4mm diagonal seam allowance. The amount of additional stock does not depend on the size of triangles and squares, it depends on the size of the stock. If you are used to using a different allowance: 7mm or 5mm. then the value of the additional allowance is calculated by the formula: (allowance x allowance). calculate the square root of the result and divide it by 2. (Rationale: since according to the Pythagorean formula, the square of the hypotenuse is equal to the sum of the squares of the legs, and in this case the hypotenuse is two allowances, then the leg is an additional allowance, we take the hypotenuse, extract the square root and divide by two).

Example: You need 2 pieces of two triangles. a square. 5x5cm in size. You are using 6 mm (0.6 cm) allowances. Cut out two 7 x 7 cm (5 0.6 0.6 0.84) squares. Fold them right over. For convenience, you can mark the diagonal along which you will be stitching with a marker or chalk. Run two stitches along the diagonal (6 mm from the diagonal). Make a diagonal cut between the lines. Unfold the parts and iron the allowances.

If you need more than two compound squares. you can cut the fabric into squares, and use a strip several squares wide or a large square (see diagram below).

Quarter square triangles: Cut out a square equal to the hypotenuse (long) of triangle 2 6mm seam allowance 2 8.4mm diagonal seam allowance. Example: You need 2 pieces of four triangles. a 10 x 10 cm square (with an allowance of 0.6 cm). (see assembly diagram below) You need to cut out two squares of size 10 (0.6 2) (0.84 2) = 12.9 cm. 12.9 x 12.9 cm. Fold the squares right over, mark the diagonals and cut lines for the seams. Sew along one diagonal of the mowing line. Cut the squares in half along this diagonal. Expand the details and iron. Fold the squares right over again, aligning the mowing line with the seams. Sew along the second diagonal of the mowing line. Cut the squares in half along this diagonal. Expand the details and iron. It turned out two squares of 4 triangles each.

See also  Cutting Mirrors With Glass Cutters At Home

Fast triangles are half a square. A quick method for assembling triangles into squares.

Pattern of a square pattern for this method.

Cut out squares in two colors. Fold them right over. Run two stitches along the diagonal (6mm from the diagonal).

Make a diagonal cut. Unfold the parts and iron the allowances

Square of two triangles. several squares in a row.

Quarter square triangles: quarter-square Notice that here the share thread runs along the diagonal of the future square (along the hypotenuse of the triangle)

Cut out a square. Sew along the sides of the square. marked in red. Cut the square diagonally. Open and iron the details.

It turns out squares with a shared thread along the diagonal of the square.

In the same pattern, overlooking the blue seam. or along the green lines, and cutting the square along the diagonals, you get compound triangles from quarter-squares with a fractional side on the short side (leg) of the triangle.

An example of assembling 3/3 square blocks from half-squares and quarter-squares.

Squares of 4 triangles (quarter-squares).

Cut out squares, fold, mark the mowing line seams and mowing line cut. Sew. Cut.

Iron out the details. Fold them right over, matching the mowing line of the seams. Mark the mowing line for the seams and the mowing line for the cut. Sew. Cut.

It turned out two squares with bows (a square of quarter-squares).

I would like to present another flat geometric constructor, which can be called “Pythagoras-2”.

A 10×10 cm square is cut, as shown in the figure, as a result of which we get 9 geometric shapes: 4 large triangles, 2 small ones, one medium, square and rectangle.

Before working with samples, the guys perform several tasks with certain shapes.

Task 1. Take 2 large triangles and a square. Make: a rectangle, a triangle, and 2 different quadrangles, one of which is a trapezoid.

Task 2. Take 2 small triangles and a middle one. Make: a square, a triangle, a rectangle, and 2 different quads, one of which is a trapezoid.

Task 3. Take 2 small triangles, a medium and a large triangle. Make: a square, a triangle, a rectangle, and 2 different quads, one of which is a trapezoid.

Further, children build different images, gradually moving to undivided samples.

The next constructor is also of the author’s design, and by analogy with “Tangram” I named it “Tregram”, since it was obtained by cutting an equilateral triangle. Game tasks with such a constructor can be carried out to fill in and compose plane images from sets of geometric shapes. An equilateral triangle made of cardboard (side length 20 cm, each of which is divided into 5 equal parts of 4 cm) is cut into 10 shapes, as shown in the figure.

The result is 4 small triangles, 2 rhombuses, a trapezoid, a parallelogram, a large triangle and a hexagon.

At the first stage children get acquainted with all parts of the constructor, making them from triangles and other small shapes:

By connecting two triangles to each other, children get a rhombus. 2. By attaching another triangle to the rhombus, the children get a trapezoid, which can be made using three triangles. 3. By attaching another triangle to the trapezoid, the children receive a parallelogram. The same shape can be made from other small shapes. 4. Further, the children, by superimposing small figures on large ones, themselves draw conclusions from which figures they can be folded.

In the second stage children fill the inner space of silhouette figures on sheets using all parts of the constructor.

In the third stage children compose planar images according to dismembered samples with a gradual transition to partially dismembered.

At the fourth stage children model images according to their own design.

By the type of “Nikitinsky cubes”, I made another flat constructor. This set consists of 15 squares 5×5 cm:

8 squares are filled in half diagonally;

At the first stage game tasks, we use only 4 squares, half-filled, and according to the sample we compose all the images only from them.

In the second stage children compose pictures from 9 squares using the whole set.

Purpose. Teach children to make geometric shapes from a certain number of sticks, using the technique of attaching to one figure, taken as a basis, another.

Material: Children have counting sticks on the tables, blackboard, chalk in this and the next lesson.

Progress. 1. The teacher asks the children to count 5 sticks, check and put them in front of them. Then he says: “Tell me how many sticks are needed to make a triangle, each side of which will be equal to one stick. How many sticks are required to make two such triangles? You only have 5 sticks, but you also need to make 2 equal triangles from them. Think how it can be done and make up “.

After most of the children complete the task, the teacher asks them to tell how to make 2 equal triangles from 5 sticks. Draws the attention of the children to the fact that the task can be completed in different ways. The methods of implementation must be sketched. When explaining, use the expression “attached to one triangle another from below” (on the left, etc.), and in explaining the solution to the problem, use the expression “attached another triangle to one triangle, using only 2 sticks”.

See also  How To Cut A Pentagon Into 4 Acute-Angled Triangles

Make 2 equal squares from 7 sticks (the teacher preliminarily specifies which geometric figure can be made from 4 sticks). Gives you an assignment: count 7 sticks and think about how to make 2 equal squares on the table.

After completing the assignment, they consider different ways of attaching to one square of another, the teacher sketches them on the board.

Questions for analysis: “How did you make 2 equal squares from 7 sticks? What did you do first, what then? How many sticks did you make 1 square? How many sticks did you attach the second square to it? How many sticks did it take to make 2 equal squares?”

Purpose. Build shapes by attaching. To see and show at the same time a new figure obtained as a result of compilation; use the expression: “attached to one figure another”, think over practical actions.

Progress. The teacher invites the children to remember what figures they made using the attachment technique. Tells what they will do today. learn to make new, more complex shapes. Gives tasks:

Count 7 sticks and think about how you can make 3 equal triangles from them.

After completing the assignment, the teacher asks all children to make 3 triangles in a row so that a new figure is obtained. a quadrangle.This version of the solution children sketch with chalk on the blackboard. The teacher asks to show 3 separate triangles, a quadrangle and a triangle (2 figures), a quadrangle.

Fig. 2 Drawing shapes from triangles

Make 4 equal triangles from 9 sticks. Think about how to do this, tell, then complete the task.

After that, the teacher invites the children to draw the drawn figures on the blackboard with chalk and tell about the sequence of the assignment.

Questions for analysis: “How did you make 4 equal triangles from 9 sticks? Which of the triangles was the first one? What figures did you get as a result and how many?”

The teacher, clarifying the answers of the children, says: “You can start to make a figure from any triangle, and then attach others to it on the right or left, above or below.”.

Purpose. Exercise children in independent searches for ways to draw up shapes based on preliminary thinking about the solution.

Progress. The teacher asks the children questions: “How many sticks can be used to make a square, each side of which is equal to one stick? 2 squares? (From 8 and 7). How will you make 2 squares from 7 sticks?”

Count 10 sticks and make 3 equal squares from them. Think about how to compose and tell.

As the teacher progresses, the teacher calls several children to sketch the figures they have compiled on the board and tell the sequence of drawing up. Invites all children to make a figure of 3 equal squares, arranged in a row, horizontally. Draws the same on the board and says: “Look at the board. Here is a drawing of how you can solve this problem in different ways. You can attach another to one square, and then a third. (Shows.) Or you can make a rectangle of 8 sticks, then divide it into 3 equal squares with 2 sticks. ” (Shows.) Then he asks questions: “What shapes did you get and how many? How many rectangles did you get? Find and show them.”.

Make a square and 2 equal triangles from 5 sticks. Tell first and then compose.

When performing this task, children, as a rule, make a mistake: they make 2 triangles in the learned way. by attaching, as a result of which a quadrangle is obtained. Therefore, the teacher draws the attention of the children to the condition of the problem, the need to draw up a square, offers leading questions: “How many sticks do you need to make a square? Since you have sticks? Is it possible to make it by attaching 1 triangle to another? How to make it? What figure should you start making?” ” After completing the task, the children explain how they did it: you need to make a square and divide it with 1 stick into 2 equal triangles.

Purpose. Exercise children in the ability to express a conjectural decision, guess.

Progress. 1. Make a square and 4 triangles from 9 sticks. Think and say how to compose. (Several children speculate.)

If the children find it difficult, the teacher advises: “Remember how you made a square and 2 triangles from 5 sticks. Think and guess how you can complete the task. The one who is the first to solve the problem will draw the resulting figure on the board.”.

The Missing Square Illusion

After completing and sketching the answer, the teacher invites all children to compose the same figures for themselves

Fig. 3 Drawing shapes from triangles

Questions for analysis: “What geometric shapes did you get? How many triangles, squares, quadrangles? How did you make it up? How is it more convenient, faster to make it up?”

Make 2 squares from 10 sticks. small and large.

Make 5 triangles from 9 sticks.

If necessary, during the implementation of the second and third tasks, the teacher gives leading questions, advice: “Think first, then make up. Do not repeat mistakes, look for a new solution. Does the problem say about the size of the triangles? These are tasks for ingenuity, you need to figure it out, guess, how to solve the problem “.

See also  How to cut a square into 7 triangles

So, in the initial period of teaching 5-year-old children to solve simple problems with ingenuity, they independently, basically practically acting with sticks, look for a solution. In order to develop their ability to plan a train of thought, children should be asked to express preliminary reasoning or combine them with practical tests, explain the method and way of solving.

Several types of solutions to problems of the first group are possible. Having mastered the method of attaching the figures, provided that the sides are common, children very easily and quickly give 2-3 solutions. At the same time, each figure differs from the previous one in spatial position. At the same time, children master the method of constructing given figures by dividing the resulting geometric figure into several (a quadrangle or square into 2 triangles, a rectangle into 3 squares).

The solution with children of 5-6 years old of more complex problems of rebuilding figures should be started with those in which, in order to change the figure, it is necessary to remove a certain number of sticks and the simplest ones. to shift the sticks.

The process of finding solutions to problems of the second and third groups by children is much more complicated than that of the first group. To do this, you need to remember and comprehend the nature of the transformation and the result (what figures should be obtained and how many) and constantly, in the course of searching for a solution, correlate it with the proposed or already implemented changes. In the process of solving, a visual and mental analysis of the task is required, the ability to imagine possible changes in the figure.

Thus, in the process of solving problems, children must master such mental operations of analyzing the problem, as a result of which it is possible to mentally imagine various transformations, check them, then, discarding the wrong ones, look for and try new solutions. Education should be aimed at developing in children the ability to think over moves mentally, solve a problem in full or in part in the mind, limit practical tests.

In what sequence should children 5-6 years old be offered tasks for ingenuity of the second and third groups?

  • In a shape consisting of 5 squares, remove 4 sticks, leaving one rectangle

Fig. four

  • In a 6-square shape, remove 2 sticks to leave 4 equal squares

Fig. five

  • Make a house of 6 sticks, and then shift 2 sticks so that you get a flag

Fig. 6

  • In this figure, shift 2 sticks to get 3 equal triangles

Fig. 7

  • In a figure consisting of 5 squares, remove 3 sticks so that 3 of the same squares remain

Fig. eight

  • In a figure consisting of 4 squares, remove 2 sticks to leave 2 unequal squares

Fig. nine

  • In a figure of 5 squares, remove 4 sticks so that 2 unequal squares remain

Fig. 10

  • In a figure of 5 squares, remove 4 sticks so that 3 squares remain

Fig. eleven

  • In a figure of 4 squares, shift 2 sticks so that you get 5 squares

Fig. 12

  • In a figure of 5 squares, remove 4 sticks so that 3 squares remain

Fig. 13

For these and other similar tasks for ingenuity, it is characteristic that the transformation required for the solution leads to a change in the number of squares from which a given figure is composed (tasks 2, 5, etc.), a change in their size (tasks 6, 7), a modification shapes, such as converting squares to rectangles in task 1.

In the course of classes, with the aim of guiding the search activity of children, the educator uses various techniques that contribute to fostering in them a positive attitude towards a long persistent search, but at the same time quickness of reaction, refusal from the developed path of search. The interest of children is supported by the desire to achieve success, which requires active work of thought.

Cut photo into equal parts online

The main thing is to specify the picture on your computer or phone, if necessary, indicate how many parts should be in width and height, click OK, wait a couple of seconds, download the result. The rest of the settings are already set by default. There is also the usual photo cropping, where you can specify how many% or pixels to crop on each side.

An example of a photo before and after cutting into two equal parts vertically, the default settings are:

On this site, you can cut a photo anyway, the first picture below is cut into nine parts of the same size (3×3 format), the second picture is cut into two equal parts horizontally (1×2 format):

With the help of this online service, you can cut a picture into two, three, four, five or even 900 equal or square parts, as well as automatically cut a photo for Instagram, specifying only the desired crop format, for example, 3×2 for a horizontal photo, 3×3 for a square or 3×4 for vertical. If you need to process a huge picture of more than 100 megapixels, cut it into more parts or need a different numbering of sliced.jpg files, then write to the box. it will be done for free within 24 hours.

The original image does not change. You will be given several pictures cut into equal parts.