Tag:Regular triangle

  • Summary of triangle bubble effect in Android


    In the development process, we may often encounter such requirement styles: This picture is a pop-up box for intercepting Jingdong’s message notification. We can see the bubble effect of a triangle on the top right. This is just one of them. The direction of the triangle can also be up, down, left and right. Through […]

  • JavaScript graphic example: plane mosaic pattern


    Mosaic with one or several plane figures of the same shape and size, and lay them together without any gap or overlap, is called plane mosaic of these figures. 1. A planar mosaic pattern realized by a polygon We can use regular triangle, square or regular hexagon to realize plane mosaic. (1) Tile with a […]

  • JavaScript animation example: rotated equilateral triangle


    Given that the coordinates of the center of gravity of an equilateral triangle are (x0, Y0) and the height is h, you can draw an equilateral triangle with horizontal bottom edge with the following statement.          ctx.beginPath();          ctx.moveTo(x0,y0-h*2/3);          ctx.lineTo(x0+h/Math.sqrt(3), y0+h/3);           ctx.lineTo(x0-h/Math.sqrt(3), y0+h/3);          ctx.lineTo(x0,y0-h*2/3);          ctx.closePath();          ctx.stroke(); Given the number of […]