Discussing the article: "MQL5 Trading Tools (Part 28): Filling Sweep Polygons for Butterfly Curve in MQL5"
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: MQL5 Trading Tools (Part 28): Filling Sweep Polygons for Butterfly Curve in MQL5.
We expand the capabilities of the MetaTrader 5 butterfly curve canvas by adding multi-layered wing fills, vein lines, scale dots, and a full body (abdomen, thorax, head, eyes, antennae). This article implements polygon fills with vertical and radial gradients, as well as filled circles and ellipses, all using supersampling antialiasing. You will also receive reusable MQL5 helper functions and a rendering order that transforms a simple curve into a customizable, detailed chart illustration.
Wing veins are then drawn as thin lines radiating from the body center out to sampled points along the wing boundary, mimicking the structural veins that give real wings their rigidity. Wing scales are rendered as small filled dots placed densely along the wing edge, each colored to match its parametric segment and slightly lightened toward the outer edge for a shimmering appearance, with a second inward dot added for depth. The body sits at the center of the whole composition — a thorax ellipse, ten tapered abdomen segments narrowing to a tip, a round head with a highlight, compound eyes with shine dots, and two arcing antennae built from overlapping circles ending in club tips.
We implement each layer as a separate function. We collect all parametric points upfront, convert them to pixel space, and render them through the same supersampled pipeline as in the previous part. This ensures consistent anti-aliased quality for fills, veins, scales, and body details. In brief, here is a visual representation of what we will achieve.
Author: Allan Munene Mutiiria