They are bs_polygon_rotate (who, fairly obviously, rotates the polygon points) and bs_polygon_mul (who, not so obviously, changes the polygon size, or multiplies the point values in the x and y directions) and bs_polygon_move (which moves the polygon somewhere else - often to the cursor location, which helps a lot if you are defining you shape around 0, 0 instead of around the cursor). We could get more complicated and define these points around the current cursor location or mathematically define the hexagon by means of a formula or trigonometric calculations, but we’ll keep the code fairly simple for now and manually define the points around 0, 0 - this makes it much easier to define different shapes.Īfter bs_polygon knows the corner points, bs_fill will use these points to draw and fill the polygon inīs_polygon also has some interfering relatives, who can change things around before bs_fill gets to them. This draws the hexagon around a theoretical point of 0, 0 (like drawing on graph paper, with both the x and y axis each going through the middle of the page). To define a polygon, main only has to define the corners - pass each corner point to bs_polygon (one at a time, bs_polygon has a great memory, but can only handle one corner location at a time).įor example, using the coordinates of the corner points of a hexagon can go something like this: bs_polygon(5, -8.7) For this, FireAlpaca (and thus main) commands two friends, bs_polygon (with a great memory) and bs_fill (not so smart, but hard working). One way of doing this is to draw polygons. 4 notes JMaking brush scripts, part 6 Minion with a plan: Drawing polygonsįireAlpaca may provide pre-defined drawing functions/minions like bs_ellipse, but you can also define your own shapes.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |