/usr/share/doc/python-gts/gts.html is in python-gts 0.3.1-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 | <html><head><title>Python: package gts</title>
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>gts</strong></big></big></font></td
></tr></table>
<p><tt>PyGTS is a python binding for the GNU Triangulated <a href="#Surface">Surface</a> (GTS) <br>
Library, which may be used to build, manipulate, and perform<br>
computations on triangulated surfaces.<br>
<br>
The following geometric primitives are provided:<br>
<br>
<a href="#Point">Point</a> - a point in 3D space<br>
<a href="#Vertex">Vertex</a> - a <a href="#Point">Point</a> in 3D space that may be used to define a <a href="#Segment">Segment</a><br>
<a href="#Segment">Segment</a> - a line defined by two <a href="#Vertex">Vertex</a> end-points<br>
<a href="#Edge">Edge</a> - a <a href="#Segment">Segment</a> that may be used to define the edge of a <a href="#Triangle">Triangle</a><br>
<a href="#Triangle">Triangle</a> - a triangle defined by three Edges<br>
<a href="#Face">Face</a> - a <a href="#Triangle">Triangle</a> that may be used to define a face on a <a href="#Surface">Surface</a><br>
<a href="#Surface">Surface</a> - a surface composed of Faces<br>
<br>
A tetrahedron is assembled from these primitives as follows. First,<br>
create Vertices for each of the tetrahedron's points:<br>
<br>
import gts<br>
<br>
v1 = gts.<a href="#Vertex">Vertex</a>(1,1,1)<br>
v2 = gts.<a href="#Vertex">Vertex</a>(-1,-1,1)<br>
v3 = gts.<a href="#Vertex">Vertex</a>(-1,1,-1)<br>
v4 = gts.<a href="#Vertex">Vertex</a>(1,-1,-1)<br>
<br>
Next, connect the four vertices to create six unique Edges:<br>
<br>
e1 = gts.<a href="#Edge">Edge</a>(v1,v2)<br>
e2 = gts.<a href="#Edge">Edge</a>(v2,v3)<br>
e3 = gts.<a href="#Edge">Edge</a>(v3,v1)<br>
e4 = gts.<a href="#Edge">Edge</a>(v1,v4)<br>
e5 = gts.<a href="#Edge">Edge</a>(v4,v2)<br>
e6 = gts.<a href="#Edge">Edge</a>(v4,v3)<br>
<br>
The four triangular faces are composed using three edges each:<br>
<br>
f1 = gts.<a href="#Face">Face</a>(e1,e2,e3)<br>
f2 = gts.<a href="#Face">Face</a>(e1,e4,e5)<br>
f3 = gts.<a href="#Face">Face</a>(e2,e5,e6)<br>
f4 = gts.<a href="#Face">Face</a>(e3,e4,e6)<br>
<br>
Finally, the surface is assembled from the faces:<br>
<br>
s = gts.<a href="#Surface">Surface</a>()<br>
for face in [f1,f2,f3,f4]:<br>
s.add(face)<br>
<br>
Some care must be taken in the orientation of the faces. In the above<br>
example, the surface normals are pointing inward, and so the surface<br>
technically defines a void, rather than a solid. To create a <br>
tetrahedron with surface normals pointing outward, use the following<br>
instead:<br>
<br>
f1.revert()<br>
s = <a href="#Surface">Surface</a>()<br>
for face in [f1,f2,f3,f4]:<br>
if not face.is_compatible(s):<br>
face.revert()<br>
s.add(face)<br>
<br>
Once the <a href="#Surface">Surface</a> is constructed, there are many different operations that<br>
can be performed. For example, the volume can be calculated using:<br>
<br>
s.volume()<br>
<br>
The difference between two Surfaces s1 and s2 is given by:<br>
<br>
s3 = s2.difference(s1)<br>
<br>
Etc.<br>
<br>
It is also possible to read in GTS data files and plot surfaces to<br>
the screen. See the example programs packaged with PyGTS for<br>
more information.</tt></p>
<p>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="gts.html#Object">Object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="gts.html#Point">Point</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="gts.html#Vertex">Vertex</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="gts.html#Segment">Segment</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="gts.html#Edge">Edge</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="gts.html#Surface">Surface</a>
</font></dt><dt><font face="helvetica, arial"><a href="gts.html#Triangle">Triangle</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="gts.html#Face">Face</a>
</font></dt></dl>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Edge">class <strong>Edge</strong></a>(<a href="gts.html#Segment">Segment</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt><a href="#Edge">Edge</a> <a href="__builtin__.html#object">object</a><br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="gts.html#Edge">Edge</a></dd>
<dd><a href="gts.html#Segment">Segment</a></dd>
<dd><a href="gts.html#Object">Object</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Edge-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#Edge-__init__">__init__</a>(...) initializes x; see x.__class__.__doc__ for signature</tt></dd></dl>
<dl><dt><a name="Edge-belongs_to_tetrahedron"><strong>belongs_to_tetrahedron</strong></a>(...)</dt><dd><tt>Returns True if this <a href="#Edge">Edge</a> e belongs to a tetrahedron.<br>
Otherwise False.<br>
<br>
Signature: e.<a href="#Edge-belongs_to_tetrahedron">belongs_to_tetrahedron</a>()</tt></dd></dl>
<dl><dt><a name="Edge-contacts"><strong>contacts</strong></a>(...)</dt><dd><tt>Returns number of sets of connected triangles share this <a href="#Edge">Edge</a> e<br>
as a contact <a href="#Edge">Edge</a>.<br>
<br>
Signature: e.<a href="#Edge-contacts">contacts</a>()</tt></dd></dl>
<dl><dt><a name="Edge-face_number"><strong>face_number</strong></a>(...)</dt><dd><tt>Returns number of faces using this <a href="#Edge">Edge</a> e on <a href="#Surface">Surface</a> s.<br>
<br>
Signature: e.<a href="#Edge-face_number">face_number</a>(s)</tt></dd></dl>
<dl><dt><a name="Edge-is_boundary"><strong>is_boundary</strong></a>(...)</dt><dd><tt>Returns True if this <a href="#Edge">Edge</a> e is a boundary on <a href="#Surface">Surface</a> s.<br>
Otherwise False.<br>
<br>
Signature: e.<a href="#Edge-is_boundary">is_boundary</a>(s)</tt></dd></dl>
<dl><dt><a name="Edge-is_ok"><strong>is_ok</strong></a>(...)</dt><dd><tt>True if this <a href="#Edge">Edge</a> e is not degenerate or duplicate.<br>
False otherwise. Degeneracy implies e.v1.id == e.v2.id.<br>
<br>
Signature: e.<a href="#Edge-is_ok">is_ok</a>()</tt></dd></dl>
<dl><dt><a name="Edge-is_unattached"><strong>is_unattached</strong></a>(...)</dt><dd><tt>True if this <a href="#Edge">Edge</a> e is not part of any <a href="#Triangle">Triangle</a>.<br>
<br>
Signature: e.<a href="#Edge-is_unattached">is_unattached</a>()</tt></dd></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0x75c780><dd><tt>T.<a href="#Edge-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl>
<hr>
Methods inherited from <a href="gts.html#Segment">Segment</a>:<br>
<dl><dt><a name="Edge-__cmp__"><strong>__cmp__</strong></a>(...)</dt><dd><tt>x.<a href="#Edge-__cmp__">__cmp__</a>(y) <==> cmp(x,y)</tt></dd></dl>
<dl><dt><a name="Edge-connects"><strong>connects</strong></a>(...)</dt><dd><tt>Returns True if this <a href="#Segment">Segment</a> s1 connects Vertices v1 and v2.<br>
False otherwise.<br>
<br>
Signature: s1.<a href="#Edge-connects">connects</a>(v1,v2).</tt></dd></dl>
<dl><dt><a name="Edge-intersection"><strong>intersection</strong></a>(...)</dt><dd><tt>Returns the intersection of <a href="#Segment">Segment</a> s with <a href="#Triangle">Triangle</a> t<br>
<br>
This function is geometrically robust in the sense that it will<br>
return None if s and t do not intersect and will return a<br>
<a href="#Vertex">Vertex</a> if they do. However, the point coordinates are subject<br>
to round-off errors. None will be returned if s is contained<br>
in the plane defined by t.<br>
<br>
Signature: s.<a href="#Edge-intersection">intersection</a>(t) or s.<a href="#Edge-intersection">intersection</a>(t,boundary).<br>
<br>
If boundary is True (default), the boundary of s is taken into<br>
account.<br>
<br>
Returns a summit of t (if boundary is True), one of the endpoints<br>
of s, a new <a href="#Vertex">Vertex</a> at the intersection of s with t, or None if<br>
s and t don't intersect.</tt></dd></dl>
<dl><dt><a name="Edge-intersects"><strong>intersects</strong></a>(...)</dt><dd><tt>Checks if this <a href="#Segment">Segment</a> s1 intersects with <a href="#Segment">Segment</a> s2.<br>
Returns 1 if they intersect, 0 if an endpoint of one <a href="#Segment">Segment</a> lies<br>
on the other <a href="#Segment">Segment</a>, -1 otherwise<br>
<br>
Signature: s1.<a href="#Edge-intersects">intersects</a>(s2).</tt></dd></dl>
<dl><dt><a name="Edge-midvertex"><strong>midvertex</strong></a>(...)</dt><dd><tt>Returns a new <a href="#Vertex">Vertex</a> at the mid-point of this <a href="#Segment">Segment</a> s.<br>
<br>
Signature: s.<a href="#Edge-midvertex">midvertex</a>().</tt></dd></dl>
<dl><dt><a name="Edge-touches"><strong>touches</strong></a>(...)</dt><dd><tt>Returns True if this <a href="#Segment">Segment</a> s1 touches <a href="#Segment">Segment</a> s2<br>
(i.e., they share a common <a href="#Vertex">Vertex</a>). False otherwise.<br>
<br>
Signature: s1.<a href="#Edge-touches">touches</a>(s2).</tt></dd></dl>
<hr>
Data descriptors inherited from <a href="gts.html#Segment">Segment</a>:<br>
<dl><dt><strong>v1</strong></dt>
<dd><tt>Vertex 1</tt></dd>
</dl>
<dl><dt><strong>v2</strong></dt>
<dd><tt>Vertex 2</tt></dd>
</dl>
<hr>
Data descriptors inherited from <a href="gts.html#Object">Object</a>:<br>
<dl><dt><strong>id</strong></dt>
<dd><tt>GTS object id</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Face">class <strong>Face</strong></a>(<a href="gts.html#Triangle">Triangle</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt><a href="#Face">Face</a> <a href="__builtin__.html#object">object</a><br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="gts.html#Face">Face</a></dd>
<dd><a href="gts.html#Triangle">Triangle</a></dd>
<dd><a href="gts.html#Object">Object</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Face-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#Face-__init__">__init__</a>(...) initializes x; see x.__class__.__doc__ for signature</tt></dd></dl>
<dl><dt><a name="Face-is_compatible"><strong>is_compatible</strong></a>(...)</dt><dd><tt>True if <a href="#Face">Face</a> f is compatible with all neighbors in <a href="#Surface">Surface</a> s.<br>
False otherwise.<br>
<br>
Signature: f.<a href="#Face-is_compatible">is_compatible</a>(s).</tt></dd></dl>
<dl><dt><a name="Face-is_ok"><strong>is_ok</strong></a>(...)</dt><dd><tt>True if this <a href="#Face">Face</a> f is non-degenerate and non-duplicate.<br>
False otherwise.<br>
<br>
Signature: f.<a href="#Face-is_ok">is_ok</a>()</tt></dd></dl>
<dl><dt><a name="Face-is_on"><strong>is_on</strong></a>(...)</dt><dd><tt>True if this <a href="#Face">Face</a> f is on <a href="#Surface">Surface</a> s. False otherwise.<br>
<br>
Signature: f.<a href="#Face-is_on">is_on</a>(s).</tt></dd></dl>
<dl><dt><a name="Face-is_unattached"><strong>is_unattached</strong></a>(...)</dt><dd><tt>True if this <a href="#Face">Face</a> f is not part of any <a href="#Surface">Surface</a>.<br>
<br>
Signature: f.<a href="#Face-is_unattached">is_unattached</a>().</tt></dd></dl>
<dl><dt><a name="Face-neighbor_number"><strong>neighbor_number</strong></a>(...)</dt><dd><tt>Returns the number of neighbors of <a href="#Face">Face</a> f belonging to <a href="#Surface">Surface</a> s.<br>
<br>
Signature: f.<a href="#Face-neighbor_number">neighbor_number</a>(s).</tt></dd></dl>
<dl><dt><a name="Face-neighbors"><strong>neighbors</strong></a>(...)</dt><dd><tt>Returns a tuple of neighbors of this <a href="#Face">Face</a> f belonging to <a href="#Surface">Surface</a> s.<br>
<br>
Signature: f.<a href="#Face-neighbors">neighbors</a>(s).</tt></dd></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0x75cb00><dd><tt>T.<a href="#Face-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl>
<hr>
Methods inherited from <a href="gts.html#Triangle">Triangle</a>:<br>
<dl><dt><a name="Face-__cmp__"><strong>__cmp__</strong></a>(...)</dt><dd><tt>x.<a href="#Face-__cmp__">__cmp__</a>(y) <==> cmp(x,y)</tt></dd></dl>
<dl><dt><a name="Face-angle"><strong>angle</strong></a>(...)</dt><dd><tt>Returns the angle (radians) between Triangles t1 and t2<br>
<br>
Signature: t1.<a href="#Face-angle">angle</a>(t2)</tt></dd></dl>
<dl><dt><a name="Face-area"><strong>area</strong></a>(...)</dt><dd><tt>Returns the area of <a href="#Triangle">Triangle</a> t.<br>
<br>
Signature: t.<a href="#Face-area">area</a>()</tt></dd></dl>
<dl><dt><a name="Face-circumcenter"><strong>circumcenter</strong></a>(...)</dt><dd><tt>Returns a <a href="#Vertex">Vertex</a> at the center of the circumscribing circle of<br>
this <a href="#Triangle">Triangle</a> t, or None if the circumscribing circle is not<br>
defined.<br>
<br>
Signature: t.circumcircle_center()</tt></dd></dl>
<dl><dt><a name="Face-common_edge"><strong>common_edge</strong></a>(...)</dt><dd><tt>Returns <a href="#Edge">Edge</a> common to both this <a href="#Triangle">Triangle</a> t1 and other t2.<br>
Returns None if the triangles do not share an <a href="#Edge">Edge</a>.<br>
<br>
Signature: t1.<a href="#Face-common_edge">common_edge</a>(t2)</tt></dd></dl>
<dl><dt><a name="Face-interpolate_height"><strong>interpolate_height</strong></a>(...)</dt><dd><tt>Returns the height of the plane defined by <a href="#Triangle">Triangle</a> t at <a href="#Point">Point</a> p.<br>
Only the x- and y-coordinates of p are considered.<br>
<br>
Signature: t.<a href="#Face-interpolate_height">interpolate_height</a>(p)</tt></dd></dl>
<dl><dt><a name="Face-is_stabbed"><strong>is_stabbed</strong></a>(...)</dt><dd><tt>Returns the component of this <a href="#Triangle">Triangle</a> t that is stabbed by a<br>
ray projecting from <a href="#Point">Point</a> p to z=infinity. The result<br>
can be this <a href="#Triangle">Triangle</a> t, one of its Edges or Vertices, or None.<br>
If the ray is contained in the plan of this <a href="#Triangle">Triangle</a> then None is<br>
also returned.<br>
<br>
Signature: t.<a href="#Face-is_stabbed">is_stabbed</a>(p)</tt></dd></dl>
<dl><dt><a name="Face-normal"><strong>normal</strong></a>(...)</dt><dd><tt>Returns a tuple of coordinates of the oriented normal of <a href="#Triangle">Triangle</a> t<br>
as the cross-product of two edges, using the left-hand rule. The<br>
normal is not normalized. If this triangle is part of a closed and<br>
oriented surface, the normal points to the outside of the surface.<br>
<br>
Signature: t.<a href="#Face-normal">normal</a>()</tt></dd></dl>
<dl><dt><a name="Face-opposite"><strong>opposite</strong></a>(...)</dt><dd><tt>Returns <a href="#Vertex">Vertex</a> opposite to <a href="#Edge">Edge</a> e or <a href="#Edge">Edge</a> opposite to <a href="#Vertex">Vertex</a> v<br>
for this <a href="#Triangle">Triangle</a> t.<br>
<br>
Signature: t.<a href="#Face-opposite">opposite</a>(e) or t.<a href="#Face-opposite">opposite</a>(v)</tt></dd></dl>
<dl><dt><a name="Face-orientation"><strong>orientation</strong></a>(...)</dt><dd><tt>Determines orientation of the plane (x,y) projection of <a href="#Triangle">Triangle</a> t<br>
<br>
Signature: t.<a href="#Face-orientation">orientation</a>()<br>
<br>
Returns a positive value if Points p1, p2 and p3 in <a href="#Triangle">Triangle</a> t<br>
appear in counterclockwise order, a negative value if they appear<br>
in clockwise order and zero if they are colinear.</tt></dd></dl>
<dl><dt><a name="Face-perimeter"><strong>perimeter</strong></a>(...)</dt><dd><tt>Returns the perimeter of <a href="#Triangle">Triangle</a> t.<br>
<br>
Signature: t.<a href="#Face-perimeter">perimeter</a>()</tt></dd></dl>
<dl><dt><a name="Face-quality"><strong>quality</strong></a>(...)</dt><dd><tt>Returns the quality of <a href="#Triangle">Triangle</a> t.<br>
<br>
The quality of a triangle is defined as the ratio of the square<br>
root of its surface area to its perimeter relative to this same<br>
ratio for an equilateral triangle with the same area. The quality<br>
is then one for an equilateral triangle and tends to zero for a<br>
very stretched triangle.<br>
Signature: t.<a href="#Face-quality">quality</a>()</tt></dd></dl>
<dl><dt><a name="Face-revert"><strong>revert</strong></a>(...)</dt><dd><tt>Changes the orientation of triangle t, turning it inside out.<br>
<br>
Signature: t.<a href="#Face-revert">revert</a>()</tt></dd></dl>
<dl><dt><a name="Face-vertex"><strong>vertex</strong></a>(...)</dt><dd><tt>Returns the <a href="#Vertex">Vertex</a> of this <a href="#Triangle">Triangle</a> t not in t.e1.<br>
<br>
Signature: t.<a href="#Face-vertex">vertex</a>()</tt></dd></dl>
<dl><dt><a name="Face-vertices"><strong>vertices</strong></a>(...)</dt><dd><tt>Returns the three oriented set of vertices in <a href="#Triangle">Triangle</a> t.<br>
<br>
Signature: t.<a href="#Face-vertices">vertices</a>()</tt></dd></dl>
<hr>
Data descriptors inherited from <a href="gts.html#Triangle">Triangle</a>:<br>
<dl><dt><strong>e1</strong></dt>
<dd><tt>Edge 1</tt></dd>
</dl>
<dl><dt><strong>e2</strong></dt>
<dd><tt>Edge 2</tt></dd>
</dl>
<dl><dt><strong>e3</strong></dt>
<dd><tt>Edge 3</tt></dd>
</dl>
<hr>
Data descriptors inherited from <a href="gts.html#Object">Object</a>:<br>
<dl><dt><strong>id</strong></dt>
<dd><tt>GTS object id</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Object">class <strong>Object</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Base <a href="__builtin__.html#object">object</a><br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Object-__cmp__"><strong>__cmp__</strong></a>(...)</dt><dd><tt>x.<a href="#Object-__cmp__">__cmp__</a>(y) <==> cmp(x,y)</tt></dd></dl>
<dl><dt><a name="Object-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#Object-__init__">__init__</a>(...) initializes x; see x.__class__.__doc__ for signature</tt></dd></dl>
<dl><dt><a name="Object-is_unattached"><strong>is_unattached</strong></a>(...)</dt><dd><tt>True if this <a href="#Object">Object</a> o is not attached to another <a href="#Object">Object</a>.<br>
Otherwise False.<br>
<br>
Trace: o.<a href="#Object-is_unattached">is_unattached</a>().</tt></dd></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>id</strong></dt>
<dd><tt>GTS object id</tt></dd>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0x75c0e0><dd><tt>T.<a href="#Object-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Point">class <strong>Point</strong></a>(<a href="gts.html#Object">Object</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt><a href="#Point">Point</a> <a href="__builtin__.html#object">object</a><br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="gts.html#Point">Point</a></dd>
<dd><a href="gts.html#Object">Object</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Point-__cmp__"><strong>__cmp__</strong></a>(...)</dt><dd><tt>x.<a href="#Point-__cmp__">__cmp__</a>(y) <==> cmp(x,y)</tt></dd></dl>
<dl><dt><a name="Point-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#Point-__init__">__init__</a>(...) initializes x; see x.__class__.__doc__ for signature</tt></dd></dl>
<dl><dt><a name="Point-closest"><strong>closest</strong></a>(...)</dt><dd><tt>Set the coordinates of <a href="#Point">Point</a> p to the <a href="#Point">Point</a> on <a href="#Segment">Segment</a> s<br>
or <a href="#Triangle">Triangle</a> t closest to the <a href="#Point">Point</a> p2<br>
<br>
Signature: p.<a href="#Point-closest">closest</a>(s,p2) or p.<a href="#Point-closest">closest</a>(t,p2)<br>
<br>
Returns the (modified) <a href="#Point">Point</a> p.</tt></dd></dl>
<dl><dt><a name="Point-coords"><strong>coords</strong></a>(...)</dt><dd><tt>Returns a tuple of the x, y, and z coordinates for this <a href="#Point">Point</a> p.<br>
<br>
Signature: p.<a href="#Point-coords">coords</a>(x,y,z)</tt></dd></dl>
<dl><dt><a name="Point-distance"><strong>distance</strong></a>(...)</dt><dd><tt>Returns Euclidean distance between this <a href="#Point">Point</a> p and other <a href="#Point">Point</a> p2,<br>
<a href="#Segment">Segment</a> s, or <a href="#Triangle">Triangle</a> t.<br>
Signature: p.<a href="#Point-distance">distance</a>(p2), p.<a href="#Point-distance">distance</a>(s) or p.<a href="#Point-distance">distance</a>(t)</tt></dd></dl>
<dl><dt><a name="Point-distance2"><strong>distance2</strong></a>(...)</dt><dd><tt>Returns squared Euclidean distance between <a href="#Point">Point</a> p and <a href="#Point">Point</a> p2,<br>
<a href="#Segment">Segment</a> s, or <a href="#Triangle">Triangle</a> t.<br>
<br>
Signature: p.<a href="#Point-distance2">distance2</a>(p2), p.<a href="#Point-distance2">distance2</a>(s), or p.<a href="#Point-distance2">distance2</a>(t)</tt></dd></dl>
<dl><dt><a name="Point-is_in"><strong>is_in</strong></a>(...)</dt><dd><tt>Tests if this <a href="#Point">Point</a> p is inside or outside <a href="#Triangle">Triangle</a> t.<br>
The planar projection (x,y) of <a href="#Point">Point</a> p is tested against the<br>
planar projection of <a href="#Triangle">Triangle</a> t.<br>
<br>
Signature: p.in_circle(p1,p2,p3) or p.in_circle(t) <br>
<br>
Returns a +1 if p lies inside, -1 if p lies outside, and 0<br>
if p lies on the triangle.</tt></dd></dl>
<dl><dt><a name="Point-is_in_circle"><strong>is_in_circle</strong></a>(...)</dt><dd><tt>Tests if this <a href="#Point">Point</a> p is inside or outside circumcircle.<br>
The planar projection (x,y) of <a href="#Point">Point</a> p is tested against the<br>
circumcircle defined by the planar projection of p1, p2 and p3,<br>
or alternatively the <a href="#Triangle">Triangle</a> t<br>
<br>
Signature: p.in_circle(p1,p2,p3) or p.in_circle(t) <br>
<br>
Returns +1 if p lies inside, -1 if p lies outside, and 0 if p lies<br>
on the circle. The Points p1, p2, and p3 must be in<br>
counterclockwise order, or the sign of the result will be reversed.</tt></dd></dl>
<dl><dt><a name="Point-is_in_rectangle"><strong>is_in_rectangle</strong></a>(...)</dt><dd><tt>True if this <a href="#Point">Point</a> p is in box with bottom-left and upper-right<br>
Points p1 and p2.<br>
<br>
Signature: p.is_in_rectange(p1,p2)</tt></dd></dl>
<dl><dt><a name="Point-is_inside"><strong>is_inside</strong></a>(...)</dt><dd><tt>True if this <a href="#Point">Point</a> p is inside or outside <a href="#Surface">Surface</a> s.<br>
False otherwise.<br>
<br>
Signature: p.in_inside(s)</tt></dd></dl>
<dl><dt><a name="Point-is_ok"><strong>is_ok</strong></a>(...)</dt><dd><tt>True if this <a href="#Point">Point</a> p is OK. False otherwise.<br>
This method is useful for unit testing and debugging.<br>
<br>
Signature: p.<a href="#Point-is_ok">is_ok</a>().</tt></dd></dl>
<dl><dt><a name="Point-orientation_3d"><strong>orientation_3d</strong></a>(...)</dt><dd><tt>Determines if this <a href="#Point">Point</a> p is above, below or on plane of 3 Points<br>
p1, p2 and p3.<br>
<br>
Signature: p.<a href="#Point-orientation_3d">orientation_3d</a>(p1,p2,p3)<br>
<br>
Below is defined so that p1, p2 and p3 appear in counterclockwise<br>
order when viewed from above the plane.<br>
<br>
The return value is positive if p4 lies below the plane, negative<br>
if p4 lies above the plane, and zero if the four points are<br>
coplanar. The value is an approximation of six times the signed<br>
volume of the tetrahedron defined by the four points.</tt></dd></dl>
<dl><dt><a name="Point-orientation_3d_sos"><strong>orientation_3d_sos</strong></a>(...)</dt><dd><tt>Determines if this <a href="#Point">Point</a> p is above, below or on plane of 3 Points<br>
p1, p2 and p3.<br>
<br>
Signature: p.<a href="#Point-orientation_3d_sos">orientation_3d_sos</a>(p1,p2,p3)<br>
<br>
Below is defined so that p1, p2 and p3 appear in counterclockwise<br>
order when viewed from above the plane.<br>
<br>
The return value is +1 if p4 lies below the plane, and -1 if p4<br>
lies above the plane. Simulation of Simplicity (SoS) is used to<br>
break ties when the orientation is degenerate (i.e. the point lies<br>
on the plane definedby p1, p2 and p3).</tt></dd></dl>
<dl><dt><a name="Point-rotate"><strong>rotate</strong></a>(...)</dt><dd><tt>Rotates <a href="#Point">Point</a> p around vector dx,dy,dz by angle a.<br>
The sense of the rotation is given by the right-hand-rule.<br>
<br>
Signature: p.<a href="#Point-rotate">rotate</a>(dx=0,dy=0,dz=0,a=0)</tt></dd></dl>
<dl><dt><a name="Point-scale"><strong>scale</strong></a>(...)</dt><dd><tt>Scales <a href="#Point">Point</a> p by vector dx,dy,dz.<br>
<br>
Signature: p.<a href="#Point-scale">scale</a>(dx=1,dy=1,dz=1)</tt></dd></dl>
<dl><dt><a name="Point-set"><strong>set</strong></a>(...)</dt><dd><tt>Sets x, y, and z coordinates of this <a href="#Point">Point</a> p.<br>
<br>
Signature: p.<a href="#Point-set">set</a>(x,y,z)</tt></dd></dl>
<dl><dt><a name="Point-translate"><strong>translate</strong></a>(...)</dt><dd><tt>Translates <a href="#Point">Point</a> p by vector dx,dy,dz.<br>
<br>
Signature: p.<a href="#Point-translate">translate</a>(dx=0,dy=0,dz=0)</tt></dd></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>x</strong></dt>
<dd><tt>x value</tt></dd>
</dl>
<dl><dt><strong>y</strong></dt>
<dd><tt>y value</tt></dd>
</dl>
<dl><dt><strong>z</strong></dt>
<dd><tt>z value</tt></dd>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0x75c200><dd><tt>T.<a href="#Point-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl>
<hr>
Methods inherited from <a href="gts.html#Object">Object</a>:<br>
<dl><dt><a name="Point-is_unattached"><strong>is_unattached</strong></a>(...)</dt><dd><tt>True if this <a href="#Object">Object</a> o is not attached to another <a href="#Object">Object</a>.<br>
Otherwise False.<br>
<br>
Trace: o.<a href="#Point-is_unattached">is_unattached</a>().</tt></dd></dl>
<hr>
Data descriptors inherited from <a href="gts.html#Object">Object</a>:<br>
<dl><dt><strong>id</strong></dt>
<dd><tt>GTS object id</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Segment">class <strong>Segment</strong></a>(<a href="gts.html#Object">Object</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt><a href="#Segment">Segment</a> <a href="__builtin__.html#object">object</a><br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="gts.html#Segment">Segment</a></dd>
<dd><a href="gts.html#Object">Object</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Segment-__cmp__"><strong>__cmp__</strong></a>(...)</dt><dd><tt>x.<a href="#Segment-__cmp__">__cmp__</a>(y) <==> cmp(x,y)</tt></dd></dl>
<dl><dt><a name="Segment-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#Segment-__init__">__init__</a>(...) initializes x; see x.__class__.__doc__ for signature</tt></dd></dl>
<dl><dt><a name="Segment-connects"><strong>connects</strong></a>(...)</dt><dd><tt>Returns True if this <a href="#Segment">Segment</a> s1 connects Vertices v1 and v2.<br>
False otherwise.<br>
<br>
Signature: s1.<a href="#Segment-connects">connects</a>(v1,v2).</tt></dd></dl>
<dl><dt><a name="Segment-intersection"><strong>intersection</strong></a>(...)</dt><dd><tt>Returns the intersection of <a href="#Segment">Segment</a> s with <a href="#Triangle">Triangle</a> t<br>
<br>
This function is geometrically robust in the sense that it will<br>
return None if s and t do not intersect and will return a<br>
<a href="#Vertex">Vertex</a> if they do. However, the point coordinates are subject<br>
to round-off errors. None will be returned if s is contained<br>
in the plane defined by t.<br>
<br>
Signature: s.<a href="#Segment-intersection">intersection</a>(t) or s.<a href="#Segment-intersection">intersection</a>(t,boundary).<br>
<br>
If boundary is True (default), the boundary of s is taken into<br>
account.<br>
<br>
Returns a summit of t (if boundary is True), one of the endpoints<br>
of s, a new <a href="#Vertex">Vertex</a> at the intersection of s with t, or None if<br>
s and t don't intersect.</tt></dd></dl>
<dl><dt><a name="Segment-intersects"><strong>intersects</strong></a>(...)</dt><dd><tt>Checks if this <a href="#Segment">Segment</a> s1 intersects with <a href="#Segment">Segment</a> s2.<br>
Returns 1 if they intersect, 0 if an endpoint of one <a href="#Segment">Segment</a> lies<br>
on the other <a href="#Segment">Segment</a>, -1 otherwise<br>
<br>
Signature: s1.<a href="#Segment-intersects">intersects</a>(s2).</tt></dd></dl>
<dl><dt><a name="Segment-is_ok"><strong>is_ok</strong></a>(...)</dt><dd><tt>True if this <a href="#Segment">Segment</a> s is not degenerate or duplicate.<br>
False otherwise. Degeneracy implies s.v1.id == s.v2.id.<br>
<br>
Signature: s.<a href="#Segment-is_ok">is_ok</a>().</tt></dd></dl>
<dl><dt><a name="Segment-midvertex"><strong>midvertex</strong></a>(...)</dt><dd><tt>Returns a new <a href="#Vertex">Vertex</a> at the mid-point of this <a href="#Segment">Segment</a> s.<br>
<br>
Signature: s.<a href="#Segment-midvertex">midvertex</a>().</tt></dd></dl>
<dl><dt><a name="Segment-touches"><strong>touches</strong></a>(...)</dt><dd><tt>Returns True if this <a href="#Segment">Segment</a> s1 touches <a href="#Segment">Segment</a> s2<br>
(i.e., they share a common <a href="#Vertex">Vertex</a>). False otherwise.<br>
<br>
Signature: s1.<a href="#Segment-touches">touches</a>(s2).</tt></dd></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>v1</strong></dt>
<dd><tt>Vertex 1</tt></dd>
</dl>
<dl><dt><strong>v2</strong></dt>
<dd><tt>Vertex 2</tt></dd>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0x75c600><dd><tt>T.<a href="#Segment-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl>
<hr>
Methods inherited from <a href="gts.html#Object">Object</a>:<br>
<dl><dt><a name="Segment-is_unattached"><strong>is_unattached</strong></a>(...)</dt><dd><tt>True if this <a href="#Object">Object</a> o is not attached to another <a href="#Object">Object</a>.<br>
Otherwise False.<br>
<br>
Trace: o.<a href="#Segment-is_unattached">is_unattached</a>().</tt></dd></dl>
<hr>
Data descriptors inherited from <a href="gts.html#Object">Object</a>:<br>
<dl><dt><strong>id</strong></dt>
<dd><tt>GTS object id</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Surface">class <strong>Surface</strong></a>(<a href="gts.html#Object">Object</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt><a href="#Surface">Surface</a> <a href="__builtin__.html#object">object</a><br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="gts.html#Surface">Surface</a></dd>
<dd><a href="gts.html#Object">Object</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Surface-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#Surface-__init__">__init__</a>(...) initializes x; see x.__class__.__doc__ for signature</tt></dd></dl>
<dl><dt><a name="Surface-__iter__"><strong>__iter__</strong></a>(...)</dt><dd><tt>x.<a href="#Surface-__iter__">__iter__</a>() <==> iter(x)</tt></dd></dl>
<dl><dt><a name="Surface-add"><strong>add</strong></a>(...)</dt><dd><tt>Adds a <a href="#Face">Face</a> f or <a href="#Surface">Surface</a> s2 to <a href="#Surface">Surface</a> s1.<br>
<br>
Signature: s1.<a href="#Surface-add">add</a>(f) or s2.<a href="#Surface-add">add</a>(f)</tt></dd></dl>
<dl><dt><a name="Surface-area"><strong>area</strong></a>(...)</dt><dd><tt>Returns the area of <a href="#Surface">Surface</a> s.<br>
The area is taken as the sum of the signed areas of the Faces of s.<br>
<br>
Signature: s.<a href="#Surface-area">area</a>()</tt></dd></dl>
<dl><dt><a name="Surface-boundary"><strong>boundary</strong></a>(...)</dt><dd><tt>Returns a tuple of boundary Edges of <a href="#Surface">Surface</a> s.<br>
<br>
Signature: s.<a href="#Surface-boundary">boundary</a>()</tt></dd></dl>
<dl><dt><a name="Surface-center_of_area"><strong>center_of_area</strong></a>(...)</dt><dd><tt>Returns the coordinates of the center of area of <a href="#Surface">Surface</a> s.<br>
<br>
Signature: s.<a href="#Surface-center_of_area">center_of_area</a>()</tt></dd></dl>
<dl><dt><a name="Surface-center_of_mass"><strong>center_of_mass</strong></a>(...)</dt><dd><tt>Returns the coordinates of the center of mass of <a href="#Surface">Surface</a> s.<br>
<br>
Signature: s.<a href="#Surface-center_of_mass">center_of_mass</a>()</tt></dd></dl>
<dl><dt><a name="Surface-cleanup"><strong>cleanup</strong></a>(...)</dt><dd><tt>Cleans up the Vertices, Edges, and Faces on a <a href="#Surface">Surface</a> s.<br>
<br>
Signature: s.<a href="#Surface-cleanup">cleanup</a>() or s.<a href="#Surface-cleanup">cleanup</a>(threhold)<br>
<br>
If threhold is given, then Vertices that are spaced less than<br>
the threshold are merged. Degenerate Edges and Faces are also<br>
removed.</tt></dd></dl>
<dl><dt><a name="Surface-coarsen"><strong>coarsen</strong></a>(...)</dt><dd><tt>Reduces the number of vertices on <a href="#Surface">Surface</a> s.<br>
<br>
Signature: s.<a href="#Surface-coarsen">coarsen</a>(n) and s.<a href="#Surface-coarsen">coarsen</a>(amin)<br>
<br>
n is the smallest number of desired edges (but you may get fewer).<br>
amin is the smallest angle between Faces.</tt></dd></dl>
<dl><dt><a name="Surface-copy"><strong>copy</strong></a>(...)</dt><dd><tt>Copys all Faces, Edges and Vertices of <a href="#Surface">Surface</a> s2 to <a href="#Surface">Surface</a> s1.<br>
<br>
Signature: s1.<a href="#Surface-copy">copy</a>(s2)<br>
<br>
Returns s1.</tt></dd></dl>
<dl><dt><a name="Surface-difference"><strong>difference</strong></a>(...)</dt><dd><tt>Returns the difference of this <a href="#Surface">Surface</a> s1 with <a href="#Surface">Surface</a> s2.<br>
<br>
Signature: s1.<a href="#Surface-difference">difference</a>(s2)</tt></dd></dl>
<dl><dt><a name="Surface-distance"><strong>distance</strong></a>(...)</dt><dd><tt>Calculates the distance between the faces of this <a href="#Surface">Surface</a> s1 and<br>
the nearest Faces of other s2, and (if applicable) the distance<br>
between the boundary of this <a href="#Surface">Surface</a> s1 and the nearest boundary<br>
Edges of other s2.<br>
<br>
One or two dictionaries are returned (where applicable), the first<br>
for the face range and the second for the boundary range. The<br>
fields in each dictionary describe statistical results for each<br>
population: {min,max,sum,sum2,mean,stddev,n}.<br>
<br>
Signature: s1.<a href="#Surface-distance">distance</a>(s2) or s1.<a href="#Surface-distance">distance</a>(s2,delta)<br>
<br>
The value delta is a spatial increment defined as the percentage<br>
of the diagonal of the bounding box of s2 (default 0.1).</tt></dd></dl>
<dl><dt><a name="Surface-edges"><strong>edges</strong></a>(...)</dt><dd><tt>Returns tuple of Edges on <a href="#Surface">Surface</a> s that have <a href="#Vertex">Vertex</a> in list.<br>
If a list is not given then all of the Edges are returned.<br>
<br>
Signature: s.<a href="#Surface-edges">edges</a>(list) or s.<a href="#Surface-edges">edges</a>()</tt></dd></dl>
<dl><dt><a name="Surface-face_indices"><strong>face_indices</strong></a>(...)</dt><dd><tt>Returns a tuple of 3-tuples containing <a href="#Vertex">Vertex</a> indices for each <a href="#Face">Face</a><br>
in <a href="#Surface">Surface</a> s. The index for each <a href="#Vertex">Vertex</a> in a face corresponds to<br>
where it is found in the <a href="#Vertex">Vertex</a> tuple vs.<br>
<br>
Signature: s.<a href="#Surface-face_indices">face_indices</a>(vs)</tt></dd></dl>
<dl><dt><a name="Surface-faces"><strong>faces</strong></a>(...)</dt><dd><tt>Returns tuple of Faces on <a href="#Surface">Surface</a> s that have <a href="#Edge">Edge</a> in list.<br>
If a list is not given then all of the Faces are returned.<br>
<br>
Signature: s.<a href="#Surface-faces">faces</a>(list) s.<a href="#Surface-faces">faces</a>()</tt></dd></dl>
<dl><dt><a name="Surface-fan_oriented"><strong>fan_oriented</strong></a>(...)</dt><dd><tt>Returns a tuple of outside Edges of the Faces fanning from<br>
<a href="#Vertex">Vertex</a> v on this <a href="#Surface">Surface</a> s. The Edges are given in <br>
counter-clockwise order.<br>
<br>
Signature: s.<a href="#Surface-fan_oriented">fan_oriented</a>(v)</tt></dd></dl>
<dl><dt><a name="Surface-intersection"><strong>intersection</strong></a>(...)</dt><dd><tt>Returns the intersection of this <a href="#Surface">Surface</a> s1 with <a href="#Surface">Surface</a> s2.<br>
<br>
Signature: s1.<a href="#Surface-intersection">intersection</a>(s2)</tt></dd></dl>
<dl><dt><a name="Surface-is_closed"><strong>is_closed</strong></a>(...)</dt><dd><tt>True if <a href="#Surface">Surface</a> s is closed, False otherwise.<br>
Note that a closed <a href="#Surface">Surface</a> is also a manifold.<br>
<br>
Signature: s.<a href="#Surface-is_closed">is_closed</a>()</tt></dd></dl>
<dl><dt><a name="Surface-is_manifold"><strong>is_manifold</strong></a>(...)</dt><dd><tt>True if <a href="#Surface">Surface</a> s is a manifold, False otherwise.<br>
<br>
Signature: s.<a href="#Surface-is_manifold">is_manifold</a>()</tt></dd></dl>
<dl><dt><a name="Surface-is_ok"><strong>is_ok</strong></a>(...)</dt><dd><tt>True if this <a href="#Surface">Surface</a> s is OK. False otherwise.<br>
<br>
Signature: s.<a href="#Surface-is_ok">is_ok</a>()</tt></dd></dl>
<dl><dt><a name="Surface-is_orientable"><strong>is_orientable</strong></a>(...)</dt><dd><tt>True if Faces in <a href="#Surface">Surface</a> s have compatible orientation,<br>
False otherwise.<br>
Note that a closed surface is also a manifold. Note that an<br>
orientable surface is also a manifold.<br>
<br>
Signature: s.<a href="#Surface-is_orientable">is_orientable</a>()</tt></dd></dl>
<dl><dt><a name="Surface-is_self_intersecting"><strong>is_self_intersecting</strong></a>(...)</dt><dd><tt>Returns True if this <a href="#Surface">Surface</a> s is self-intersecting.<br>
False otherwise.<br>
<br>
Signature: s.<a href="#Surface-is_self_intersecting">is_self_intersecting</a>()</tt></dd></dl>
<dl><dt><a name="Surface-manifold_faces"><strong>manifold_faces</strong></a>(...)</dt><dd><tt>Returns the 2 manifold Faces of <a href="#Edge">Edge</a> e on this <a href="#Surface">Surface</a> s<br>
if they exist, or None.<br>
<br>
Signature: s.<a href="#Surface-manifold_faces">manifold_faces</a>(e)</tt></dd></dl>
<dl><dt><a name="Surface-next"><strong>next</strong></a>(...)</dt><dd><tt>x.<a href="#Surface-next">next</a>() -> the next value, or raise StopIteration</tt></dd></dl>
<dl><dt><a name="Surface-parent"><strong>parent</strong></a>(...)</dt><dd><tt>Returns <a href="#Face">Face</a> on this <a href="#Surface">Surface</a> s that has <a href="#Edge">Edge</a> e, or None<br>
if the <a href="#Edge">Edge</a> is not on this <a href="#Surface">Surface</a>.<br>
<br>
Signature: s.<a href="#Surface-parent">parent</a>(e)</tt></dd></dl>
<dl><dt><a name="Surface-quality_stats"><strong>quality_stats</strong></a>(...)</dt><dd><tt>Returns quality statistics for this <a href="#Surface">Surface</a> f in a dict.<br>
The statistics include the {min, max, sum, sum2, mean, stddev,<br>
and n} for populations of face_quality, face_area, edge_length,<br>
and edge_angle. Each of these names are dictionary keys.<br>
See <a href="#Triangle">Triangle</a>.quality() for an explanation of the face_quality.<br>
<br>
Signature: s.<a href="#Surface-quality_stats">quality_stats</a>()</tt></dd></dl>
<dl><dt><a name="Surface-remove"><strong>remove</strong></a>(...)</dt><dd><tt>Removes <a href="#Face">Face</a> f from this <a href="#Surface">Surface</a> s.<br>
<br>
Signature: s.<a href="#Surface-remove">remove</a>(f)</tt></dd></dl>
<dl><dt><a name="Surface-rotate"><strong>rotate</strong></a>(...)</dt><dd><tt>Rotates <a href="#Surface">Surface</a> s about vector dx,dy,dz and angle a.<br>
The sense of the rotation is given by the right-hand-rule.<br>
<br>
Signature: s.<a href="#Surface-rotate">rotate</a>(dx,dy,dz,a)</tt></dd></dl>
<dl><dt><a name="Surface-scale"><strong>scale</strong></a>(...)</dt><dd><tt>Scales <a href="#Surface">Surface</a> s by vector dx,dy,dz.<br>
<br>
Signature: s.<a href="#Surface-scale">scale</a>(dx=1,dy=1,dz=1)</tt></dd></dl>
<dl><dt><a name="Surface-split"><strong>split</strong></a>(...)</dt><dd><tt>Splits a surface into a tuple of connected and manifold components.<br>
<br>
Signature: s.<a href="#Surface-split">split</a>()</tt></dd></dl>
<dl><dt><a name="Surface-stats"><strong>stats</strong></a>(...)</dt><dd><tt>Returns statistics for this <a href="#Surface">Surface</a> f in a dict.<br>
The stats include n_faces, n_incompatible_faces,, n_boundary_edges,<br>
n_non_manifold_edges, and the statisics {min, max, sum, sum2, mean,<br>
stddev, and n} for populations of edges_per_vertex and<br>
faces_per_edge. Each of these names are dictionary keys.<br>
<br>
Signature: s.<a href="#Surface-stats">stats</a>()</tt></dd></dl>
<dl><dt><a name="Surface-strip"><strong>strip</strong></a>(...)</dt><dd><tt>Returns a tuple of strips, where each strip is a tuple of Faces<br>
that are successive and have one edge in common.<br>
<br>
Signature: s.<a href="#Surface-split">split</a>()</tt></dd></dl>
<dl><dt><a name="Surface-tessellate"><strong>tessellate</strong></a>(...)</dt><dd><tt>Tessellate each face of this <a href="#Surface">Surface</a> s with 4 triangles.<br>
The number of triangles is increased by a factor of 4.<br>
<br>
Signature: s.<a href="#Surface-tessellate">tessellate</a>()</tt></dd></dl>
<dl><dt><a name="Surface-translate"><strong>translate</strong></a>(...)</dt><dd><tt>Translates <a href="#Surface">Surface</a> s by vector dx,dy,dz.<br>
<br>
Signature: s.<a href="#Surface-translate">translate</a>(dx=0,dy=0,dz=0)</tt></dd></dl>
<dl><dt><a name="Surface-union"><strong>union</strong></a>(...)</dt><dd><tt>Returns the union of this <a href="#Surface">Surface</a> s1 with <a href="#Surface">Surface</a> s2.<br>
<br>
Signature: s1.<a href="#Surface-union">union</a>(s2)</tt></dd></dl>
<dl><dt><a name="Surface-vertices"><strong>vertices</strong></a>(...)</dt><dd><tt>Returns a tuple containing the vertices of <a href="#Surface">Surface</a> s.<br>
<br>
Signature: s.<a href="#Surface-vertices">vertices</a>()</tt></dd></dl>
<dl><dt><a name="Surface-volume"><strong>volume</strong></a>(...)</dt><dd><tt>Returns the signed volume of the domain bounded by the <a href="#Surface">Surface</a> s.<br>
<br>
Signature: s.<a href="#Surface-volume">volume</a>()</tt></dd></dl>
<dl><dt><a name="Surface-write"><strong>write</strong></a>(...)</dt><dd><tt>Saves <a href="#Surface">Surface</a> s to File f in GTS ascii format.<br>
All the lines beginning with #! are ignored.<br>
<br>
Signature: s.<a href="#Surface-write">write</a>(f)</tt></dd></dl>
<dl><dt><a name="Surface-write_oogl"><strong>write_oogl</strong></a>(...)</dt><dd><tt>Saves <a href="#Surface">Surface</a> s to File f in OOGL (Geomview) format.<br>
<br>
Signature: s.<a href="#Surface-write_oogl">write_oogl</a>(f)</tt></dd></dl>
<dl><dt><a name="Surface-write_oogl_boundary"><strong>write_oogl_boundary</strong></a>(...)</dt><dd><tt>Saves boundary of <a href="#Surface">Surface</a> s to File f in OOGL (Geomview) format.<br>
<br>
Signature: s.<a href="#Surface-write_oogl_boundary">write_oogl_boundary</a>(f)</tt></dd></dl>
<dl><dt><a name="Surface-write_vtk"><strong>write_vtk</strong></a>(...)</dt><dd><tt>Saves <a href="#Surface">Surface</a> s to File f in VTK format.<br>
<br>
Signature: s.<a href="#Surface-write_vtk">write_vtk</a>(f)</tt></dd></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>Nedges</strong></dt>
<dd><tt>The number of unique edges</tt></dd>
</dl>
<dl><dt><strong>Nfaces</strong></dt>
<dd><tt>The number of unique faces</tt></dd>
</dl>
<dl><dt><strong>Nvertices</strong></dt>
<dd><tt>The number of unique vertices</tt></dd>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0x75cc40><dd><tt>T.<a href="#Surface-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl>
<hr>
Methods inherited from <a href="gts.html#Object">Object</a>:<br>
<dl><dt><a name="Surface-__cmp__"><strong>__cmp__</strong></a>(...)</dt><dd><tt>x.<a href="#Surface-__cmp__">__cmp__</a>(y) <==> cmp(x,y)</tt></dd></dl>
<dl><dt><a name="Surface-is_unattached"><strong>is_unattached</strong></a>(...)</dt><dd><tt>True if this <a href="#Object">Object</a> o is not attached to another <a href="#Object">Object</a>.<br>
Otherwise False.<br>
<br>
Trace: o.<a href="#Surface-is_unattached">is_unattached</a>().</tt></dd></dl>
<hr>
Data descriptors inherited from <a href="gts.html#Object">Object</a>:<br>
<dl><dt><strong>id</strong></dt>
<dd><tt>GTS object id</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Triangle">class <strong>Triangle</strong></a>(<a href="gts.html#Object">Object</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt><a href="#Triangle">Triangle</a> <a href="__builtin__.html#object">object</a><br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="gts.html#Triangle">Triangle</a></dd>
<dd><a href="gts.html#Object">Object</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Triangle-__cmp__"><strong>__cmp__</strong></a>(...)</dt><dd><tt>x.<a href="#Triangle-__cmp__">__cmp__</a>(y) <==> cmp(x,y)</tt></dd></dl>
<dl><dt><a name="Triangle-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#Triangle-__init__">__init__</a>(...) initializes x; see x.__class__.__doc__ for signature</tt></dd></dl>
<dl><dt><a name="Triangle-angle"><strong>angle</strong></a>(...)</dt><dd><tt>Returns the angle (radians) between Triangles t1 and t2<br>
<br>
Signature: t1.<a href="#Triangle-angle">angle</a>(t2)</tt></dd></dl>
<dl><dt><a name="Triangle-area"><strong>area</strong></a>(...)</dt><dd><tt>Returns the area of <a href="#Triangle">Triangle</a> t.<br>
<br>
Signature: t.<a href="#Triangle-area">area</a>()</tt></dd></dl>
<dl><dt><a name="Triangle-circumcenter"><strong>circumcenter</strong></a>(...)</dt><dd><tt>Returns a <a href="#Vertex">Vertex</a> at the center of the circumscribing circle of<br>
this <a href="#Triangle">Triangle</a> t, or None if the circumscribing circle is not<br>
defined.<br>
<br>
Signature: t.circumcircle_center()</tt></dd></dl>
<dl><dt><a name="Triangle-common_edge"><strong>common_edge</strong></a>(...)</dt><dd><tt>Returns <a href="#Edge">Edge</a> common to both this <a href="#Triangle">Triangle</a> t1 and other t2.<br>
Returns None if the triangles do not share an <a href="#Edge">Edge</a>.<br>
<br>
Signature: t1.<a href="#Triangle-common_edge">common_edge</a>(t2)</tt></dd></dl>
<dl><dt><a name="Triangle-interpolate_height"><strong>interpolate_height</strong></a>(...)</dt><dd><tt>Returns the height of the plane defined by <a href="#Triangle">Triangle</a> t at <a href="#Point">Point</a> p.<br>
Only the x- and y-coordinates of p are considered.<br>
<br>
Signature: t.<a href="#Triangle-interpolate_height">interpolate_height</a>(p)</tt></dd></dl>
<dl><dt><a name="Triangle-is_compatible"><strong>is_compatible</strong></a>(...)</dt><dd><tt>True if this triangle t1 and other t2 are compatible;<br>
otherwise False.<br>
<br>
Checks if this triangle t1 and other t2, which share a common<br>
<a href="#Edge">Edge</a>, can be part of the same surface without conflict in the<br>
surface normal orientation.<br>
<br>
Signature: t1.<a href="#Triangle-is_compatible">is_compatible</a>(t2)</tt></dd></dl>
<dl><dt><a name="Triangle-is_ok"><strong>is_ok</strong></a>(...)</dt><dd><tt>True if this <a href="#Triangle">Triangle</a> t is non-degenerate and non-duplicate.<br>
False otherwise.<br>
<br>
Signature: t.<a href="#Triangle-is_ok">is_ok</a>()</tt></dd></dl>
<dl><dt><a name="Triangle-is_stabbed"><strong>is_stabbed</strong></a>(...)</dt><dd><tt>Returns the component of this <a href="#Triangle">Triangle</a> t that is stabbed by a<br>
ray projecting from <a href="#Point">Point</a> p to z=infinity. The result<br>
can be this <a href="#Triangle">Triangle</a> t, one of its Edges or Vertices, or None.<br>
If the ray is contained in the plan of this <a href="#Triangle">Triangle</a> then None is<br>
also returned.<br>
<br>
Signature: t.<a href="#Triangle-is_stabbed">is_stabbed</a>(p)</tt></dd></dl>
<dl><dt><a name="Triangle-normal"><strong>normal</strong></a>(...)</dt><dd><tt>Returns a tuple of coordinates of the oriented normal of <a href="#Triangle">Triangle</a> t<br>
as the cross-product of two edges, using the left-hand rule. The<br>
normal is not normalized. If this triangle is part of a closed and<br>
oriented surface, the normal points to the outside of the surface.<br>
<br>
Signature: t.<a href="#Triangle-normal">normal</a>()</tt></dd></dl>
<dl><dt><a name="Triangle-opposite"><strong>opposite</strong></a>(...)</dt><dd><tt>Returns <a href="#Vertex">Vertex</a> opposite to <a href="#Edge">Edge</a> e or <a href="#Edge">Edge</a> opposite to <a href="#Vertex">Vertex</a> v<br>
for this <a href="#Triangle">Triangle</a> t.<br>
<br>
Signature: t.<a href="#Triangle-opposite">opposite</a>(e) or t.<a href="#Triangle-opposite">opposite</a>(v)</tt></dd></dl>
<dl><dt><a name="Triangle-orientation"><strong>orientation</strong></a>(...)</dt><dd><tt>Determines orientation of the plane (x,y) projection of <a href="#Triangle">Triangle</a> t<br>
<br>
Signature: t.<a href="#Triangle-orientation">orientation</a>()<br>
<br>
Returns a positive value if Points p1, p2 and p3 in <a href="#Triangle">Triangle</a> t<br>
appear in counterclockwise order, a negative value if they appear<br>
in clockwise order and zero if they are colinear.</tt></dd></dl>
<dl><dt><a name="Triangle-perimeter"><strong>perimeter</strong></a>(...)</dt><dd><tt>Returns the perimeter of <a href="#Triangle">Triangle</a> t.<br>
<br>
Signature: t.<a href="#Triangle-perimeter">perimeter</a>()</tt></dd></dl>
<dl><dt><a name="Triangle-quality"><strong>quality</strong></a>(...)</dt><dd><tt>Returns the quality of <a href="#Triangle">Triangle</a> t.<br>
<br>
The quality of a triangle is defined as the ratio of the square<br>
root of its surface area to its perimeter relative to this same<br>
ratio for an equilateral triangle with the same area. The quality<br>
is then one for an equilateral triangle and tends to zero for a<br>
very stretched triangle.<br>
Signature: t.<a href="#Triangle-quality">quality</a>()</tt></dd></dl>
<dl><dt><a name="Triangle-revert"><strong>revert</strong></a>(...)</dt><dd><tt>Changes the orientation of triangle t, turning it inside out.<br>
<br>
Signature: t.<a href="#Triangle-revert">revert</a>()</tt></dd></dl>
<dl><dt><a name="Triangle-vertex"><strong>vertex</strong></a>(...)</dt><dd><tt>Returns the <a href="#Vertex">Vertex</a> of this <a href="#Triangle">Triangle</a> t not in t.e1.<br>
<br>
Signature: t.<a href="#Triangle-vertex">vertex</a>()</tt></dd></dl>
<dl><dt><a name="Triangle-vertices"><strong>vertices</strong></a>(...)</dt><dd><tt>Returns the three oriented set of vertices in <a href="#Triangle">Triangle</a> t.<br>
<br>
Signature: t.<a href="#Triangle-vertices">vertices</a>()</tt></dd></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>e1</strong></dt>
<dd><tt>Edge 1</tt></dd>
</dl>
<dl><dt><strong>e2</strong></dt>
<dd><tt>Edge 2</tt></dd>
</dl>
<dl><dt><strong>e3</strong></dt>
<dd><tt>Edge 3</tt></dd>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0x75c8c0><dd><tt>T.<a href="#Triangle-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl>
<hr>
Methods inherited from <a href="gts.html#Object">Object</a>:<br>
<dl><dt><a name="Triangle-is_unattached"><strong>is_unattached</strong></a>(...)</dt><dd><tt>True if this <a href="#Object">Object</a> o is not attached to another <a href="#Object">Object</a>.<br>
Otherwise False.<br>
<br>
Trace: o.<a href="#Triangle-is_unattached">is_unattached</a>().</tt></dd></dl>
<hr>
Data descriptors inherited from <a href="gts.html#Object">Object</a>:<br>
<dl><dt><strong>id</strong></dt>
<dd><tt>GTS object id</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Vertex">class <strong>Vertex</strong></a>(<a href="gts.html#Point">Point</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt><a href="#Vertex">Vertex</a> <a href="__builtin__.html#object">object</a><br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="gts.html#Vertex">Vertex</a></dd>
<dd><a href="gts.html#Point">Point</a></dd>
<dd><a href="gts.html#Object">Object</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Vertex-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#Vertex-__init__">__init__</a>(...) initializes x; see x.__class__.__doc__ for signature</tt></dd></dl>
<dl><dt><a name="Vertex-contacts"><strong>contacts</strong></a>(...)</dt><dd><tt>Returns the number of sets of connected Triangles sharing this<br>
<a href="#Vertex">Vertex</a> v.<br>
<br>
Signature: v.<a href="#Vertex-contacts">contacts</a>().<br>
<br>
If sever is True (default: False) and v is a contact vertex then<br>
the vertex is replaced in each <a href="#Triangle">Triangle</a> with clones.</tt></dd></dl>
<dl><dt><a name="Vertex-encroaches"><strong>encroaches</strong></a>(...)</dt><dd><tt>Returns True if this <a href="#Vertex">Vertex</a> v is strictly contained in the<br>
diametral circle of <a href="#Edge">Edge</a> e. False otherwise.<br>
<br>
Only the projection onto the x-y plane is considered.<br>
<br>
Signature: v.<a href="#Vertex-encroaches">encroaches</a>(e)</tt></dd></dl>
<dl><dt><a name="Vertex-faces"><strong>faces</strong></a>(...)</dt><dd><tt>Returns a tuple of Faces that have this <a href="#Vertex">Vertex</a> v.<br>
<br>
If a <a href="#Surface">Surface</a> s is given, only Vertices on s are considered.<br>
<br>
Signature: v.<a href="#Vertex-faces">faces</a>() or v.<a href="#Vertex-faces">faces</a>(s).</tt></dd></dl>
<dl><dt><a name="Vertex-is_boundary"><strong>is_boundary</strong></a>(...)</dt><dd><tt>True if this <a href="#Vertex">Vertex</a> v is used by a boundary <a href="#Edge">Edge</a> of <a href="#Surface">Surface</a> s.<br>
<br>
Signature: v.<a href="#Vertex-is_boundary">is_boundary</a>().</tt></dd></dl>
<dl><dt><a name="Vertex-is_connected"><strong>is_connected</strong></a>(...)</dt><dd><tt>Return True if this <a href="#Vertex">Vertex</a> v1 is connected to <a href="#Vertex">Vertex</a> v2<br>
by a <a href="#Segment">Segment</a>.<br>
<br>
Signature: v1.<a href="#Vertex-is_connected">is_connected</a>().</tt></dd></dl>
<dl><dt><a name="Vertex-is_ok"><strong>is_ok</strong></a>(...)</dt><dd><tt>True if this <a href="#Vertex">Vertex</a> v is OK. False otherwise.<br>
This method is useful for unit testing and debugging.<br>
<br>
Signature: v.<a href="#Vertex-is_ok">is_ok</a>().</tt></dd></dl>
<dl><dt><a name="Vertex-is_unattached"><strong>is_unattached</strong></a>(...)</dt><dd><tt>True if this <a href="#Vertex">Vertex</a> v is not the endpoint of any <a href="#Segment">Segment</a>.<br>
<br>
Signature: v.<a href="#Vertex-is_unattached">is_unattached</a>().</tt></dd></dl>
<dl><dt><a name="Vertex-neighbors"><strong>neighbors</strong></a>(...)</dt><dd><tt>Returns a tuple of Vertices attached to this <a href="#Vertex">Vertex</a> v<br>
by a <a href="#Segment">Segment</a>.<br>
<br>
If a <a href="#Surface">Surface</a> s is given, only Vertices on s are considered.<br>
<br>
Signature: v.<a href="#Vertex-neighbors">neighbors</a>() or v.<a href="#Vertex-neighbors">neighbors</a>(s).</tt></dd></dl>
<dl><dt><a name="Vertex-replace"><strong>replace</strong></a>(...)</dt><dd><tt>Replaces this <a href="#Vertex">Vertex</a> v1 with <a href="#Vertex">Vertex</a> v2 in all Segments that have v1.<br>
<a href="#Vertex">Vertex</a> v1 itself is left unchanged.<br>
<br>
Signature: v1.<a href="#Vertex-replace">replace</a>(v2).</tt></dd></dl>
<dl><dt><a name="Vertex-triangles"><strong>triangles</strong></a>(...)</dt><dd><tt>Returns a list of Triangles that have this <a href="#Vertex">Vertex</a> v.<br>
<br>
Signature: v.<a href="#Vertex-triangles">triangles</a>()</tt></dd></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0x75c480><dd><tt>T.<a href="#Vertex-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl>
<hr>
Methods inherited from <a href="gts.html#Point">Point</a>:<br>
<dl><dt><a name="Vertex-__cmp__"><strong>__cmp__</strong></a>(...)</dt><dd><tt>x.<a href="#Vertex-__cmp__">__cmp__</a>(y) <==> cmp(x,y)</tt></dd></dl>
<dl><dt><a name="Vertex-closest"><strong>closest</strong></a>(...)</dt><dd><tt>Set the coordinates of <a href="#Point">Point</a> p to the <a href="#Point">Point</a> on <a href="#Segment">Segment</a> s<br>
or <a href="#Triangle">Triangle</a> t closest to the <a href="#Point">Point</a> p2<br>
<br>
Signature: p.<a href="#Vertex-closest">closest</a>(s,p2) or p.<a href="#Vertex-closest">closest</a>(t,p2)<br>
<br>
Returns the (modified) <a href="#Point">Point</a> p.</tt></dd></dl>
<dl><dt><a name="Vertex-coords"><strong>coords</strong></a>(...)</dt><dd><tt>Returns a tuple of the x, y, and z coordinates for this <a href="#Point">Point</a> p.<br>
<br>
Signature: p.<a href="#Vertex-coords">coords</a>(x,y,z)</tt></dd></dl>
<dl><dt><a name="Vertex-distance"><strong>distance</strong></a>(...)</dt><dd><tt>Returns Euclidean distance between this <a href="#Point">Point</a> p and other <a href="#Point">Point</a> p2,<br>
<a href="#Segment">Segment</a> s, or <a href="#Triangle">Triangle</a> t.<br>
Signature: p.<a href="#Vertex-distance">distance</a>(p2), p.<a href="#Vertex-distance">distance</a>(s) or p.<a href="#Vertex-distance">distance</a>(t)</tt></dd></dl>
<dl><dt><a name="Vertex-distance2"><strong>distance2</strong></a>(...)</dt><dd><tt>Returns squared Euclidean distance between <a href="#Point">Point</a> p and <a href="#Point">Point</a> p2,<br>
<a href="#Segment">Segment</a> s, or <a href="#Triangle">Triangle</a> t.<br>
<br>
Signature: p.<a href="#Vertex-distance2">distance2</a>(p2), p.<a href="#Vertex-distance2">distance2</a>(s), or p.<a href="#Vertex-distance2">distance2</a>(t)</tt></dd></dl>
<dl><dt><a name="Vertex-is_in"><strong>is_in</strong></a>(...)</dt><dd><tt>Tests if this <a href="#Point">Point</a> p is inside or outside <a href="#Triangle">Triangle</a> t.<br>
The planar projection (x,y) of <a href="#Point">Point</a> p is tested against the<br>
planar projection of <a href="#Triangle">Triangle</a> t.<br>
<br>
Signature: p.in_circle(p1,p2,p3) or p.in_circle(t) <br>
<br>
Returns a +1 if p lies inside, -1 if p lies outside, and 0<br>
if p lies on the triangle.</tt></dd></dl>
<dl><dt><a name="Vertex-is_in_circle"><strong>is_in_circle</strong></a>(...)</dt><dd><tt>Tests if this <a href="#Point">Point</a> p is inside or outside circumcircle.<br>
The planar projection (x,y) of <a href="#Point">Point</a> p is tested against the<br>
circumcircle defined by the planar projection of p1, p2 and p3,<br>
or alternatively the <a href="#Triangle">Triangle</a> t<br>
<br>
Signature: p.in_circle(p1,p2,p3) or p.in_circle(t) <br>
<br>
Returns +1 if p lies inside, -1 if p lies outside, and 0 if p lies<br>
on the circle. The Points p1, p2, and p3 must be in<br>
counterclockwise order, or the sign of the result will be reversed.</tt></dd></dl>
<dl><dt><a name="Vertex-is_in_rectangle"><strong>is_in_rectangle</strong></a>(...)</dt><dd><tt>True if this <a href="#Point">Point</a> p is in box with bottom-left and upper-right<br>
Points p1 and p2.<br>
<br>
Signature: p.is_in_rectange(p1,p2)</tt></dd></dl>
<dl><dt><a name="Vertex-is_inside"><strong>is_inside</strong></a>(...)</dt><dd><tt>True if this <a href="#Point">Point</a> p is inside or outside <a href="#Surface">Surface</a> s.<br>
False otherwise.<br>
<br>
Signature: p.in_inside(s)</tt></dd></dl>
<dl><dt><a name="Vertex-orientation_3d"><strong>orientation_3d</strong></a>(...)</dt><dd><tt>Determines if this <a href="#Point">Point</a> p is above, below or on plane of 3 Points<br>
p1, p2 and p3.<br>
<br>
Signature: p.<a href="#Vertex-orientation_3d">orientation_3d</a>(p1,p2,p3)<br>
<br>
Below is defined so that p1, p2 and p3 appear in counterclockwise<br>
order when viewed from above the plane.<br>
<br>
The return value is positive if p4 lies below the plane, negative<br>
if p4 lies above the plane, and zero if the four points are<br>
coplanar. The value is an approximation of six times the signed<br>
volume of the tetrahedron defined by the four points.</tt></dd></dl>
<dl><dt><a name="Vertex-orientation_3d_sos"><strong>orientation_3d_sos</strong></a>(...)</dt><dd><tt>Determines if this <a href="#Point">Point</a> p is above, below or on plane of 3 Points<br>
p1, p2 and p3.<br>
<br>
Signature: p.<a href="#Vertex-orientation_3d_sos">orientation_3d_sos</a>(p1,p2,p3)<br>
<br>
Below is defined so that p1, p2 and p3 appear in counterclockwise<br>
order when viewed from above the plane.<br>
<br>
The return value is +1 if p4 lies below the plane, and -1 if p4<br>
lies above the plane. Simulation of Simplicity (SoS) is used to<br>
break ties when the orientation is degenerate (i.e. the point lies<br>
on the plane definedby p1, p2 and p3).</tt></dd></dl>
<dl><dt><a name="Vertex-rotate"><strong>rotate</strong></a>(...)</dt><dd><tt>Rotates <a href="#Point">Point</a> p around vector dx,dy,dz by angle a.<br>
The sense of the rotation is given by the right-hand-rule.<br>
<br>
Signature: p.<a href="#Vertex-rotate">rotate</a>(dx=0,dy=0,dz=0,a=0)</tt></dd></dl>
<dl><dt><a name="Vertex-scale"><strong>scale</strong></a>(...)</dt><dd><tt>Scales <a href="#Point">Point</a> p by vector dx,dy,dz.<br>
<br>
Signature: p.<a href="#Vertex-scale">scale</a>(dx=1,dy=1,dz=1)</tt></dd></dl>
<dl><dt><a name="Vertex-set"><strong>set</strong></a>(...)</dt><dd><tt>Sets x, y, and z coordinates of this <a href="#Point">Point</a> p.<br>
<br>
Signature: p.<a href="#Vertex-set">set</a>(x,y,z)</tt></dd></dl>
<dl><dt><a name="Vertex-translate"><strong>translate</strong></a>(...)</dt><dd><tt>Translates <a href="#Point">Point</a> p by vector dx,dy,dz.<br>
<br>
Signature: p.<a href="#Vertex-translate">translate</a>(dx=0,dy=0,dz=0)</tt></dd></dl>
<hr>
Data descriptors inherited from <a href="gts.html#Point">Point</a>:<br>
<dl><dt><strong>x</strong></dt>
<dd><tt>x value</tt></dd>
</dl>
<dl><dt><strong>y</strong></dt>
<dd><tt>y value</tt></dd>
</dl>
<dl><dt><strong>z</strong></dt>
<dd><tt>z value</tt></dd>
</dl>
<hr>
Data descriptors inherited from <a href="gts.html#Object">Object</a>:<br>
<dl><dt><strong>id</strong></dt>
<dd><tt>GTS object id</tt></dd>
</dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-isosurface"><strong>isosurface</strong></a>(...)</dt><dd><tt>Adds to surface new faces defining the isosurface data[x,y,z] = c<br>
<br>
Signature: <a href="#-isosurface">isosurface</a>(data, c, ...)<br>
<br>
data is a 3D numpy array.<br>
c is the isovalue defining the surface<br>
<br>
Keyword arguments:<br>
extents= [xmin, xmax, ymin, ymax, zmin, zmax]<br>
A numpy array defining the extent of the data cube.<br>
Default is the cube with corners at (-1,-1,-1) and (1,1,1)<br>
Data is assumed to be regularly sampled in the cube.<br>
method= ['cube'|'tetra'|'dual'|'bounded']<br>
String (only the first character counts) specifying the<br>
method.<br>
cube -- marching cubes (default)<br>
tetra -- marching tetrahedra<br>
dual -- maching tetrahedra producing dual 'body-centred'<br>
faces relative to 'tetra'<br>
bounded -- marching tetrahedra ensuring the surface is<br>
bounded by adding a border of large negative<br>
values around the domain.<br>
<br>
By convention, the normals to the surface are pointing towards<br>
positive values of data[x,y,z] - c.</tt></dd></dl>
<dl><dt><a name="-merge"><strong>merge</strong></a>(...)</dt><dd><tt>Merges list of Vertices that are within a box of side-length<br>
epsilon of each other.<br>
<br>
Signature: <a href="#-merge">merge</a>(list,epsilon)</tt></dd></dl>
<dl><dt><a name="-read"><strong>read</strong></a>(...)</dt><dd><tt>Returns the data read from File f as a <a href="#Surface">Surface</a>.<br>
The File data must be in GTS format (e.g., as written using<br>
<a href="#Surface">Surface</a>.write())<br>
<br>
Signature: <a href="#-read">read</a>(f)</tt></dd></dl>
<dl><dt><a name="-segments"><strong>segments</strong></a>(...)</dt><dd><tt>Returns tuple of Segments from a list or tuple of Vertices.<br>
<br>
Signature: <a href="#-segments">segments</a>(list)</tt></dd></dl>
<dl><dt><a name="-sphere"><strong>sphere</strong></a>(...)</dt><dd><tt>Returns a unit sphere generated by recursive subdivision.<br>
First approximation is an isocahedron; each level of refinement<br>
(geodesation_order) increases the number of triangles by a factor<br>
of 4.<br>
<br>
Signature: <a href="#-sphere">sphere</a>(geodesation_order)</tt></dd></dl>
<dl><dt><a name="-triangle_enclosing"><strong>triangle_enclosing</strong></a>(...)</dt><dd><tt>Returns a <a href="#Triangle">Triangle</a> that encloses the plane projection of a list<br>
or tuple of Points. The <a href="#Triangle">Triangle</a> is equilateral and encloses a<br>
rectangle defined by the maximum and minimum x and y coordinates<br>
of the points.<br>
<br>
Signature: <a href="#-triangles">triangles</a>(list)</tt></dd></dl>
<dl><dt><a name="-triangles"><strong>triangles</strong></a>(...)</dt><dd><tt>Returns tuple of Triangles from a list or tuple of Edges.<br>
<br>
Signature: <a href="#-triangles">triangles</a>(list)</tt></dd></dl>
<dl><dt><a name="-vertices"><strong>vertices</strong></a>(...)</dt><dd><tt>Returns tuple of Vertices from a list or tuple of Segments.<br>
<br>
Signature: <a href="#-vertices">vertices</a>(list)</tt></dd></dl>
</td></tr></table>
</body></html>
|