Code

5b57e2c4995a5b806d0f769278504b3294bc1c52
[inkscape.git] / share / extensions / draw_from_triangle.inx
1 <?xml version="1.0" encoding="UTF-8"?>
2 <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
3     <_name>Draw From Triangle</_name>
4     <id>il.fromtriangle</id>
5     <dependency type="executable" location="extensions">draw_from_triangle.py</dependency>
6     <dependency type="executable" location="extensions">inkex.py</dependency>
7     <param name="tab" type="notebook">
8         <page name="common1" _gui-text="Common Objects">
9             <param name="circumcircle"    type="boolean" _gui-text="Circumcircle"></param>
10             <param name="circumcentre"    type="boolean" _gui-text="Circumcentre"></param>
11             <param name="incircle"        type="boolean" _gui-text="Incircle"></param>
12             <param name="incentre"        type="boolean" _gui-text="Incentre"></param>
13             <param name="contact_tri"     type="boolean" _gui-text="Contact Triangle"></param>
14             <param name="excircles"       type="boolean" _gui-text="Excircles"></param>
15             <param name="excentres"       type="boolean" _gui-text="Excentres"></param>
16             <param name="extouch_tri"     type="boolean" _gui-text="Extouch Triangle"></param>
17             <param name="excentral_tri"   type="boolean" _gui-text="Excentral Triangle"></param>
18             <param name="orthocentre"     type="boolean" _gui-text="Orthocentre"></param>
19             <param name="orthic_tri"      type="boolean" _gui-text="Orthic Triangle"></param>
20             <param name="altitudes"       type="boolean" _gui-text="Altitudes"></param>
21             <param name="anglebisectors"  type="boolean" _gui-text="Angle Bisectors"></param>
22             <param name="centroid"        type="boolean" _gui-text="Centroid"></param>
23             <param name="ninepointcentre" type="boolean" _gui-text="Nine-Point Centre"></param>
24             <param name="ninepointcircle" type="boolean" _gui-text="Nine-Point Circle"></param>
25             <param name="symmedians"      type="boolean" _gui-text="Symmedians"></param>
26             <param name="sym_point"       type="boolean" _gui-text="Symmedian Point"></param>
27             <param name="sym_tri"         type="boolean" _gui-text="Symmedial Triangle"></param>
28             <param name="gergonne_pt"     type="boolean" _gui-text="Gergonne Point"></param>
29             <param name="nagel_pt"        type="boolean" _gui-text="Nagel Point"></param>
30         </page>
31         <page name="Custom" _gui-text="Custom Points and Options">
32             <param name="mode" type="optiongroup" _gui-text="Custom Point Specified By:">
33                 <_option value="trilin">Trilinear Coordinates</_option>
34                 <_option value="tcf">Triangle Function</_option>
35             </param>
36             <param name="cust_str"      type="string"  _gui-text="Point At">cos(a_a):cos(a_b):cos(a_c)</param>
37             <param name="cust_pt"       type="boolean" _gui-text="Draw Marker At This Point"></param>
38             <param name="cust_radius"   type="boolean" _gui-text="Draw Circle Around This Point"></param>
39             <param name="radius"        type="string"  _gui-text="Radius / px">s_a*s_b*s_c/(4*area)</param>
40             <param name="isogonal_conj" type="boolean" _gui-text="Draw Isogonal Conjugate"></param>
41             <param name="isotomic_conj" type="boolean" _gui-text="Draw Isotomic Conjugate"></param>
42             <param name="report" type="boolean" _gui-text="Report this triangle's properties"></param>
43         </page>
44         <page name="Help" _gui-text="Help">
45             <_param name="instructions" type="description" 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.
46             
47 All units are the Inkscape's pixel unit. Angles are all in radians.
48 You can specify a point by trilinear coordinates or by a triangle centre function.
49 Enter as functions of the side length or angles.
50 Trilinear elements should be separated by a colon: ':'.
51 Side lengths are represented as 's_a', 's_b' and 's_c'.
52 Angles corresponding to these are 'a_a', 'a_b', and 'a_c'.
53 You can also use the semi-perimeter and area of the triangle as constants. Write 'area' or 'semiperim' for these.
55 You can use any standard Python math function:
56 ceil(x); fabs(x); floor(x); fmod(x,y); frexp(x); ldexp(x,i); 
57 modf(x); exp(x); log(x [, base]); log10(x); pow(x,y); sqrt(x); 
58 acos(x); asin(x); atan(x); atan2(y,x); hypot(x,y); 
59 cos(x); sin(x); tan(x); degrees(x); radians(x); 
60 cosh(x); sinh(x); tanh(x)
62 Also available are the inverse trigonometric functions:
63 sec(x); csc(x); cot(x)
65 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.
66             </_param>
67         </page>
68     </param>
69     <effect>
70         <object-type>all</object-type>
71                 <effects-menu>
72                     <submenu _name="Render"/>
73                 </effects-menu>
74     </effect>
75     <script>
76         <command reldir="extensions" interpreter="python">draw_from_triangle.py</command>
77     </script>
78 </inkscape-extension>