summaryrefslogtreecommitdiffstats
path: root/share/extensions/draw_from_triangle.inx
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
commitcca66b9ec4e494c1d919bff0f71a820d8afab1fa (patch)
tree146f39ded1c938019e1ed42d30923c2ac9e86789 /share/extensions/draw_from_triangle.inx
parentInitial commit. (diff)
downloadinkscape-upstream/1.2.2.tar.xz
inkscape-upstream/1.2.2.zip
Adding upstream version 1.2.2.upstream/1.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'share/extensions/draw_from_triangle.inx')
-rw-r--r--share/extensions/draw_from_triangle.inx75
1 files changed, 75 insertions, 0 deletions
diff --git a/share/extensions/draw_from_triangle.inx b/share/extensions/draw_from_triangle.inx
new file mode 100644
index 0000000..116e3f5
--- /dev/null
+++ b/share/extensions/draw_from_triangle.inx
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
+ <name>Draw From Triangle</name>
+ <id>org.inkscape.render.draw_from_triangle</id>
+ <param name="tab" type="notebook">
+ <page name="common1" gui-text="Common Objects">
+ <param name="circumcircle" type="bool" gui-text="Circumcircle">false</param>
+ <param name="circumcentre" type="bool" gui-text="Circumcentre">false</param>
+ <param name="incircle" type="bool" gui-text="Incircle">false</param>
+ <param name="incentre" type="bool" gui-text="Incentre">false</param>
+ <param name="contact_tri" type="bool" gui-text="Contact Triangle">false</param>
+ <param name="excircles" type="bool" gui-text="Excircles">false</param>
+ <param name="excentres" type="bool" gui-text="Excentres">false</param>
+ <param name="extouch_tri" type="bool" gui-text="Extouch Triangle">false</param>
+ <param name="excentral_tri" type="bool" gui-text="Excentral Triangle">false</param>
+ <param name="orthocentre" type="bool" gui-text="Orthocentre">false</param>
+ <param name="orthic_tri" type="bool" gui-text="Orthic Triangle">false</param>
+ <param name="altitudes" type="bool" gui-text="Altitudes">false</param>
+ <param name="anglebisectors" type="bool" gui-text="Angle Bisectors">false</param>
+ <param name="centroid" type="bool" gui-text="Centroid">false</param>
+ <param name="ninepointcentre" type="bool" gui-text="Nine-Point Centre">false</param>
+ <param name="ninepointcircle" type="bool" gui-text="Nine-Point Circle">false</param>
+ <param name="symmedians" type="bool" gui-text="Symmedians">false</param>
+ <param name="sym_point" type="bool" gui-text="Symmedian Point">false</param>
+ <param name="sym_tri" type="bool" gui-text="Symmedial Triangle">false</param>
+ <param name="gergonne_pt" type="bool" gui-text="Gergonne Point">false</param>
+ <param name="nagel_pt" type="bool" gui-text="Nagel Point">false</param>
+ </page>
+ <page name="Custom" gui-text="Custom Points and Options">
+ <param name="mode" type="optiongroup" appearance="combo" gui-text="Custom Point Specified By:">
+ <option value="trilin">Trilinear Coordinates</option>
+ <option value="tcf">Triangle Function</option>
+ </param>
+ <param name="cust_str" type="string" gui-text="Point At:">cos(a_a):cos(a_b):cos(a_c)</param>
+ <param name="cust_pt" type="bool" gui-text="Draw Marker At This Point">false</param>
+ <param name="cust_radius" type="bool" gui-text="Draw Circle Around This Point">false</param>
+ <param name="radius" type="string" gui-text="Radius (px):">s_a*s_b*s_c/(4*area)</param>
+ <param name="isogonal_conj" type="bool" gui-text="Draw Isogonal Conjugate">false</param>
+ <param name="isotomic_conj" type="bool" gui-text="Draw Isotomic Conjugate">false</param>
+ </page>
+ <page name="Help" gui-text="Help">
+ <label xml:space="preserve">This extension draws constructions about a triangle defined by the first 3 nodes of a selected path. You may select one of preset objects or create your own ones.
+
+All units are the Inkscape's pixel unit. Angles are all in radians.
+You can specify a point by trilinear coordinates or by a triangle centre function.
+Enter as functions of the side length or angles.
+Trilinear elements should be separated by a colon: ':'.
+Side lengths are represented as 's_a', 's_b' and 's_c'.
+Angles corresponding to these are 'a_a', 'a_b', and 'a_c'.
+You can also use the semi-perimeter and area of the triangle as constants. Write 'area' or 'semiperim' for these.
+
+You can use any standard Python math function:
+ceil(x); fabs(x); floor(x); fmod(x,y); frexp(x); ldexp(x,i);
+modf(x); exp(x); log(x [, base]); log10(x); pow(x,y); sqrt(x);
+acos(x); asin(x); atan(x); atan2(y,x); hypot(x,y);
+cos(x); sin(x); tan(x); degrees(x); radians(x);
+cosh(x); sinh(x); tanh(x)
+
+Also available are the inverse trigonometric functions:
+sec(x); csc(x); cot(x)
+
+You can specify the radius of a circle around a custom point using a formula, which may also contain the side lengths, angles, etc. You can also plot the isogonal and isotomic conjugate of the point. Be aware that this may cause a divide-by-zero error for certain points.
+ </label>
+ </page>
+ </param>
+ <effect>
+ <object-type>all</object-type>
+ <effects-menu>
+ <submenu name="Render"/>
+ </effects-menu>
+ </effect>
+ <script>
+ <command location="inx" interpreter="python">draw_from_triangle.py</command>
+ </script>
+</inkscape-extension>