Template:Pentagram

d="m19,95 31-95 31,95-81-59h100"

Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:Pentagram/doc.

Generates the "d" attribute string for a path to draw a pentagram in SVG

This documentation template can be used to calculate the values for a pentagram:

Open this /doc template in edit mode, replace in the first line the "example" value and show the preview;
then copy the displayed "d" value string from the "renders as" box, finally please cancel the edit

👐 
Please do not save your change!

Or when you need more parameters, calculate it elsewhere, e.g. on your talk page.

Usage

{{Pentagram |1= }}

Template parameters

ParameterDescriptionDefaultStatus
1width: length of the horizontal stroke100optional
2number of decimal fractions: 0 means rounded to integers0optional
3x value horizontal offsetemptyoptional
4y value vertical offsetemptyoptional
5when "A" then 3 and 4 are the coordinates of point "A", else of point "E";

when 3 and 4 both are missing, the pentagram is located in the upper left corner.
with 5=5 the (fillable) outlines of a pentagram are drawn.

with 5=G the code for drawing a pentagon is generated
emptyoptional

Additional information

The template is intended to be used in the following namespaces: the Template namespace

The template is intended to be used by the following user groups: all users

Placement:

just for online test.
This is the string for the filled pentagram. A stroke needs an additional "z" command.

Example

{{Pentagram|240}}

renders as:

d="m46,228 74-228 74,228-194-141h240"

See also

Das Pentagramm als manuelle SVG-Grafik (de)

Another example: The d-string for a pentagram of width=162 with point A at 180,220:
{{Pentagram|162|0|180|220|A}} renders as d="m211,315 50-154 50,154-131-95h162"


An example of the d-string for the outlines of pentagram with width=130 (50+15+15+50) at offset 10,13
{{Pentagram|130|0|10|13|5}} renders as d="m75,13 15,47h50l-40,29 15,47-40-29-40,29 15-47-40-29h50z"


Example file

{{Pentagram|58|2|45|69}} gives d="m45,69 17.92-55.16 17.92,55.16-46.92-34.09h58"

and {{Pentagram|58|0|45|69}} rounded d="m45,69 18-55 18,55-47-34h58"

for a drawing

Pentagram flag
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" width="126" height="84">
<circle fill="#DA121A" r="152"/>
<path fill="#FFF" d="m45,69 18-55 18,55-47-34h58"/>
</svg>

Localization

This template is not intended to be localized.

Examples

Pentagram: d="m124.9,621.99 202.1-621.99 202.1,621.99-529.1-384.41h654"


Five-Star: d="m327,0 77.19,237.58h249.81l-202.1,146.83 77.19,237.58-202.1-146.83-202.1,146.83 77.19-237.58-202.1-146.83h249.81z"


Pentagon: d="m36,158-30.9-95.11,79.19-58.78,79.19,58.78-30.9,95.11z"