Template:Pentagram/doc
path
to draw a pentagram in SVGThis documentation template can be used to calculate the values for a pentagram:
Open this /doc template in 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
Or when you need more parameters, calculate it elsewhere, e.g. on your talk page.
Usage
{{Pentagram |1= }}
Template parameters
Parameter | Description | Default | Status | |
---|---|---|---|---|
1 | width: length of the horizontal stroke | 100 | optional | |
2 | number of decimal fractions: 0 means rounded to integers | 0 | optional | |
3 | x value horizontal offset | empty | optional | |
4 | y value vertical offset | empty | optional | |
5 | when "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. | empty | optional |
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
![](https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/PentaFlag.svg/120px-PentaFlag.svg.png)
<?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"