Orbiter 2022
Combinatorial Objects
surface_object_properties.cpp
Go to the documentation of this file.
1/*
2 * surface_object_properties.cpp
3 *
4 * Created on: Oct 13, 2020
5 * Author: betten
6 */
7
8
9
10
11#include "foundations.h"
12
13
14using namespace std;
15
16
17
18namespace orbiter {
19namespace layer1_foundations {
20namespace algebraic_geometry {
21
22
23#define MAX_NUMBER_OF_PLANES_FOR_PLANE_TYPE 100000
24
25
26
28{
29 SO = NULL;
30
31 pts_on_lines = NULL;
32 f_is_on_line = NULL;
33
34 lines_on_point = NULL;
35 Type_pts_on_lines = NULL;
37
38 Eckardt_points = NULL;
43
46
47 Hesse_planes = NULL;
50
51 nb_axes = 0;
52 Axes_index = NULL;
54 Axes_line_rank = NULL;
55
56
57
58 Double_points = NULL;
61
62 Single_points = NULL;
65
66
67
68 Pts_not_on_lines = NULL;
70
71 nb_planes = 0;
72
76
79
81
83
84 All_Planes = NULL;
85 Dual_point_ranks = NULL;
86
88 Line_neighbors = NULL;
91
92
93 gradient = NULL;
94
95 singular_pts = NULL;
96
99
102
103}
104
106{
107 if (pts_on_lines) {
109 }
110 if (f_is_on_line) {
112 }
113 if (lines_on_point) {
115 }
116
117
118 if (Eckardt_points) {
120 }
123 }
126 }
129 }
132 }
135 }
136 if (Hesse_planes) {
138 }
141 }
142 if (Axes_index) {
144 }
147 }
148 if (Axes_line_rank) {
150 }
151 if (Double_points) {
153 }
156 }
157 if (Single_points) {
159 }
162 }
163 if (Pts_not_on_lines) {
165 }
166
169 }
172 }
175 }
176 if (Type_pts_on_lines) {
178 }
181 }
184 }
185
186
189 }
190
193 }
194
195 if (All_Planes) {
197 }
198 if (Dual_point_ranks) {
200 }
203 }
204 if (Line_neighbors) {
206 }
209 }
212 }
213
214 if (gradient) {
216 }
217
218 if (singular_pts) {
220 }
221
224 }
227 }
228
229
230}
231
232
234{
235 int f_v = (verbose_level >= 1);
236
237 if (f_v) {
238 cout << "surface_object_properties::init" << endl;
239 }
241
242
243
244 if (SO->nb_lines == 27) {
245
246 if (f_v) {
247 cout << "surface_object_properties::init "
248 "before compute_tritangent_planes_by_rank" << endl;
249 }
250 compute_tritangent_planes_by_rank(0 /*verbose_level*/);
251 if (f_v) {
252 cout << "surface_object_properties::init "
253 "after compute_tritangent_planes_by_rank" << endl;
254 }
255
256 if (f_v) {
257 cout << "surface_object_properties::init "
258 "before compute_Lines_in_tritangent_planes" << endl;
259 }
260 compute_Lines_in_tritangent_planes(0 /*verbose_level*/);
261 if (f_v) {
262 cout << "surface_object_properties::init "
263 "after compute_Lines_in_tritangent_planes" << endl;
264 }
265
266 if (f_v) {
267 cout << "surface_object_properties::init "
268 "before compute_Trihedral_pairs_as_tritangent_planes" << endl;
269 }
271 if (f_v) {
272 cout << "surface_object_properties::init "
273 "after compute_Trihedral_pairs_as_tritangent_planes" << endl;
274 }
275
276 }
277
278 if (f_v) {
279 cout << "surface_object_properties::init "
280 "before compute_adjacency_matrix_of_line_intersection_graph" << endl;
281 }
283 if (f_v) {
284 cout << "surface_object_properties::init "
285 "after compute_adjacency_matrix_of_line_intersection_graph" << endl;
286 }
287
288
289 if (f_v) {
290 cout << "surface_object_properties::init before compute_properties" << endl;
291 }
292 compute_properties(verbose_level);
293 if (f_v) {
294 cout << "surface_object_properties::init after compute_properties" << endl;
295 }
296
297
298 if (f_v) {
299 cout << "surface_object_properties::init done" << endl;
300 }
301}
302
304{
305 int f_v = (verbose_level >= 1);
306 int f_vvv = (verbose_level >= 3);
309
310 if (f_v) {
311 cout << "surface_object_properties::compute_properties" << endl;
312 }
313
314
315
316 if (SO->Pts == NULL) {
317 if (f_v) {
318 cout << "surface_object_properties::compute_properties SO->Pts == NULL" << endl;
319 }
320 exit(1);
321 }
322
323
324 Sorting.lint_vec_heapsort(SO->Pts, SO->nb_pts);
325 if (f_v) {
326 cout << "surface_object::compute_properties we found "
327 << SO->nb_pts << " points on the surface" << endl;
328 }
329 if (f_vvv) {
330 cout << "surface_object_properties::compute_properties The points "
331 "on the surface are:" << endl;
333 SO->Pts, SO->nb_pts, 1, FALSE /* f_tex */);
334 }
335
336
337 if (f_v) {
338 cout << "surface_object::compute_properties before compute_singular_points_and_tangent_planes" << endl;
339 }
341 if (f_v) {
342 cout << "surface_object::compute_properties after compute_singular_points_and_tangent_planes" << endl;
343 }
344
345
346
347 if (f_v) {
348 cout << "surface_object_properties::compute_properties before "
349 "Surf->compute_points_on_lines" << endl;
350 }
352 SO->Lines, SO->nb_lines,
355 0 /* verbose_level */);
356 if (f_v) {
357 cout << "surface_object_properties::compute_properties after "
358 "Surf->compute_points_on_lines" << endl;
359 }
360
362
363 if (f_vvv) {
364 cout << "surface_object::compute_properties pts_on_lines:" << endl;
366 }
367
371 if (f_v) {
372 cout << "points on lines:" << endl;
374 cout << endl;
375 }
376
377 pts_on_lines->dualize(lines_on_point, 0 /* verbose_level */);
378 if (f_vvv) {
379 cout << "surface_object::compute_properties lines_on_point:" << endl;
381 }
382
386 if (f_v) {
387 cout << "surface_object::compute_properties type of lines_on_point:" << endl;
389 cout << endl;
390 }
391
392 if (f_v) {
393 cout << "surface_object::compute_properties computing Eckardt points:" << endl;
394 }
396 nb_Eckardt_points, 3 /* value */, 0 /* verbose_level */);
398 if (f_v) {
399 cout << "surface_object::compute_properties computing Eckardt points done, we found "
400 << nb_Eckardt_points << " Eckardt points" << endl;
401 }
402 if (f_vvv) {
403 cout << "surface_object::compute_properties Eckardt_points_index=";
405 cout << endl;
406 }
410 if (f_v) {
411 cout << "surface_object::compute_properties computing Eckardt points done, we found "
412 << nb_Eckardt_points << " Eckardt points" << endl;
413 }
414 if (f_vvv) {
415 cout << "surface_object::compute_properties Eckardt_points=";
417 cout << endl;
418 }
419
420
421 if (SO->nb_lines == 27) {
422 int p, a, b, c, idx, i;
423
425
426 for (p = 0; p < nb_Eckardt_points; p++) {
427
429 if (lines_on_point->Set_size[i] != 3) {
430 cout << "surface_object::compute_properties Eckardt point is not on three lines" << endl;
431 exit(1);
432 }
433 a = lines_on_point->Sets[i][0];
434 b = lines_on_point->Sets[i][1];
435 c = lines_on_point->Sets[i][2];
436
437
438 idx = SO->Surf->Schlaefli->identify_Eckardt_point(a, b, c, 0 /*verbose_level*/);
439
441 }
444 for (p = 0; p < nb_Eckardt_points; p++) {
447 }
448
449 if (f_v) {
450 cout << "surface_object::compute_properties computing axes:" << endl;
451 }
452 compute_axes(verbose_level);
453 if (f_v) {
454 cout << "surface_object::compute_properties computing axes done" << endl;
455 }
456
457 }
458 else {
460 }
461
462
463
464
465 if (f_v) {
466 cout << "computing Double points:" << endl;
467 }
469 nb_Double_points, 2 /* value */, 0 /* verbose_level */);
471 if (f_v) {
472 cout << "computing Double points done, we found "
473 << nb_Double_points << " Double points" << endl;
474 }
475 if (f_vvv) {
476 cout << "Double_points_index=";
478 cout << endl;
479 }
483 if (f_v) {
484 cout << "computing Double points done, we found "
485 << nb_Double_points << " Double points" << endl;
486 }
487 if (f_vvv) {
488 cout << "Double_points=";
490 cout << endl;
491 }
492
493
494
495
496
497
498
499 if (f_v) {
500 cout << "computing Single points:" << endl;
501 }
503 nb_Single_points, 1 /* value */, 0 /* verbose_level */);
505 if (f_v) {
506 cout << "computing Single points done, we found "
507 << nb_Single_points << " Single points" << endl;
508 }
509 if (f_vvv) {
510 cout << "Single_points_index=";
512 cout << endl;
513 }
517 if (f_v) {
518 cout << "computing Single points done, we found "
519 << nb_Single_points << " Single points" << endl;
520 }
521 if (f_vvv) {
522 cout << "Single_points=";
524 cout << endl;
525 }
526
527
528
529
530
531
532
533
534
535
539
540 int i, j, a, b, idx, h;
541
542 for (i = 0; i < pts_on_lines->nb_sets; i++) {
543
544 for (j = 0; j < pts_on_lines->Set_size[i]; j++) {
545 a = pts_on_lines->Sets[i][j];
546 b = SO->Pts[a];
547
549 nb_pts_not_on_lines, b, idx, 0)) {
550 for (h = idx + 1; h < nb_pts_not_on_lines; h++) {
552 }
554 }
555 }
556 }
557 if (f_v) {
558 cout << "nb_pts_not_on_lines=" << nb_pts_not_on_lines << endl;
559 }
560
561
563
565
566 if (f_v) {
567 cout << "surface_object_properties::compute_properties computing line type" << endl;
568 }
570 Eckardt_points_line_type, 0 /* verbose_level */);
571 if (f_v) {
572 cout << "surface_object_properties::compute_properties computing line type done" << endl;
573 }
574 if (f_v) {
575 cout << "surface_object_properties::compute_properties computing plane type" << endl;
576 }
579 Eckardt_points_plane_type, 0 /* verbose_level */);
580 // type[N_planes]
581 if (f_v) {
582 cout << "surface_object_properties::compute_properties computing plane type done" << endl;
583 }
584
585 {
586 data_structures::tally T_planes;
587 int *H_planes;
589
591
592 T_planes.get_class_by_value(H_planes, nb_Hesse_planes, 9 /* value */,
593 0 /* verbose_level */);
594
595 Sorting.int_vec_heapsort(H_planes, nb_Hesse_planes);
596
598 for (i = 0; i < nb_Hesse_planes; i++) {
599 Hesse_planes[i] = H_planes[i];
600 }
601 FREE_int(H_planes);
602
603
608 verbose_level);
609
610 //T_planes.print_file_tex_we_are_in_math_mode(ost, TRUE);
611 }
612
613
614 if (f_v) {
615 cout << "surface_object_properties::compute_properties done" << endl;
616 }
617}
618
620{
621 int f_v = (verbose_level >= 1);
622 int t, i, h, idx;
623
624 if (f_v) {
625 cout << "surface_object_properties::compute_axes" << endl;
626 }
627 nb_axes = 0;
630 for (t = 0; t < SO->Surf->Schlaefli->nb_trihedral_pairs; t++) {
631 for (i = 0; i < 2; i++) {
632 for (h = 0; h < 3; h++) {
633 idx = SO->Surf->Schlaefli->Trihedral_to_Eckardt[6 * t + i * 3 + h];
635 break;
636 }
637 }
638 if (h == 3) {
639 Axes_index[nb_axes] = 2 * t + i;
642 nb_axes++;
643 }
644 }
645 }
646 if (f_v) {
647 cout << "we found " << nb_axes << " axes" << endl;
648 }
649 if (f_v) {
650 cout << "surface_object_properties::compute_axes done" << endl;
651 }
652}
653
655{
656 int f_v = (verbose_level >= 1);
657
658 if (f_v) {
659 cout << "surface_object_properties::compute_gradient" << endl;
660 }
661
662
663 if (f_v) {
664 cout << "surface_object_properties::compute_gradient SO->Surf->Poly2_4->get_nb_monomials() = " << SO->Surf->Poly2_4->get_nb_monomials() << endl;
665 }
666
667 SO->Surf->compute_gradient(SO->eqn, gradient, verbose_level);
668
669 if (f_v) {
670 cout << "surface_object_properties::compute_gradient done" << endl;
671 }
672}
673
674
675
677// a singular point is a point where all partials vanish
678// We compute the set of singular points into Pts[nb_pts]
679{
680 int f_v = (verbose_level >= 1);
681 int f_vv = FALSE; //(verbose_level >= 2);
682
683 if (f_v) {
684 cout << "surface_object_properties::compute_singular_points_and_tangent_planes" << endl;
685 }
686 int h, i;
687 long int rk;
688 int nb_eqns = 4;
689 int v[4];
690 int w[4];
691
692
693 if (f_v) {
694 cout << "surface_object_properties::compute_singular_points_and_tangent_planes before compute_gradient" << endl;
695 }
696 compute_gradient(verbose_level - 2);
697 if (f_v) {
698 cout << "surface_object_properties::compute_singular_points_and_tangent_planes after compute_gradient" << endl;
699 }
700
701 nb_singular_pts = 0;
703
707 for (h = 0; h < SO->nb_pts; h++) {
708 if (f_vv) {
709 cout << "surface_object_properties::compute_singular_points_and_tangent_planes "
710 "h=" << h << " / " << SO->nb_pts << endl;
711 }
712 rk = SO->Pts[h];
713 if (f_vv) {
714 cout << "surface_object_properties::compute_singular_points_and_tangent_planes "
715 "rk=" << rk << endl;
716 }
717 SO->Surf->unrank_point(v, rk);
718 if (f_vv) {
719 cout << "surface_object_properties::compute_singular_points_and_tangent_planes "
720 "v=";
721 Int_vec_print(cout, v, 4);
722 cout << endl;
723 }
724 for (i = 0; i < nb_eqns; i++) {
725 if (f_vv) {
726 cout << "surface_object_properties::compute_singular_points_and_tangent_planes "
727 "gradient i=" << i << " / " << nb_eqns << endl;
728 }
729 if (FALSE) {
730 cout << "surface_object_properties::compute_singular_points_and_tangent_planes "
731 "gradient " << i << " = ";
732 Int_vec_print(cout,
735 cout << endl;
736 }
738 gradient + i * SO->Surf->Poly2_4->get_nb_monomials(), v);
739 if (f_vv) {
740 cout << "surface_object_properties::compute_singular_points_and_tangent_planes "
741 "value = " << w[i] << endl;
742 }
743 }
744 for (i = 0; i < nb_eqns; i++) {
745 if (w[i]) {
746 break;
747 }
748 }
749
750 if (i == nb_eqns) {
753 }
754 else {
755 long int plane_rk;
756
758 w /* eqn4 */,
759 0 /* verbose_level*/);
760 tangent_plane_rank_global[h] = plane_rk;
763 plane_rk, 0 /* verbose_level*/);
764 }
765 }
766
768 int nb_tangent_planes;
769
770 nb_tangent_planes = nb_non_singular_pts;
771
773
774#if 0
775 string fname_tangents;
776 file_io Fio;
777
778 fname_tangents.assign("tangents.txt");
779
780 Fio.write_set_to_file_lint(fname_tangents,
781 tangent_plane_rank_dual, nb_tangent_planes, verbose_level);
782
783 if (f_v) {
784 cout << "Written file " << fname_tangents << " of size " << Fio.file_size(fname_tangents) << endl;
785 }
786#endif
787
788
789 int *Kernel;
790 int *w1;
791 int *w2;
792 int r, ns;
793
797
798
799
801 r, Kernel, 0 /*verbose_level */);
802
803 ns = SO->Surf->Poly3_4->get_nb_monomials() - r; // dimension of null space
804 if (f_v) {
805 cout << "The system has rank " << r << endl;
806 cout << "The ideal has dimension " << ns << endl;
807#if 0
808 cout << "and is generated by:" << endl;
809 int_matrix_print(Kernel, ns, SO->Surf->Poly3_4->get_nb_monomials());
810 cout << "corresponding to the following basis "
811 "of polynomials:" << endl;
812 for (h = 0; h < ns; h++) {
813 SO->Surf->Poly3_4->print_equation(cout, Kernel + h * SO->Surf->Poly3_4->get_nb_monomials());
814 cout << endl;
815 }
816#endif
817 }
818
819 FREE_int(Kernel);
820 FREE_int(w1);
821 FREE_int(w2);
822
823
824 if (f_v) {
825 cout << "surface_object_properties::compute_singular_points_and_tangent_planes done" << endl;
826 }
827}
828
830 int verbose_level)
831{
832 int f_v = (verbose_level >= 1);
833
834 if (f_v) {
835 cout << "surface_object_properties::compute_adjacency_matrix_of_line_intersection_graph" << endl;
836 }
837
838 if (f_v) {
839 cout << "surface_object_properties::compute_adjacency_matrix_of_"
840 "line_intersection_graph before Surf->compute_adjacency_"
841 "matrix_of_line_intersection_graph" << endl;
842 }
844 Adj_line_intersection_graph, SO->Lines, SO->nb_lines, verbose_level - 2);
845 if (f_v) {
846 cout << "surface_object_properties::compute_adjacency_matrix_of_"
847 "line_intersection_graph after Surf->compute_adjacency_"
848 "matrix_of_line_intersection_graph" << endl;
849 }
850
853 Adj_line_intersection_graph, 0 /* verbose_level*/);
854
855 if (f_v) {
856 cout << "surface_object_properties::compute_adjacency_matrix_of_"
857 "line_intersection_graph before Surf->compute_"
858 "intersection_points_and_indices" << endl;
859 }
862 SO->Pts, SO->nb_pts,
863 SO->Lines, SO->nb_lines /* nb_lines */,
865 verbose_level);
866 if (f_v) {
867 cout << "surface_object_properties::compute_adjacency_matrix_of_"
868 "line_intersection_graph after Surf->compute_"
869 "intersection_points_and_indices" << endl;
870 }
871#if 0
872 Surf->compute_intersection_points(Adj_line_intersection_graph,
874 Lines, SO->nb_lines, verbose_level - 2);
875#endif
876
877 if (f_v) {
878 cout << "surface_object_properties::compute_adjacency_matrix_of_line_intersection_graph done" << endl;
879 }
880
881}
882
884{
885 return Adj_line_intersection_graph[i * SO->nb_lines + j];
886}
887
889{
890 int f_v = (verbose_level >= 1);
891
892 if (f_v) {
893 cout << "surface_object_properties::compute_plane_type_by_points" << endl;
894 }
895
899
902 plane_type_by_points, 0 /* verbose_level */);
903
904
906
908 if (f_v) {
909 cout << "plane types by points: ";
911 cout << endl;
912 }
913 }
914 else {
915 cout << "surface_object_properties::compute_plane_type_by_points "
916 "too many planes, skipping plane type " << endl;
917 }
918
919
920 if (f_v) {
921 cout << "surface_object_properties::compute_plane_type_by_points done" << endl;
922 }
923}
924
925
927{
928 int f_v = (verbose_level >= 1);
929 int f_vv = (verbose_level >= 2);
930
931 if (f_v) {
932 cout << "surface_object_properties::compute_tritangent_planes_by_rank" << endl;
933 }
934
935
936 if (SO->nb_lines != 27) {
937 cout << "surface_object_properties::compute_tritangent_planes_by_rank "
938 "SO->nb_lines != 27 we don't compute the tritangent planes" << endl;
940 return;
941 }
942
943
946
947
948 int tritangent_plane_idx;
949 int three_lines_idx[3];
950 long int three_lines[3];
951 int i, r;
952 int Basis[6 * 4];
953 int base_cols[4];
954
955 for (tritangent_plane_idx = 0;
956 tritangent_plane_idx < 45;
957 tritangent_plane_idx++) {
958 SO->Surf->Schlaefli->Eckardt_points[tritangent_plane_idx].three_lines(
959 SO->Surf, three_lines_idx);
960
961 for (i = 0; i < 3; i++) {
962 three_lines[i] = SO->Lines[three_lines_idx[i]];
963 SO->Surf->Gr->unrank_lint_here(Basis + i * 8,
964 three_lines[i], 0 /* verbose_level */);
965 }
966 r = SO->F->Linear_algebra->Gauss_simple(Basis, 6, 4,
967 base_cols, 0 /* verbose_level */);
968 if (r != 3) {
969 cout << "surface_object_properties::compute_tritangent_planes_by_rank r != 3" << endl;
970 exit(1);
971 }
972 Tritangent_plane_rk[tritangent_plane_idx] =
973 SO->Surf->Gr3->rank_lint_here(Basis, 0 /* verbose_level */);
974 }
975 if (f_vv) {
976 cout << "surface_object_properties::compute_tritangent_planes_by_rank" << endl;
977 for (tritangent_plane_idx = 0;
978 tritangent_plane_idx < 45;
979 tritangent_plane_idx++) {
980 cout << tritangent_plane_idx << " : " << Tritangent_plane_rk[tritangent_plane_idx] << endl;
981 }
982 }
983 if (f_v) {
984 cout << "surface_object_properties::compute_tritangent_planes_by_rank done" << endl;
985 }
986}
987
988
990{
991 int f_v = (verbose_level >= 1);
992 int tritangent_plane_idx, j;
993
994 if (f_v) {
995 cout << "surface_object_properties::compute_Lines_in_tritangent_planes" << endl;
996 }
998 for (tritangent_plane_idx = 0;
999 tritangent_plane_idx < 45;
1000 tritangent_plane_idx++) {
1001 for (j = 0; j < 3; j++) {
1002 Lines_in_tritangent_planes[tritangent_plane_idx * 3 + j] =
1003 SO->Lines[SO->Surf->Schlaefli->Lines_in_tritangent_planes[tritangent_plane_idx * 3 + j]];
1004 }
1005 }
1006
1007 if (f_v) {
1008 cout << "surface_object_properties::compute_Lines_in_tritangent_planes done" << endl;
1009 }
1010}
1011
1013{
1014 int f_v = (verbose_level >= 1);
1015 int i, j;
1016
1017 if (f_v) {
1018 cout << "surface_object_properties::compute_Trihedral_pairs_as_tritangent_planes" << endl;
1019 }
1021 for (i = 0; i < 120; i++) {
1022 for (j = 0; j < 6; j++) {
1025 }
1026 }
1027
1028 if (f_v) {
1029 cout << "surface_object_properties::compute_Trihedral_pairs_as_tritangent_planes done" << endl;
1030 }
1031}
1032
1034{
1035 int f_v = (verbose_level >= 1);
1036 int i, j;
1037
1038 if (f_v) {
1039 cout << "surface_object_properties::compute_planes_and_dual_point_ranks" << endl;
1040 }
1041
1044 //Iso_trihedral_pair = NEW_int(Surf->nb_trihedral_pairs);
1045
1046
1047 SO->Surf->Trihedral_pairs_to_planes(SO->Lines, All_Planes, 0 /*verbose_level*/);
1048
1049
1050 for (i = 0; i < SO->Surf->Schlaefli->nb_trihedral_pairs; i++) {
1051 //cout << "trihedral pair " << i << " / "
1052 // << Surf->nb_trihedral_pairs << endl;
1053 for (j = 0; j < 6; j++) {
1054 Dual_point_ranks[i * 6 + j] =
1056 All_Planes[i * 6 + j], 0 /* verbose_level */);
1057 }
1058
1059 }
1060 if (f_v) {
1061 cout << "surface_object_properties::compute_planes_and_dual_point_ranks done" << endl;
1062 }
1063}
1064
1065
1066
1067
1068void surface_object_properties::print_everything(ostream &ost, int verbose_level)
1069{
1070 int f_v = (verbose_level >= 1);
1071
1072 if (f_v) {
1073 cout << "surface_object_properties::print_everything" << endl;
1074 }
1075
1076 if (f_v) {
1077 cout << "surface_object_properties::print_everything before print_equation" << endl;
1078 }
1079 print_equation(ost);
1080 if (f_v) {
1081 cout << "surface_object_properties::print_everything after print_equation" << endl;
1082 }
1083
1084 if (f_v) {
1085 cout << "surface_object_properties::print_everything "
1086 "before print_general" << endl;
1087 }
1088 print_general(ost);
1089
1090
1091 if (f_v) {
1092 cout << "surface_object_properties::print_everything "
1093 "before print_lines" << endl;
1094 }
1095 print_lines(ost);
1096
1097
1098 if (f_v) {
1099 cout << "surface_object_properties::print_everything "
1100 "before print_points" << endl;
1101 }
1102 print_points(ost);
1103
1104
1105 if (f_v) {
1106 cout << "surface_object_properties::print_everything "
1107 "before print_lines_with_points_on_them" << endl;
1108 }
1110
1111
1112
1113 if (f_v) {
1114 cout << "surface_object_properties::print_everything "
1115 "before SO->print_line_intersection_graph" << endl;
1116 }
1118
1119 if (f_v) {
1120 cout << "surface_object_properties::print_everything "
1121 "before print_adjacency_matrix_with_intersection_points" << endl;
1122 }
1124
1125
1126 if (f_v) {
1127 cout << "surface_object_properties::print_everything "
1128 "before print_neighbor_sets" << endl;
1129 }
1131
1132 if (f_v) {
1133 cout << "surface_object_properties::print_everything "
1134 "before print_tritangent_planes" << endl;
1135 }
1137
1138
1139 //SO->print_planes_in_trihedral_pairs(ost);
1140
1141#if 0
1142 if (f_v) {
1143 cout << "surface_object_properties::print_everything "
1144 "before print_generalized_quadrangle" << endl;
1145 }
1146 print_generalized_quadrangle(ost);
1147#endif
1148
1149 if (f_v) {
1150 cout << "surface_object_properties::print_everything "
1151 "before print_double sixes" << endl;
1152 }
1153 print_double_sixes(ost);
1154
1155 if (f_v) {
1156 cout << "surface_object_properties::print_everything "
1157 "before print_trihedral_pairs" << endl;
1158 }
1159
1160 if (f_v) {
1161 cout << "surface_object_properties::print_everything "
1162 "before print_half_double_sixes" << endl;
1163 }
1165
1166 if (f_v) {
1167 cout << "surface_object_properties::print_everything "
1168 "before print_half_double_sixes_numerically" << endl;
1169 }
1171
1172 if (f_v) {
1173 cout << "surface_object_properties::print_everything "
1174 "before print_trihedral_pairs" << endl;
1175 }
1176
1178
1179 if (f_v) {
1180 cout << "surface_object_properties::print_everything "
1181 "before print_trihedral_pairs_numerically" << endl;
1182 }
1183
1185
1186 if (f_v) {
1187 cout << "surface_object_properties::print_everything done" << endl;
1188 }
1189}
1190
1191
1192
1193void surface_object_properties::report_properties(std::ostream &ost, int verbose_level)
1194{
1195 int f_v = (verbose_level >= 1);
1196
1197 if (f_v) {
1198 cout << "surface_object_properties::report_properties" << endl;
1199 }
1200
1201 if (f_v) {
1202 cout << "surface_object_properties::report_properties_simple before print_equation" << endl;
1203 }
1204 print_equation(ost);
1205
1206 if (f_v) {
1207 cout << "surface_object_properties::report_properties before print_general" << endl;
1208 }
1209 print_general(ost);
1210
1211
1212 if (f_v) {
1213 cout << "surface_object_properties::report_properties before print_lines" << endl;
1214 }
1215 print_lines(ost);
1216
1217 if (f_v) {
1218 cout << "surface_object_properties::report_properties before print_points" << endl;
1219 }
1220 print_points(ost);
1221
1222
1223 if (f_v) {
1224 cout << "surface_object_properties::report_properties print_tritangent_planes" << endl;
1225 }
1227
1228
1229 if (f_v) {
1230 cout << "surface_object_properties::report_properties "
1231 "before print_Steiner_and_Eckardt" << endl;
1232 }
1234
1235 //SOA->SO->print_planes_in_trihedral_pairs(fp);
1236
1237#if 0
1238 if (f_v) {
1239 cout << "surface_object_properties::report_properties "
1240 "before print_generalized_quadrangle" << endl;
1241 }
1242 print_generalized_quadrangle(ost);
1243#endif
1244
1245 if (f_v) {
1246 cout << "surface_object_properties::report_properties "
1247 "before print_line_intersection_graph" << endl;
1248 }
1250
1251 if (f_v) {
1252 cout << "surface_object_properties::report_properties done" << endl;
1253 }
1254}
1255
1256void surface_object_properties::report_properties_simple(std::ostream &ost, int verbose_level)
1257{
1258 int f_v = (verbose_level >= 1);
1259
1260 if (f_v) {
1261 cout << "surface_object_properties::report_properties_simple" << endl;
1262 }
1263
1264
1265 if (f_v) {
1266 cout << "surface_object_properties::report_properties_simple before print_equation" << endl;
1267 }
1268 print_equation(ost);
1269
1270 if (f_v) {
1271 cout << "surface_object_properties::report_properties_simple before print_general" << endl;
1272 }
1273 print_general(ost);
1274
1275
1276
1277
1278 ost << "\\subsubsection*{Singular Points}" << endl;
1279 cout << "surface_object_properties::print_points before print_singular_points" << endl;
1281
1282
1283 if (f_v) {
1284 cout << "surface_object_properties::report_properties_simple before print_lines" << endl;
1285 }
1286 print_lines(ost);
1287
1288
1289 ost << "\\subsubsection*{Eckardt Points}" << endl;
1290 cout << "surface_object_properties::print_points before print_Eckardt_points" << endl;
1292
1293 ost << "\\subsubsection*{Double Points}" << endl;
1294 cout << "surface_object_properties::print_points before print_double_points" << endl;
1296
1297
1298 ost << "\\subsubsection*{Single Points}" << endl;
1299 cout << "surface_object_properties::print_points before print_single_points" << endl;
1301
1302 //ost << "\\subsubsection*{Points on lines}" << endl;
1303 //cout << "surface_object_properties::print_points before print_points_on_lines" << endl;
1304 //print_points_on_lines(ost);
1305
1306 ost << "\\subsubsection*{Points on surface but on no line}" << endl;
1307 cout << "surface_object_properties::print_points before print_points_on_surface_but_not_on_a_line" << endl;
1309
1310
1311 if (f_v) {
1312 cout << "surface_object_properties::report_properties_simple print_Hesse_planes" << endl;
1313 }
1314 print_Hesse_planes(ost);
1315
1316 if (f_v) {
1317 cout << "surface_object_properties::report_properties_simple print_axes" << endl;
1318 }
1319 print_axes(ost);
1320
1321
1322 if (f_v) {
1323 cout << "surface_object_properties::report_properties_simple print_tritangent_planes" << endl;
1324 }
1326
1327#if 0
1328 if (f_v) {
1329 cout << "surface_object_properties::report_properties_simple "
1330 "before print_Steiner_and_Eckardt" << endl;
1331 }
1333#endif
1334
1335 //SOA->SO->print_planes_in_trihedral_pairs(fp);
1336
1337#if 0
1338 if (f_v) {
1339 cout << "surface_object_properties::report_properties_simple "
1340 "before print_generalized_quadrangle" << endl;
1341 }
1342 print_generalized_quadrangle(ost);
1343#endif
1344
1345 if (f_v) {
1346 cout << "surface_object_properties::report_properties_simple "
1347 "before print_line_intersection_graph" << endl;
1348 }
1350
1351 if (f_v) {
1352 cout << "surface_object_properties::report_properties_simple done" << endl;
1353 }
1354
1355
1356 if (f_v) {
1357 cout << "surface_object_properties::report_properties_simple before print_all_points_on_surface" << endl;
1358 }
1360
1361}
1362
1364{
1365 //ost << "\\clearpage" << endl;
1366 ost << "\\subsection*{Line Intersection Graph}" << endl;
1367
1368 //print_adjacency_list(ost);
1369
1371
1372 //print_adjacency_matrix_with_intersection_points(ost);
1373
1375}
1376
1378{
1379 if (SO->nb_lines < 128) {
1380 int i, j, m, n, h;
1381 int *p;
1382 int *set;
1383
1384
1385 set = NEW_int(SO->nb_lines);
1386 m = SO->nb_lines;
1387 n = SO->nb_lines;
1389 ost << "{\\arraycolsep=1pt" << endl;
1390
1391 ost << "$$" << endl;
1392 ost << "\\begin{array}{rr|l|l}" << endl;
1393 ost << " & & \\mbox{intersecting} & \\mbox{non-intersecting}";
1394 ost << "\\\\" << endl;
1395 ost << "\\hline" << endl;
1396 for (i = 0; i < m; i++) {
1397 ost << i << " & ";
1398 if (SO->nb_lines == 27) {
1399 ost << SO->Surf->Schlaefli->Labels->Line_label_tex[i];
1400 }
1401 else {
1402 ost << i;
1403 }
1404 ost << " & ";
1405 h = 0;
1406 for (j = 0; j < n; j++) {
1407 if (p[i * n + j]) {
1408 set[h++] = j;
1409 }
1410 }
1411 for (j = 0; j < h; j++) {
1412 if (SO->nb_lines == 27) {
1413 ost << SO->Surf->Schlaefli->Labels->Line_label_tex[set[j]];
1414 }
1415 else {
1416 ost << set[j];
1417 }
1418 if (j < h - 1) {
1419 ost << ", ";
1420 }
1421 }
1422 ost << " & ";
1423 h = 0;
1424 for (j = 0; j < n; j++) {
1425 if (p[i * n + j] == 0) {
1426 set[h++] = j;
1427 }
1428 }
1429 for (j = 0; j < h; j++) {
1430 if (SO->nb_lines == 27) {
1431 ost << SO->Surf->Schlaefli->Labels->Line_label_tex[set[j]];
1432 }
1433 else {
1434 ost << set[j];
1435 }
1436 if (j < h - 1) {
1437 ost << ", ";
1438 }
1439 }
1440 ost << "\\\\";
1441 ost << endl;
1442 }
1443 ost << "\\end{array}" << endl;
1444 ost << "$$" << endl;
1445 ost << "}%%" << endl;
1446
1447 FREE_int(set);
1448 }
1449 else {
1450 ost << "Too many lines to print.\\\\" << endl;
1451 }
1452
1453}
1454
1455
1457{
1458 if (SO->nb_lines < 128) {
1459 int i, j, m, n;
1460 int *p;
1461
1462 m = SO->nb_lines;
1463 n = SO->nb_lines;
1465 ost << "{\\arraycolsep=1pt" << endl;
1466 ost << "$$" << endl;
1467 ost << "\\begin{array}{rr|*{" << n << "}r}" << endl;
1468 ost << " & ";
1469 for (j = 0; j < n; j++) {
1470 ost << " & " << j;
1471 }
1472 ost << "\\\\" << endl;
1473 if (SO->nb_lines == 27) {
1474 ost << " & ";
1475 for (j = 0; j < n; j++) {
1476 ost << " & " << SO->Surf->Schlaefli->Labels->Line_label_tex[j];
1477 }
1478 ost << "\\\\" << endl;
1479 }
1480 ost << "\\hline" << endl;
1481 for (i = 0; i < m; i++) {
1482 ost << i << " & ";
1483 if (SO->nb_lines == 27) {
1484 ost << SO->Surf->Schlaefli->Labels->Line_label_tex[i];
1485 }
1486 for (j = 0; j < n; j++) {
1487 ost << " & " << p[i * n + j];
1488 }
1489 ost << "\\\\";
1490 ost << endl;
1491 }
1492 ost << "\\end{array}" << endl;
1493 ost << "$$" << endl;
1494 ost << "}%%" << endl;
1495 }
1496 else {
1497 ost << "Too many lines to print.\\\\" << endl;
1498 }
1499}
1500
1502 std::ostream &ost)
1503{
1504
1505 if (SO->nb_lines < 128) {
1506 int i, j, m, n, idx;
1507 int *p;
1508
1509 m = SO->nb_lines;
1510 n = SO->nb_lines;
1512 ost << "{\\arraycolsep=1pt" << endl;
1513 ost << "$$" << endl;
1514 ost << "\\begin{array}{rr|*{" << n << "}r}" << endl;
1515 ost << " & ";
1516 for (j = 0; j < n; j++) {
1517 ost << " & " << j;
1518 }
1519 ost << "\\\\" << endl;
1520
1521 if (SO->nb_lines == 27) {
1522 ost << " & ";
1523 for (j = 0; j < n; j++) {
1524 ost << " & " << SO->Surf->Schlaefli->Labels->Line_label_tex[j];
1525 }
1526 ost << "\\\\" << endl;
1527 }
1528 ost << "\\hline" << endl;
1529 for (i = 0; i < m; i++) {
1530 ost << i;
1531 if (SO->nb_lines == 27) {
1532 ost << " & " << SO->Surf->Schlaefli->Labels->Line_label_tex[i];
1533 }
1534 else {
1535 ost << " & ";
1536 }
1537 for (j = 0; j < n; j++) {
1538 ost << " & ";
1539 if (p[i * n + j]) {
1540 //a = Line_intersection_pt[i * n + j];
1541 idx = Line_intersection_pt_idx[i * n + j];
1542 ost << "P_{" << idx << "}";
1543 }
1544 else {
1545 ost << ".";
1546 }
1547 }
1548 ost << "\\\\";
1549 ost << endl;
1550 }
1551 ost << "\\end{array}" << endl;
1552 ost << "$$" << endl;
1553 ost << "}%%" << endl;
1554 }
1555 else {
1556 ost << "Too many lines to print.\\\\" << endl;
1557 }
1558}
1559
1561{
1562 int i, j, h, p;
1564
1565 //ost << "\\clearpage" << endl;
1566 ost << "Neighbor sets in the line intersection graph:\\\\" << endl;
1567 //Line_neighbors->print_table_tex(ost);
1568 if (Line_neighbors->nb_sets < 1028) {
1569 for (i = 0; i < Line_neighbors->nb_sets; i++) {
1570 ost << "Line " << i << " intersects " << endl;
1571 ost << "$$" << endl;
1572 ost << "\\begin{array}{|r*{"
1573 << Line_neighbors->Set_size[i] << "}{|c}|}" << endl;
1574 //int_set_print_tex(ost, Line_neighbors->Sets[i],
1575 //Line_neighbors->Set_size[i]);
1576 ost << "\\hline" << endl;
1577 ost << "\\mbox{Line} ";
1578 for (h = 0; h < Line_neighbors->Set_size[i]; h++) {
1579 j = Line_neighbors->Sets[i][h];
1580 ost << " & " << "\\ell_{" << j << "}";
1581 }
1582 ost << "\\\\" << endl;
1583 ost << "\\hline" << endl;
1584 ost << "\\mbox{in point} ";
1585 for (h = 0; h < Line_neighbors->Set_size[i]; h++) {
1586 j = Line_neighbors->Sets[i][h];
1587 p = Line_intersection_pt[i * SO->nb_lines + j];
1588
1589#if 0
1590 if (!Sorting.lint_vec_search_linear(SO->Pts, SO->nb_pts, p, idx)) {
1591 cout << "surface_object::print_line_intersection_graph "
1592 "did not find intersection point" << endl;
1593 exit(1);
1594 }
1595 ost << " & " << idx;
1596#else
1597 ost << " & " << "P_{" << p << "}";
1598#endif
1599 }
1600 ost << "\\\\" << endl;
1601 ost << "\\hline" << endl;
1602 ost << "\\end{array}" << endl;
1603 ost << "$$" << endl;
1604 }
1605 }
1606 else {
1607 ost << "Too many lines to print.\\\\" << endl;
1608 }
1609}
1610
1612{
1614
1615 ost << "\\clearpage\n\\subsection*{All planes "
1616 "in trihedral pairs}" << endl;
1617
1618 ost << "All planes by plane rank:" << endl;
1619
1620 ost << "$$" << endl;
1622 All_Planes, 30, 6, TRUE /* f_tex */);
1623 ost << "\\;\\;" << endl;
1625 All_Planes + 30 * 6, 30, 6, 30, 0, TRUE /* f_tex */);
1626 ost << "$$" << endl;
1627 ost << "$$" << endl;
1629 All_Planes + 60 * 6, 30, 6, 60, 0, TRUE /* f_tex */);
1630 ost << "\\;\\;" << endl;
1632 All_Planes + 90 * 6, 30, 6, 90, 0, TRUE /* f_tex */);
1633 ost << "$$" << endl;
1634
1635
1636
1637 ost << "All planes by dual point rank:" << endl;
1638 ost << "$$" << endl;
1640 Dual_point_ranks, 30, 6, TRUE /* f_tex */);
1641 ost << "\\;\\;" << endl;
1643 Dual_point_ranks + 30 * 6, 30, 6, 30, 0, TRUE /* f_tex */);
1644 ost << "$$" << endl;
1645 ost << "$$" << endl;
1647 Dual_point_ranks + 60 * 6, 30, 6, 60, 0, TRUE /* f_tex */);
1648 ost << "\\;\\;" << endl;
1650 Dual_point_ranks + 90 * 6, 30, 6, 90, 0, TRUE /* f_tex */);
1651 ost << "$$" << endl;
1652}
1653
1655{
1656 int i;
1657 //int plane_rk, b, v4[4];
1658 //int Mtx[16];
1659
1660 //ost << "\\clearpage" << endl;
1661 ost << "\\subsection*{Tritangent planes}" << endl;
1662 ost << "The " << nb_tritangent_planes << " tritangent "
1663 "planes are:\\\\" << endl;
1664 for (i = 0; i < nb_tritangent_planes; i++) {
1666 }
1667
1668#if 0
1669 ost << "$$" << endl;
1670 print_integer_matrix_with_standard_labels(ost,
1671 Tritangent_planes, 9, 5, TRUE /* f_tex */);
1672 ost << "$$" << endl;
1673 ost << "Their dual point ranks are:" << endl;
1674 ost << "$$" << endl;
1675 print_integer_matrix_with_standard_labels(ost,
1676 Tritangent_plane_dual, 9, 5, TRUE /* f_tex */);
1677 ost << "$$" << endl;
1678
1679 for (i = 0; i < nb_tritangent_planes; i++) {
1680 a = Tritangent_planes[i];
1681 b = Tritangent_plane_dual[i];
1682 //b = Surf->P->dual_rank_of_plane_in_three_space(a, 0);
1683 ost << "plane " << i << " / " << nb_tritangent_planes
1684 << " : rank " << a << " is $";
1685 ost << "\\left[" << endl;
1686 Surf->Gr3->print_single_generator_matrix_tex(ost, a);
1687 ost << "\\right]" << endl;
1688 ost << "$, dual pt rank = $" << b << "$ ";
1689 PG_element_unrank_modified(*F, v4, 1, 4, b);
1690 ost << "$=";
1691 int_vec_print(ost, v4, 4);
1692 ost << "$\\\\" << endl;
1693 }
1694
1695 ost << "The iso types of the tritangent planes are:" << endl;
1696 ost << "$$" << endl;
1697 print_integer_matrix_with_standard_labels(ost,
1698 iso_type_of_tritangent_plane, nb_tritangent_planes / 5, 5,
1699 TRUE /* f_tex */);
1700 ost << "$$" << endl;
1701
1702 ost << "Type iso of tritangent planes: ";
1703 ost << "$$" << endl;
1704 Type_iso_tritangent_planes->print_naked_tex(ost, TRUE);
1705 ost << endl;
1706 ost << "$$" << endl;
1707 ost << endl;
1708
1709 ost << "Tritangent\\_plane\\_to\\_Eckardt:" << endl;
1710 ost << "$$" << endl;
1711 print_integer_matrix_with_standard_labels(ost,
1712 Tritangent_plane_to_Eckardt, nb_tritangent_planes / 5, 5,
1713 TRUE /* f_tex */);
1714 ost << "$$" << endl;
1715 ost << "Eckardt\\_to\\_Tritangent\\_plane:" << endl;
1716 ost << "$$" << endl;
1717 print_integer_matrix_with_standard_labels(ost,
1718 Eckardt_to_Tritangent_plane, nb_tritangent_planes / 5, 5,
1719 TRUE /* f_tex */);
1720 ost << "$$" << endl;
1721
1722 ost << "Trihedral\\_pairs\\_as\\_tritangent\\_planes:" << endl;
1723 ost << "$$" << endl;
1724 print_integer_matrix_with_standard_labels(ost,
1725 Trihedral_pairs_as_tritangent_planes, 30, 6, TRUE /* f_tex */);
1726 ost << "\\;\\;" << endl;
1727 print_integer_matrix_with_standard_labels_and_offset(ost,
1728 Trihedral_pairs_as_tritangent_planes + 30 * 6, 30, 6, 30, 0,
1729 TRUE /* f_tex */);
1730 ost << "$$" << endl;
1731 ost << "$$" << endl;
1732 print_integer_matrix_with_standard_labels_and_offset(ost,
1733 Trihedral_pairs_as_tritangent_planes + 60 * 6, 30, 6, 60, 0,
1734 TRUE /* f_tex */);
1735 ost << "\\;\\;" << endl;
1736 print_integer_matrix_with_standard_labels_and_offset(ost,
1737 Trihedral_pairs_as_tritangent_planes + 90 * 6, 30, 6, 90, 0,
1738 TRUE /* f_tex */);
1739 ost << "$$" << endl;
1740#endif
1741
1742}
1743
1745{
1746 long int plane_rk, b;
1747 int v4[4];
1748 int Mtx[16];
1749
1750#if 0
1751 j = Eckardt_to_Tritangent_plane[plane_idx];
1752 plane_rk = Tritangent_planes[j];
1753 b = Tritangent_plane_dual[j];
1754#else
1755 plane_rk = Tritangent_plane_rk[plane_idx];
1757 plane_rk, 0 /* verbose_level */);
1758#endif
1759 ost << "$$" << endl;
1760 ost << "\\pi_{" << SO->Surf->Schlaefli->Eckard_point_label_tex[plane_idx] << "} = ";
1761 ost << "\\pi_{" << plane_idx << "} = " << plane_rk << " = ";
1762 //ost << "\\left[" << endl;
1763 SO->Surf->Gr3->print_single_generator_matrix_tex(ost, plane_rk);
1764 //ost << "\\right]" << endl;
1765 ost << " = ";
1767
1769 0 /*verbose_level */);
1770 SO->F->PG_element_normalize(Mtx + 12, 1, 4);
1771 ost << "$$" << endl;
1772 ost << "$$" << endl;
1773 ost << "=V\\big(" << endl;
1774 SO->Surf->Poly1_4->print_equation(ost, Mtx + 12);
1775 ost << "\\big)" << endl;
1776 ost << "=V\\big(" << endl;
1777 SO->Surf->Poly1_4->print_equation_numerical(ost, Mtx + 12);
1778 ost << "\\big)" << endl;
1779 ost << "$$" << endl;
1780 ost << "dual pt rank = $" << b << "$ ";
1781 SO->F->PG_element_unrank_modified(v4, 1, 4, b);
1782 ost << "$=";
1783 Int_vec_print(ost, v4, 4);
1784 ost << "$.\\\\" << endl;
1785
1786}
1787
1788
1790{
1791 ost << "\\subsection*{Plane types by points}" << endl;
1792 //*fp << "$$" << endl;
1793 //*fp << "\\Big(" << endl;
1795 //*fp << "\\Big)" << endl;
1796 ost << "\\\\" << endl;
1797}
1798
1800{
1801 ost << "\\subsection*{The " << SO->nb_lines << " Lines}" << endl;
1803}
1804
1806{
1808
1809 ost << "\\subsection*{The " << SO->nb_lines << " lines with points on them}" << endl;
1810 int i, j;
1811 int pt;
1812
1813 if (SO->nb_lines < 128) {
1814 for (i = 0; i < SO->nb_lines; i++) {
1815 //fp << "Line " << i << " is " << v[i] << ":\\\\" << endl;
1816 SO->Surf->Gr->unrank_lint(SO->Lines[i], 0 /*verbose_level*/);
1817 ost << "$$" << endl;
1818 ost << "\\ell_{" << i << "} ";
1819 if (SO->nb_lines == 27) {
1820 ost << " = " << SO->Surf->Schlaefli->Labels->Line_label_tex[i];
1821 }
1822 ost << " = \\left[" << endl;
1823 //print_integer_matrix_width(cout, Gr->M,
1824 // k, n, n, F->log10_of_q + 1);
1825 L.print_integer_matrix_tex(ost, SO->Surf->Gr->M, 2, 4);
1826 ost << "\\right]_{" << SO->Lines[i] << "}" << endl;
1827 ost << "$$" << endl;
1828 ost << "which contains the point set " << endl;
1829 ost << "$$" << endl;
1830 ost << "\\{ P_{i} \\mid i \\in ";
1833 ost << "\\}." << endl;
1834 ost << "$$" << endl;
1835
1836 {
1837 std::vector<long int> plane_ranks;
1838
1840 SO->Lines[i], plane_ranks,
1841 0 /*verbose_level*/);
1842
1843 // print the tangent planes associated with the points on the line:
1844 ost << "The tangent planes associated with the points on this line are:\\\\" << endl;
1845 for (j = 0; j < pts_on_lines->Set_size[i]; j++) {
1846
1847 int w[4];
1848
1849 pt = pts_on_lines->Sets[i][j];
1850 ost << j << " : " << pt << " : ";
1851 SO->Surf->unrank_point(w, SO->Pts[pt]);
1852 Int_vec_print(ost, w, 4);
1853 ost << " : ";
1854 if (tangent_plane_rank_global[pt] == -1) {
1855 ost << " is singular\\\\" << endl;
1856 }
1857 else {
1858 ost << tangent_plane_rank_global[pt] << "\\\\" << endl;
1859 }
1860 }
1861 ost << "The planes in the pencil through the line are:\\\\" << endl;
1862 for (j = 0; j < plane_ranks.size(); j++) {
1863 ost << j << " : " << plane_ranks[j] << "\\\\" << endl;
1864
1865 }
1866 }
1867 }
1868 }
1869 else {
1870 ost << "Too many to print.\\\\" << endl;
1871 }
1872}
1873
1875{
1876 ost << "\\subsection*{The equation}" << endl;
1877 ost << "The equation of the surface ";
1878 ost << " is :" << endl;
1879
1880#if 0
1881 ost << "$$" << endl;
1882 SO->Surf->print_equation_tex(ost, SO->eqn);
1883 ost << endl << "=0\n$$" << endl;
1884#else
1886#endif
1887 Int_vec_print(ost, SO->eqn, 20);
1888 ost << "\\\\" << endl;
1889
1890 long int rk;
1891
1892 SO->F->PG_element_rank_modified_lint(SO->eqn, 1, 20, rk);
1893 ost << "The point rank of the equation over GF$(" << SO->F->q << ")$ is " << rk << "\\\\" << endl;
1894
1895 //ost << "Number of points on the surface " << SO->nb_pts << "\\\\" << endl;
1896
1897
1898}
1899
1901{
1902 ost << "\\subsection*{General information}" << endl;
1903
1904
1905 ost << "{\\renewcommand{\\arraystretch}{1.5}" << endl;
1906 ost << "$$" << endl;
1907 ost << "\\begin{array}{|l|r|}" << endl;
1908 ost << "\\hline" << endl;
1909 ost << "\\mbox{Number of lines} & " << SO->nb_lines << "\\\\" << endl;
1910 ost << "\\hline" << endl;
1911 ost << "\\mbox{Number of points} & " << SO->nb_pts << "\\\\" << endl;
1912 ost << "\\hline" << endl;
1913 ost << "\\mbox{Number of singular points} & " << nb_singular_pts << "\\\\" << endl;
1914 ost << "\\hline" << endl;
1915 ost << "\\mbox{Number of Eckardt points} & " << nb_Eckardt_points << "\\\\" << endl;
1916 ost << "\\hline" << endl;
1917 ost << "\\mbox{Number of double points} & " << nb_Double_points << "\\\\" << endl;
1918 ost << "\\hline" << endl;
1919 ost << "\\mbox{Number of single points} & " << nb_Single_points << "\\\\" << endl;
1920 ost << "\\hline" << endl;
1921 ost << "\\mbox{Number of points off lines} & " << nb_pts_not_on_lines << "\\\\" << endl;
1922 ost << "\\hline" << endl;
1923 ost << "\\mbox{Number of Hesse planes} & " << nb_Hesse_planes << "\\\\" << endl;
1924 ost << "\\hline" << endl;
1925 ost << "\\mbox{Number of axes} & " << nb_axes << "\\\\" << endl;
1926 ost << "\\hline" << endl;
1927 ost << "\\mbox{Type of points on lines} & ";
1929 ost << "\\\\" << endl;
1930 ost << "\\hline" << endl;
1931 ost << "\\mbox{Type of lines on points} & ";
1933 ost << "\\\\" << endl;
1934 ost << "\\hline" << endl;
1935 ost << "\\end{array}" << endl;
1936 ost << "$$}" << endl;
1937#if 0
1938 ost << "Points on lines:" << endl;
1939 ost << "$$" << endl;
1941 ost << "$$" << endl;
1942 ost << "Lines on points:" << endl;
1943 ost << "$$" << endl;
1945 ost << "$$" << endl;
1946#endif
1947}
1948
1950{
1951 int i, j, cnt;
1952 int v[4];
1953
1954 //ost << "\\clearpage" << endl;
1955 ost << "\\subsection*{Affine points on surface}" << endl;
1956 ost << "\\begin{verbatim}" << endl;
1957 ost << "int Pts[] = {" << endl;
1958 cnt = 0;
1959 for (i = 0; i < SO->nb_pts; i++) {
1960 SO->Surf->unrank_point(v, SO->Pts[i]);
1961 SO->Surf->F->PG_element_normalize(v, 1, 4);
1962 if (v[3]) {
1963 ost << "\t";
1964 for (j = 0; j < 4; j++) {
1965 ost << v[j] << ", ";
1966 }
1967 ost << endl;
1968 cnt++;
1969 }
1970 }
1971 ost << "};" << endl;
1972 ost << "nb_affine_pts = " << cnt << ";" << endl;
1973 ost << "\\end{verbatim}" << endl;
1974}
1975
1977{
1978 ost << "\\subsection*{All Points on surface}" << endl;
1979
1980 cout << "surface_object_properties::print_points before print_points_on_surface" << endl;
1981 //print_points_on_surface(ost);
1983
1984 ost << "\\subsubsection*{Eckardt Points}" << endl;
1985 cout << "surface_object_properties::print_points before print_Eckardt_points" << endl;
1987
1988 ost << "\\subsubsection*{Singular Points}" << endl;
1989 cout << "surface_object_properties::print_points before print_singular_points" << endl;
1991
1992 ost << "\\subsubsection*{Double Points}" << endl;
1993 cout << "surface_object_properties::print_points before print_double_points" << endl;
1995
1996 ost << "\\subsubsection*{Points on lines}" << endl;
1997 cout << "surface_object_properties::print_points before print_points_on_lines" << endl;
1999
2000 ost << "\\subsubsection*{Points on surface but on no line}" << endl;
2001 cout << "surface_object_properties::print_points before print_points_on_surface_but_not_on_a_line" << endl;
2003
2004#if 0
2005 ost << "\\clearpage" << endl;
2006 ost << "\\section*{Lines through points}" << endl;
2008#endif
2009}
2010
2012{
2013 //latex_interface L;
2014 int i, j, p, a, b, c;
2015 int v[4];
2016
2017 //ost << "\\clearpage" << endl;
2018 ost << "The surface has " << nb_Eckardt_points
2019 << " Eckardt points:\\\\" << endl;
2020
2021
2022
2023
2024
2025 //ost << "%%\\clearpage" << endl;
2026 //ost << "The Eckardt points are:\\\\" << endl;
2027 //ost << "\\begin{multicols}{2}" << endl;
2028 //ost << "\\begin{align*}" << endl;
2029 for (i = 0; i < nb_Eckardt_points; i++) {
2030
2031 ost << "$";
2032
2033 p = Eckardt_points_index[i];
2034
2036
2037 ost << i << " : ";
2038 if (SO->nb_lines == 27) {
2040 }
2041 if (lines_on_point->Set_size[p] != 3) {
2042 cout << "surface_object_properties::print_Eckardt_points Eckardt point is not on three lines" << endl;
2043 exit(1);
2044 }
2045 a = lines_on_point->Sets[p][0];
2046 b = lines_on_point->Sets[p][1];
2047 c = lines_on_point->Sets[p][2];
2048
2049
2050 if (SO->nb_lines == 27) {
2051 //ost << "\\ell_{" << a << "} \\cap ";
2052 //ost << "\\ell_{" << b << "} \\cap ";
2053 //ost << "\\ell_{" << c << "}";
2054 //ost << " = ";
2055 ost << SO->Surf->Schlaefli->Labels->Line_label_tex[a] << " \\cap ";
2056 ost << SO->Surf->Schlaefli->Labels->Line_label_tex[b] << " \\cap ";
2057 ost << SO->Surf->Schlaefli->Labels->Line_label_tex[c];
2058 ost << " = ";
2059 }
2060 //ost << "P_{" << p << "} = ";
2061 ost << "P_{" << Eckardt_points[i] << "}=";
2062 ost << "\\bP(";
2063 //int_vec_print_fully(ost, v, 4);
2064 for (j = 0; j < 4; j++) {
2065 SO->F->print_element(ost, v[j]);
2066 if (j < 4 - 1) {
2067 ost << ", ";
2068 }
2069 }
2070 ost << ")";
2071 ost << " = \\bP(";
2072 for (j = 0; j < 4; j++) {
2073 ost << v[j];
2074 if (j < 4 - 1) {
2075 ost << ", ";
2076 }
2077 }
2078 ost << ")";
2079
2080 if (i < nb_Eckardt_points - 1) {
2081 ost << ",";
2082 }
2083 else {
2084 ost << ".";
2085 }
2086
2087 //ost << "\\; T= " << tangent_plane_rank_global[p];
2088 ost << "$\\\\" << endl;
2089#if 0
2090 if (tangent_plane_rank_global[p] == -1) {
2091 cout << "Eckardt point is singular. " << endl;
2092 //exit(1);
2093 }
2094#endif
2095
2096 }
2097 //ost << "\\end{align*}" << endl;
2098
2099
2100#if 0
2101 {
2102 //latex_interface L;
2103 long int *T;
2104
2106 for (i = 0; i < nb_Eckardt_points; i++) {
2107 p = Eckardt_points_index[i];
2108 T[i] = tangent_plane_rank_global[p];
2109 }
2110 ost << "Set of tangent planes: ";
2111 lint_vec_print(ost, T, nb_Eckardt_points);
2112 ost << "\\\\" << endl;
2113 FREE_lint(T);
2114 }
2115
2116 latex_interface L;
2117
2118 ost << "Line type of Eckardt points: $";
2119 L.print_type_vector_tex(ost, Eckardt_points_line_type, nb_Eckardt_points);
2120 ost << "$\\\\" << endl;
2121
2122
2123 {
2124 ost << "Plane type of Eckardt points: $";
2125 tally T_planes;
2126
2127 T_planes.init(Eckardt_points_plane_type, SO->Surf->P->Nb_subspaces[2], FALSE, 0);
2128
2129
2130 T_planes.print_file_tex_we_are_in_math_mode(ost, TRUE);
2131 ost << "$\\\\" << endl;
2132 }
2133
2134 print_Hesse_planes(ost);
2135
2136 print_axes(ost);
2137#endif
2138
2139}
2140
2142{
2143 //latex_interface L;
2144 int i, j;
2145
2146 ost << "\\subsection*{Hesse planes}" << endl;
2147 ost << "Number of Hesse planes: " << nb_Hesse_planes << "\\\\" << endl;
2148 ost << "Set of Hesse planes: ";
2150 ost << "\\\\" << endl;
2151
2153
2154
2155 ost << endl;
2156 ost << "\\clearpage" << endl;
2157 ost << endl;
2158
2159
2160 cout << "Hesse plane : rank : Incident Eckardt points\\\\" << endl;
2161
2162 ost << "\\noindent" << endl;
2163 for (j = 0; j < nb_Hesse_planes; j++) {
2164
2165
2166 int H[9], cnt, h;
2167
2168 cnt = 0;
2169 for (i = 0; i < nb_Eckardt_points; i++) {
2171 if (cnt == 9) {
2172 cout << "too many points on the Hesse plane" << endl;
2173 exit(1);
2174 }
2175 H[cnt++] = i;
2176 }
2177 }
2178 if (cnt != 9) {
2179 cout << "cnt != 9" << endl;
2180 exit(1);
2181 }
2182 ost << j << " : " << Hesse_planes[j] << " : ";
2183
2184 for (h = 0; h < 9; h++) {
2185 i = H[h];
2187 if (h < 9 - 1) {
2188 ost << ", ";
2189 }
2190 }
2191 ost << "\\\\" << endl;
2192 }
2193
2194
2195 ost << endl;
2196 ost << "\\clearpage" << endl;
2197 ost << endl;
2198
2199
2200 cout << "Hesse plane : rank : Incident Eckardt points\\\\" << endl;
2201 ost << "\\noindent" << endl;
2202 for (j = 0; j < nb_Hesse_planes; j++) {
2203
2204
2205 int H[9], cnt, h;
2206
2207 cnt = 0;
2208 for (i = 0; i < nb_Eckardt_points; i++) {
2210 if (cnt == 9) {
2211 cout << "too many points on the Hesse plane" << endl;
2212 exit(1);
2213 }
2214 H[cnt++] = i;
2215 }
2216 }
2217 if (cnt != 9) {
2218 cout << "cnt != 9" << endl;
2219 exit(1);
2220 }
2221 ost << j << " : " << Hesse_planes[j] << " : ";
2222
2223 for (h = 0; h < 9; h++) {
2224 i = H[h];
2226 if (h < 9 - 1) {
2227 ost << ", ";
2228 }
2229 }
2230 ost << "\\\\" << endl;
2231 }
2232
2233}
2234
2236{
2238 int i, j, idx, t_idx, t_r, a;
2239
2240 ost << "\\subsection*{Axes}" << endl;
2241 ost << "Number of axes: " << nb_axes << "\\\\" << endl;
2242 ost << "Axes: \\\\" << endl;
2243 for (i = 0; i < nb_axes; i++) {
2244 idx = Axes_index[i];
2245 t_idx = idx / 2;
2246 t_r = idx % 2;
2247 ost << i << " : " << idx << " = " << t_idx << "," << t_r << " = " << endl;
2248 for (j = 0; j < 3; j++) {
2249 a = Axes_Eckardt_points[i * 3 + j];
2250 ost << "$E_{" << SO->Surf->Schlaefli->Eckard_point_label_tex[a] << "}$";
2251 if (j < 3 - 1) {
2252 ost << ", ";
2253 }
2254 }
2255 ost << "\\\\" << endl;
2256 }
2257}
2258
2260{
2262 int i, j, p;
2263 int v[4];
2264
2265 //ost << "\\clearpage" << endl;
2266 ost << "The surface has " << nb_singular_pts
2267 << " singular points:\\\\" << endl;
2268
2269
2270
2271
2272
2273 //ost << "The Eckardt points are:\\\\" << endl;
2274 ost << "\\begin{multicols}{2}" << endl;
2275 //ost << "\\begin{align*}" << endl;
2276 ost << "\\noindent" << endl;
2277 for (i = 0; i < nb_singular_pts; i++) {
2278 p = singular_pts[i];
2279 SO->Surf->unrank_point(v, p);
2280 ost << i << " : $P_{" << p << "}=\\bP(";
2281 //int_vec_print_fully(ost, v, 4);
2282 for (j = 0; j < 4; j++) {
2283 SO->F->print_element(ost, v[j]);
2284 if (j < 4 - 1) {
2285 ost << ", ";
2286 }
2287 }
2288 ost << ")";
2289 ost << " = \\bP(";
2290 for (j = 0; j < 4; j++) {
2291 ost << v[j];
2292 if (j < 4 - 1) {
2293 ost << ", ";
2294 }
2295 }
2296 ost << ")";
2297
2298 ost << "$\\\\" << endl;
2299 }
2300 //ost << "\\end{align*}" << endl;
2301 ost << "\\end{multicols}" << endl;
2302}
2303
2304
2305
2307{
2309 int i, p, a, b;
2310 int v[4];
2311
2312 //ost << "\\clearpage" << endl;
2313 ost << "The surface has " << nb_Double_points
2314 << " Double points:\\\\" << endl;
2315 if (nb_Double_points < 1000) {
2316
2317#if 0
2318 ost << "$$" << endl;
2321 TRUE /* f_tex */);
2322 ost << "$$" << endl;
2323
2324 ost << "$$" << endl;
2327 TRUE /* f_tex */);
2328 ost << "$$" << endl;
2329#endif
2330
2331#if 0
2332 //ost << "\\clearpage" << endl;
2333 ost << "The Double points on the surface are:\\\\" << endl;
2334 ost << "\\begin{multicols}{2}" << endl;
2335 ost << "\\noindent" << endl;
2336 for (i = 0; i < nb_Double_points; i++) {
2338 ost << i << " : $";
2339 //ost << P_{" << Double_points_index[i] << "}=";
2340 ost << "P_{" << Double_points[i] << "}=";
2341 int_vec_print_fully(ost, v, 4);
2342 ost << "$\\\\" << endl;
2343 }
2344 ost << "\\end{multicols}" << endl;
2345#endif
2346
2347 ost << "The double points on the surface are:\\\\" << endl;
2348 //ost << "\\begin{multicols}{2}" << endl;
2349
2350 int *pt_idx;
2351
2352 pt_idx = NEW_int(SO->nb_lines * SO->nb_lines);
2353 for (i = 0; i < SO->nb_lines * SO->nb_lines; i++) {
2354 pt_idx[i] = -1;
2355 }
2356 for (p = 0; p < SO->nb_pts; p++) {
2357 if (lines_on_point->Set_size[p] != 2) {
2358 continue;
2359 }
2360 a = lines_on_point->Sets[p][0];
2361 b = lines_on_point->Sets[p][1];
2362 if (a > b) {
2363 a = lines_on_point->Sets[p][1];
2364 b = lines_on_point->Sets[p][0];
2365 }
2366 pt_idx[a * SO->nb_lines + b] = p;
2367 }
2368 ost << "\\begin{multicols}{2}" << endl;
2369 ost << "\\noindent" << endl;
2370 for (a = 0; a < SO->nb_lines; a++) {
2371 for (b = a + 1; b < SO->nb_lines; b++) {
2372 p = pt_idx[a * SO->nb_lines + b];
2373 if (p == -1) {
2374 continue;
2375 }
2376 SO->Surf->unrank_point(v, SO->Pts[p]);
2377 //ost << "P_{" << p << "} = ";
2378 ost << "$P_{" << SO->Pts[p] << "}";
2379 ost << " = ";
2380 Int_vec_print_fully(ost, v, 4);
2381
2382
2383 if (SO->nb_lines == 27) {
2384 ost << " = ";
2385 ost << "\\ell_{" << a << "} \\cap ";
2386 ost << "\\ell_{" << b << "} ";
2387 ost << " = ";
2388 ost << SO->Surf->Schlaefli->Labels->Line_label_tex[a] << " \\cap ";
2389 ost << SO->Surf->Schlaefli->Labels->Line_label_tex[b];
2390 }
2391 else {
2392 ost << " = ";
2393 ost << "\\ell_{" << a << "} \\cap ";
2394 ost << "\\ell_{" << b << "} ";
2395 }
2396 ost << "$\\\\" << endl;
2397 }
2398 }
2399 ost << "\\end{multicols}" << endl;
2400
2401 FREE_int(pt_idx);
2402 }
2403 else {
2404 ost << "Too many to print.\\\\" << endl;
2405 }
2406}
2407
2409{
2411 int i, p, a;
2412 int v[4];
2413
2414 //ost << "\\clearpage" << endl;
2415 ost << "The surface has " << nb_Single_points
2416 << " single points:\\\\" << endl;
2417 if (nb_Single_points < 1000) {
2418
2419#if 0
2420 ost << "$$" << endl;
2423 TRUE /* f_tex */);
2424 ost << "$$" << endl;
2425 ost << "$$" << endl;
2428 TRUE /* f_tex */);
2429 ost << "$$" << endl;
2430#endif
2431
2432 //ost << "\\clearpage" << endl;
2433 ost << "The single points on the surface are:\\\\" << endl;
2434 ost << "\\begin{multicols}{2}" << endl;
2435 ost << "\\noindent" << endl;
2436 for (i = 0; i < nb_Single_points; i++) {
2438 ost << i << " : ";
2439 // "$P_{" << Single_points_index[i] << "}=";
2440 p = Single_points_index[i];
2441 a = lines_on_point->Sets[p][0];
2442 ost << "$P_{" << Single_points[i] << "}=";
2443 Int_vec_print_fully(ost, v, 4);
2444 ost << "$";
2445 if (SO->nb_lines == 27) {
2446 ost << " lies on line $" << SO->Surf->Schlaefli->Labels->Line_label_tex[a] << "$";
2447 }
2448 else {
2449 ost << " lies on line $\\ell_{" << a << "}$";
2450 }
2451 ost << "\\\\" << endl;
2452 }
2453 ost << "\\end{multicols}" << endl;
2454 ost << "The single points on the surface are:\\\\" << endl;
2455 //ost << "\\begin{multicols}{2}" << endl;
2456 }
2457 else {
2458 ost << "Too many to print.\\\\" << endl;
2459 }
2460}
2461
2463{
2464 //latex_interface L;
2465 //int i;
2466 //int v[4];
2467
2468 //ost << "\\clearpage" << endl;
2469 ost << "The surface has " << SO->nb_pts << " points\\\\" << endl;
2470
2471#if 0
2472 if (SO->nb_pts < 1000) {
2473 ost << "$$" << endl;
2474 L.lint_vec_print_as_matrix(ost, SO->Pts, SO->nb_pts, 10, TRUE /* f_tex */);
2475 ost << "$$" << endl;
2476 //ost << "\\clearpage" << endl;
2477 ost << "The points on the surface are:\\\\" << endl;
2478 ost << "\\begin{multicols}{2}" << endl;
2479 ost << "\\noindent" << endl;
2480 for (i = 0; i < SO->nb_pts; i++) {
2481 SO->Surf->unrank_point(v, SO->Pts[i]);
2482 ost << i << " : $P_{" << i << "} = P_{" << SO->Pts[i] << "}=";
2483 int_vec_print_fully(ost, v, 4);
2484 ost << "$\\\\" << endl;
2485 }
2486 ost << "\\end{multicols}" << endl;
2487 }
2488 else {
2489 ost << "Too many to print.\\\\" << endl;
2490 }
2491#endif
2492}
2493
2495{
2496 //latex_interface L;
2497 //int i;
2498 //int v[4];
2499
2500 //ost << "\\clearpage" << endl;
2501 ost << "The surface has " << SO->nb_pts << " points:\\\\" << endl;
2502
2503 if (SO->nb_pts < 1000) {
2504 //ost << "$$" << endl;
2505 //L.lint_vec_print_as_matrix(ost, SO->Pts, SO->nb_pts, 10, TRUE /* f_tex */);
2506 //ost << "$$" << endl;
2507 //ost << "\\clearpage" << endl;
2508 ost << "The points on the surface are:\\\\" << endl;
2509 ost << "\\begin{multicols}{3}" << endl;
2510 ost << "\\noindent" << endl;
2511 int i;
2512 int v[4];
2513
2514 for (i = 0; i < SO->nb_pts; i++) {
2515 SO->Surf->unrank_point(v, SO->Pts[i]);
2516 ost << i << " : $P_{" << SO->Pts[i] << "}=";
2517 Int_vec_print_fully(ost, v, 4);
2518 ost << "$\\\\" << endl;
2519 }
2520 ost << "\\end{multicols}" << endl;
2522 ost << "\\\\" << endl;
2523 }
2524 else {
2525 ost << "Too many to print.\\\\" << endl;
2526 }
2527}
2528
2530{
2532 int i;
2533
2534 //ost << "\\clearpage" << endl;
2535 //pts_on_lines->print_table_tex(ost);
2536 ost << "\\noindent" << endl;
2537 if (pts_on_lines->nb_sets < 1000) {
2538 for (i = 0; i < pts_on_lines->nb_sets; i++) {
2539 ost << "Line " << i;
2540
2541 if (SO->nb_lines == 27) {
2542 ost << " = "
2543 "$" << SO->Surf->Schlaefli->Labels->Line_label_tex[i]
2544 << "$ " << endl;
2545 }
2546
2547 ost << "has " << pts_on_lines->Set_size[i]
2548 << " points: $\\{ P_{i} \\mid i \\in ";
2551 ost << "\\}$\\\\" << endl;
2552 }
2553 }
2554 else {
2555 ost << "Too many to print.\\\\" << endl;
2556 }
2557
2558 //ost << "\\clearpage" << endl;
2559}
2560
2562{
2564 int i;
2565 int v[4];
2566
2567 //ost << "\\clearpage" << endl;
2568 ost << "The surface has " << nb_pts_not_on_lines
2569 << " points not on any line:\\\\" << endl;
2570 if (nb_pts_not_on_lines < 1000) {
2571#if 0
2572 ost << "$$" << endl;
2575 TRUE /* f_tex */);
2576 //print_integer_matrix_with_standard_labels(ost, Pts3,
2577 //(nb_pts_not_on_lines + 9) / 10, 10, TRUE /* f_tex */);
2578 ost << "$$" << endl;
2579#endif
2580 //ost << "%%\\clearpage" << endl;
2581 ost << "The points on the surface but not "
2582 "on lines are:\\\\" << endl;
2583 ost << "\\begin{multicols}{2}" << endl;
2584 ost << "\\noindent" << endl;
2585 for (i = 0; i < nb_pts_not_on_lines; i++) {
2587 ost << i << " : $P_{" << Pts_not_on_lines[i] << "}=";
2588 Int_vec_print_fully(ost, v, 4);
2589 ost << "$\\\\" << endl;
2590 }
2591 ost << "\\end{multicols}" << endl;
2592 }
2593 else {
2594 ost << "Too many to print.\\\\" << endl;
2595 }
2596}
2597
2599{
2600 //int i, j, a;
2601 //latex_interface L;
2602
2603 ost << "\\bigskip" << endl;
2604
2605 ost << "\\subsection*{Double sixes}" << endl;
2606
2608
2609
2610}
2611
2613{
2614 //int h, i, j, a;
2615 //latex_interface L;
2616
2617
2618 ost << "\\bigskip" << endl;
2619
2620 ost << "\\subsection*{Half Double sixes}" << endl;
2621
2623
2624
2625 //ost << "\\clearpage" << endl;
2626
2627}
2628
2630{
2632
2633 ost << "The half double sixes are:\\\\" << endl;
2634 ost << "$$" << endl;
2636 SO->Surf->Schlaefli->Half_double_sixes, 36, 6, TRUE /* f_tex */);
2637 ost << "$$" << endl;
2638 ost << "$$" << endl;
2640 SO->Surf->Schlaefli->Half_double_sixes + 36 * 6,
2641 36, 6, 36, 0, TRUE /* f_tex */);
2642 ost << "$$" << endl;
2643}
2644
2646{
2647
2649
2650 SO->Surf->Schlaefli->latex_triads(ost);
2651}
2652
2654{
2656
2657 //ost << "\\clearpage" << endl;
2658 ost << "\\subsection*{Trihedral pairs}" << endl;
2659 ost << "The planes in the trihedral pairs in Eckardt "
2660 "point labeling are:\\\\" << endl;
2661 ost << "$$" << endl;
2663 SO->Surf->Schlaefli->Trihedral_to_Eckardt, 40, 6, TRUE /* f_tex */);
2664 ost << "$$" << endl;
2665 ost << "$$" << endl;
2667 SO->Surf->Schlaefli->Trihedral_to_Eckardt + 40 * 6, 40, 6, 40, 0, TRUE /* f_tex */);
2668 ost << "$$" << endl;
2669 ost << "$$" << endl;
2671 SO->Surf->Schlaefli->Trihedral_to_Eckardt + 80 * 6, 40, 6, 80, 0, TRUE /* f_tex */);
2672 ost << "$$" << endl;
2673}
2674
2675
2676
2677
2679 std::ostream &ost, int *T, int nb_T)
2680{
2681 int t_idx, t;
2682
2683 //ost << "\\clearpage" << endl;
2684 ost << "\\subsection*{Trihedral Pairs and the Clebsch System}" << endl;
2685
2686 for (t = 0; t < nb_T; t++) {
2687
2688 t_idx = T[t];
2689
2690
2691 int F_planes[12];
2692 int G_planes[12];
2693 int lambda;
2694 int equation[20];
2695 int *system;
2696
2698 F_planes, G_planes, lambda, equation,
2699 0 /* verbose_level */);
2700
2701#if 0
2702 if (t_idx == 71) {
2703 int_vec_swap(F_planes, F_planes + 8, 4);
2704 }
2705#endif
2706
2707 SO->Surf->prepare_system_from_FG(F_planes, G_planes,
2708 lambda, system, 0 /*verbose_level*/);
2709
2710
2711 ost << "$" << t << " / " << nb_T << "$ ";
2712 ost << "$T_{" << t_idx << "} = T_{"
2714 << "} = \\\\" << endl;
2715 latex_trihedral_pair(ost, t_idx);
2716 ost << "$\\\\" << endl;
2717 ost << "$";
2719 F_planes, G_planes, lambda);
2720 ost << "$\\\\" << endl;
2721 //ost << "$";
2722 SO->Surf->print_system(ost, system);
2723 //ost << "$\\\\" << endl;
2724 FREE_int(system);
2725
2726
2727 }
2728}
2729
2730
2732 int *T, int nb_T)
2733{
2734 int h, i, j, t_idx;
2735
2736 cout << "surface_object_properties::latex_table_of_trihedral_pairs" << endl;
2737 //ost << "\\clearpage" << endl;
2738 ost << "\\subsection*{Trihedral Pairs}" << endl;
2739 //ost << "\\begin{multicols}{2}" << endl;
2740 ost << "\\noindent" << endl;
2741 for (h = 0; h < nb_T; h++) {
2742 ost << "$" << h << " / " << nb_T << "$ ";
2743 t_idx = T[h];
2744 ost << "$T_{" << t_idx << "} = T_{"
2746 << "} = \\\\" << endl;
2747 latex_trihedral_pair(ost, t_idx);
2748 ost << "$\\\\" << endl;
2749 ost << "$";
2751 ost << "$\\\\" << endl;
2752 }
2753 ost << "Dual point ranks: \\\\" << endl;
2754 for (i = 0; i < SO->Surf->Schlaefli->nb_trihedral_pairs; i++) {
2755 ost << "$T_{" << i << "} = T_{"
2757 << "}: \\quad " << endl;
2758 for (j = 0; j < 6; j++) {
2759 ost << Dual_point_ranks[i * 6 + j];
2760 if (j < 6 - 1) {
2761 ost << ", ";
2762 }
2763 }
2764 ost << "$\\\\" << endl;
2765 }
2766
2767
2768#if 0
2769 ost << "Planes by generator matrix: \\\\" << endl;;
2770 for (i = 0; i < Surf->nb_trihedral_pairs; i++) {
2771 ost << "$T_{" << i << "} = T_{"
2772 << Surf->Trihedral_pair_labels[i] << "}$" << endl;
2773 for (j = 0; j < 6; j++) {
2774 int d;
2775
2776 d = All_Planes[i * 6 + j];
2777 ost << "Plane " << j << " has rank " << d << "\\\\" << endl;
2778 Surf->Gr3->unrank_int(d, 0 /* verbose_level */);
2779 ost << "$";
2780 ost << "\\left[";
2781 print_integer_matrix_tex(ost, Surf->Gr3->M, 3, 4);
2782 ost << "\\right]";
2783 ost << "$\\\\" << endl;
2784 }
2785 }
2786#endif
2787 //ost << "\\end{multicols}" << endl;
2788 cout << "surface_object_properties::latex_table_of_trihedral_pairs done" << endl;
2789}
2790
2791void surface_object_properties::latex_trihedral_pair(std::ostream &ost, int t_idx)
2792{
2793 int i, j, e, a;
2794
2795 //ost << "\\left[" << endl;
2796 ost << "\\begin{array}{c||ccc|cc}" << endl;
2797 ost << " & G_0 & G_1 & G_2 & \\mbox{plane} & "
2798 "\\mbox{dual rank} \\\\" << endl;
2799 ost << "\\hline" << endl;
2800 ost << "\\hline" << endl;
2801 for (i = 0; i < 3; i++) {
2802 ost << "F_" << i;
2803 for (j = 0; j < 3; j++) {
2804 a = SO->Surf->Schlaefli->Trihedral_pairs[t_idx * 9 + i * 3 + j];
2805 ost << " & {" << SO->Surf->Schlaefli->Labels->Line_label_tex[a] << "=\\atop";
2806 ost << "\\left[" << endl;
2808 ost << "\\right]}" << endl;
2809 }
2810 e = SO->Surf->Schlaefli->Trihedral_to_Eckardt[t_idx * 6 + i];
2811 ost << " & {\\pi_{" << e << "} =\\atop";
2812#if 0
2813 t = Eckardt_to_Tritangent_plane[e];
2814 a = Tritangent_planes[t];
2815#else
2816 a = Tritangent_plane_rk[e];
2817#endif
2818 ost << "\\left[" << endl;
2820 ost << "\\right]}" << endl;
2821 ost << " & ";
2822 a = Dual_point_ranks[t_idx * 6 + i];
2823 ost << a << "\\\\" << endl;
2824 }
2825 ost << "\\hline" << endl;
2826 for (j = 0; j < 3; j++) {
2827 e = SO->Surf->Schlaefli->Trihedral_to_Eckardt[t_idx * 6 + 3 + j];
2828 ost << " & {\\pi_{" << e << "} =\\atop";
2829#if 0
2830 t = Eckardt_to_Tritangent_plane[e];
2831 a = Tritangent_planes[t];
2832#else
2833 a = Tritangent_plane_rk[e];
2834#endif
2835 ost << "\\left[" << endl;
2837 ost << "\\right]}" << endl;
2838 }
2839 ost << " & & \\\\" << endl;
2840 for (j = 0; j < 3; j++) {
2841 a = Dual_point_ranks[t_idx * 6 + 3 + j];
2842 ost << " & " << a;
2843 }
2844 ost << " & & \\\\" << endl;
2845 //Surf->latex_trihedral_pair(ost, Surf->Trihedral_pairs + h * 9);
2846 ost << "\\end{array}" << endl;
2847 //ost << "\\right]" << endl;
2848}
2849
2851 int *F_planes, int *G_planes, int &lambda, int *equation,
2852 int verbose_level)
2853{
2854 int f_v = (verbose_level >= 1);
2855 int i, c, h;
2856 int row_col_Eckardt_points[6];
2857 int plane_rk[6];
2858 //int plane_idx[6];
2859
2860 if (f_v) {
2861 cout << "surface_object_properties::make_equation_in_trihedral_form t_idx=" << t_idx << endl;
2862 }
2863
2864 if (f_v) {
2865 cout << "Trihedral pair T_{"
2866 << SO->Surf->Schlaefli->Trihedral_pair_labels[t_idx] << "}"
2867 << endl;
2868 }
2869
2870 for (h = 0; h < 6; h++) {
2871 row_col_Eckardt_points[h] = SO->Surf->Schlaefli->Trihedral_to_Eckardt[t_idx * 6 + h];
2872 }
2873 //int_vec_copy(Surf->Trihedral_to_Eckardt + t_idx * 6, row_col_Eckardt_points, 6);
2874 for (i = 0; i < 6; i++) {
2875 //plane_idx[i] = Eckardt_to_Tritangent_plane[row_col_Eckardt_points[i]];
2876 //plane_rk[i] = Tritangent_planes[plane_idx[i]];
2877 plane_rk[i] = Tritangent_plane_rk[row_col_Eckardt_points[i]];
2878 }
2879 for (i = 0; i < 3; i++) {
2881 plane_rk[i], 0 /* verbose_level */);
2882 //c = Tritangent_plane_dual[plane_idx[i]];
2883 SO->F->PG_element_unrank_modified(F_planes + i * 4, 1, 4, c);
2884 }
2885 for (i = 0; i < 3; i++) {
2887 plane_rk[3 + i], 0 /* verbose_level */);
2888 //c = Tritangent_plane_dual[plane_idx[3 + i]];
2889 SO->F->PG_element_unrank_modified(G_planes + i * 4, 1, 4, c);
2890 }
2891 int evals[6];
2892 int pt_on_surface[4];
2893 int a, b, ma, bv, pt;
2894 int eqn_F[20];
2895 int eqn_G[20];
2896 int eqn_G2[20];
2897
2898 for (h = 0; h < SO->nb_pts; h++) {
2899 pt = SO->Pts[h];
2900 SO->F->PG_element_unrank_modified(pt_on_surface, 1, 4, pt);
2901 for (i = 0; i < 3; i++) {
2902 evals[i] = SO->Surf->Poly1_4->evaluate_at_a_point(F_planes + i * 4, pt_on_surface);
2903 }
2904 for (i = 0; i < 3; i++) {
2905 evals[3 + i] = SO->Surf->Poly1_4->evaluate_at_a_point(
2906 G_planes + i * 4, pt_on_surface);
2907 }
2908 a = SO->F->mult3(evals[0], evals[1], evals[2]);
2909 b = SO->F->mult3(evals[3], evals[4], evals[5]);
2910 if (b) {
2911 ma = SO->F->negate(a);
2912 bv = SO->F->inverse(b);
2913 lambda = SO->F->mult(ma, bv);
2914 break;
2915 }
2916 }
2917 if (h == SO->nb_pts) {
2918 cout << "surface_object_properties::make_equation_in_trihedral_form could "
2919 "not determine lambda" << endl;
2920 exit(1);
2921 }
2922
2924 F_planes + 4, F_planes + 8,
2925 eqn_F, FALSE /* verbose_level */);
2927 G_planes + 4, G_planes + 8,
2928 eqn_G, FALSE /* verbose_level */);
2929
2930 Int_vec_copy(eqn_G, eqn_G2, 20);
2931 SO->F->Linear_algebra->scalar_multiply_vector_in_place(lambda, eqn_G2, 20);
2932 SO->F->Linear_algebra->add_vector(eqn_F, eqn_G2, equation, 20);
2934
2935
2936
2937 if (f_v) {
2938 cout << "surface_object_properties::make_equation_in_trihedral_form done" << endl;
2939 }
2940}
2941
2943 int *F_planes, int *G_planes, int lambda)
2944{
2945
2946 ost << "\\begin{align*}" << endl;
2947 ost << "0 & = F_0F_1F_2 + \\lambda G_0G_1G_2\\\\" << endl;
2948 ost << "& = " << endl;
2949
2950 print_equation_in_trihedral_form_equation_only(ost, F_planes, G_planes, lambda);
2951}
2952
2954 std::ostream &ost,
2955 int *F_planes, int *G_planes, int lambda)
2956{
2957
2958 ost << "\\Big(";
2959 SO->Surf->Poly1_4->print_equation(ost, F_planes);
2960 ost << "\\Big)";
2961 ost << "\\Big(";
2962 SO->Surf->Poly1_4->print_equation(ost, F_planes + 4);
2963 ost << "\\Big)";
2964 ost << "\\Big(";
2965 SO->Surf->Poly1_4->print_equation(ost, F_planes + 8);
2966 ost << "\\Big)";
2967 ost << "+ " << lambda;
2968 ost << "\\Big(";
2969 SO->Surf->Poly1_4->print_equation(ost, G_planes);
2970 ost << "\\Big)";
2971 ost << "\\Big(";
2972 SO->Surf->Poly1_4->print_equation(ost, G_planes + 4);
2973 ost << "\\Big)";
2974 ost << "\\Big(";
2975 SO->Surf->Poly1_4->print_equation(ost, G_planes + 8);
2976 ost << "\\Big)";
2977}
2978
2980 std::ostream &ost, int t_idx)
2981{
2982 int F_planes[12];
2983 int G_planes[12];
2984 int lambda;
2985 int equation[20];
2986 //int *system;
2987
2988 make_equation_in_trihedral_form(t_idx, F_planes, G_planes,
2989 lambda, equation, 0 /* verbose_level */);
2991 F_planes, G_planes, lambda);
2992 //FREE_int(system);
2993}
2994
2996 int line_a, int line_b, int verbose_level)
2997{
2998 int f_v = (verbose_level >= 1);
2999 int i;
3000
3001 if (f_v) {
3002 cout << "surface_object_properties::compute_transversal_line" << endl;
3003 }
3004 if (SO->nb_lines != 27) {
3005 cout << "surface_object_properties::compute_transversal_line SO->nb_lines != 27" << endl;
3006 exit(1);
3007 }
3008 for (i = 0; i < 27; i++) {
3009 if (i == line_a) {
3010 continue;
3011 }
3012 if (i == line_b) {
3013 continue;
3014 }
3015 if (Adj_line_intersection_graph[i * 27 + line_a] &&
3016 Adj_line_intersection_graph[i * 27 + line_b]) {
3017 break;
3018 }
3019 }
3020 if (i == 27) {
3021 cout << "surface_object_properties::compute_transversal_line "
3022 "did not find transversal line" << endl;
3023 exit(1);
3024 }
3025 if (f_v) {
3026 cout << "surface_object_properties::compute_transversal_line "
3027 "done" << endl;
3028 }
3029 return i;
3030}
3031
3033 int line_a, int line_b, int *transversals5,
3034 int verbose_level)
3035{
3036 int f_v = (verbose_level >= 1);
3037 int i;
3038 int nb_trans = 0;
3039
3040 if (f_v) {
3041 cout << "surface_object_properties::compute_transversal_lines" << endl;
3042 }
3043 if (SO->nb_lines != 27) {
3044 cout << "surface_object_properties::compute_transversal_lines SO->nb_lines != 27" << endl;
3045 exit(1);
3046 }
3047 for (i = 0; i < 27; i++) {
3048 if (i == line_a) {
3049 continue;
3050 }
3051 if (i == line_b) {
3052 continue;
3053 }
3054 if (Adj_line_intersection_graph[i * 27 + line_a] &&
3055 Adj_line_intersection_graph[i * 27 + line_b]) {
3056 transversals5[nb_trans++] = i;
3057 }
3058 }
3059 if (nb_trans != 5) {
3060 cout << "surface_object_properties::compute_transversal_lines "
3061 "nb_trans != 5" << endl;
3062 exit(1);
3063 }
3064 if (f_v) {
3065 cout << "surface_object_properties::compute_transversal_lines "
3066 "done" << endl;
3067 }
3068}
3069
3070
3071
3072
3074 long int *Clebsch_map, int *Clebsch_coeff)
3075{
3076 long int i, j, a;
3077 int v[4];
3078 int w[3];
3079
3080 ost << "$$";
3081 ost << "\\begin{array}{|c|c|c|c|c|}" << endl;
3082 ost << "\\hline" << endl;
3083 ost << "i & P_i & \\mbox{lines} & \\Phi(P_i) & \\Phi(P_i)\\\\" << endl;
3084 ost << "\\hline" << endl;
3085 for (i = 0; i < SO->nb_pts; i++) {
3086 ost << i;
3087 ost << " & ";
3088 a = SO->Pts[i];
3089 SO->Surf->unrank_point(v, a);
3090 Int_vec_print(ost, v, 4);
3091 ost << " & ";
3092
3093 for (j = 0; j < lines_on_point->Set_size[i]; j++) {
3094 a = lines_on_point->Sets[i][j];
3095 ost << SO->Surf->Schlaefli->Labels->Line_label_tex[a];
3096 if (j < lines_on_point->Set_size[i] - 1) {
3097 ost << ", ";
3098 }
3099 }
3100 ost << " & ";
3101
3102
3103 if (Clebsch_map[i] >= 0) {
3104 Int_vec_print(ost, Clebsch_coeff + i * 4, 4);
3105 }
3106 else {
3107 ost << "\\mbox{undef}";
3108 }
3109 ost << " & ";
3110 if (Clebsch_map[i] >= 0) {
3111 SO->Surf->P2->unrank_point(w, Clebsch_map[i]);
3112 Int_vec_print(ost, w, 3);
3113 }
3114 else {
3115 ost << "\\mbox{undef}";
3116 }
3117 ost << "\\\\" << endl;
3118 if (((i + 1) % 30) == 0) {
3119 ost << "\\hline" << endl;
3120 ost << "\\end{array}" << endl;
3121 ost << "$$" << endl;
3122 ost << "$$";
3123 ost << "\\begin{array}{|c|c|c|c|c|}" << endl;
3124 ost << "\\hline" << endl;
3125 ost << "i & P_i & \\mbox{lines} & \\Phi(P_i) & "
3126 "\\Phi(P_i)\\\\" << endl;
3127 ost << "\\hline" << endl;
3128 }
3129 }
3130 ost << "\\hline" << endl;
3131 ost << "\\end{array}" << endl;
3132 ost << "$$" << endl;
3133}
3134
3135
3137{
3138#if 0
3139 ost << "\\clearpage" << endl << endl;
3140 ost << "\\section*{Eckardt Points}" << endl;
3141 latex_table_of_Eckardt_points(ost);
3142
3143 ost << "\\clearpage" << endl << endl;
3144 ost << "\\section*{Tritangent Planes}" << endl;
3145 latex_table_of_tritangent_planes(ost);
3146#endif
3147
3148 ost << "\\clearpage" << endl << endl;
3149 ost << "\\section*{Steiner Trihedral Pairs}" << endl;
3151
3152}
3153
3155{
3156 int i;
3157
3158 cout << "surface_object_properties::latex_table_of_trihedral_pairs" << endl;
3159 //ost << "\\begin{multicols}{2}" << endl;
3160 for (i = 0; i < SO->Surf->Schlaefli->nb_trihedral_pairs; i++) {
3161 ost << "$T_{" << i << "} = T_{"
3163 << "} = $\\\\" << endl;
3164 ost << "$" << endl;
3165 //ost << "\\left[" << endl;
3166 //ost << "\\begin{array}" << endl;
3168 SO->Surf->Schlaefli->Trihedral_pairs + i * 9,
3170 //ost << "\\end{array}" << endl;
3171 //ost << "\\right]" << endl;
3172 ost << "$\\\\" << endl;
3173#if 0
3174 ost << "planes: $";
3175 int_vec_print(ost, Trihedral_to_Eckardt + i * 6, 6);
3176 ost << "$\\\\" << endl;
3177#endif
3178 }
3179 //ost << "\\end{multicols}" << endl;
3180
3181 //print_trihedral_pairs(ost);
3182
3183 cout << "surface_object_properties::latex_table_of_trihedral_pairs done" << endl;
3184}
3185
3186void surface_object_properties::latex_trihedral_pair(std::ostream &ost, int *T, long int *TE)
3187{
3188 int i, j, plane_rk;
3189 int Mtx[16];
3190
3191 ost << "\\begin{array}{*{" << 3 << "}{c}|c}" << endl;
3192 for (i = 0; i < 3; i++) {
3193 for (j = 0; j < 3; j++) {
3194 SO->Surf->Schlaefli->print_line(ost, T[i * 3 + j]);
3195 ost << " & ";
3196 }
3197 ost << "\\pi_{";
3199 ost << "}=" << endl;
3200#if 0
3201 t = Eckardt_to_Tritangent_plane[TE[i]];
3202 plane_rk = Tritangent_planes[t];
3203#else
3204 plane_rk = Tritangent_plane_rk[TE[i]];
3205#endif
3207 0 /*verbose_level */);
3208 SO->F->PG_element_normalize(Mtx + 12, 1, 4);
3209 ost << "V\\big(";
3210 SO->Surf->Poly1_4->print_equation(ost, Mtx + 12);
3211 ost << "\\big)=" << plane_rk;
3212 ost << "\\\\" << endl;
3213 }
3214 ost << "\\hline" << endl;
3215 for (j = 0; j < 3; j++) {
3216 ost << "\\pi_{";
3217 SO->Surf->Schlaefli->Eckardt_points[TE[3 + j]].latex_index_only(ost);
3218 ost << "} & ";
3219 }
3220 ost << "\\\\" << endl;
3221 for (j = 0; j < 3; j++) {
3222 ost << "\\multicolumn{4}{l}{" << endl;
3223#if 0
3224 t = Eckardt_to_Tritangent_plane[TE[3 + j]];
3225 plane_rk = Tritangent_planes[t];
3226#else
3227 plane_rk = Tritangent_plane_rk[TE[i]];
3228#endif
3229 ost << "\\pi_{";
3230 SO->Surf->Schlaefli->Eckardt_points[TE[3 + j]].latex_index_only(ost);
3231 ost << "}=" << endl;
3232 ost << "V\\big(" << endl;
3234 0 /*verbose_level */);
3235 SO->F->PG_element_normalize(Mtx + 12, 1, 4);
3236 SO->Surf->Poly1_4->print_equation(ost, Mtx + 12);
3237 ost << "\\big)=" << plane_rk << "}\\\\" << endl;
3238 }
3239 ost << "\\\\" << endl;
3240 ost << "\\end{array}" << endl;
3241}
3242
3244// P_idx = index into SO->Pts[]
3245{
3246 int f_v = (verbose_level >= 1);
3247 int f_vv = FALSE;
3248 int i, idx;
3249 long int P, R, Q;
3250 int Basis_of_PR[8];
3251
3252 if (f_v) {
3253 cout << "surface_object_properties::compute_reduced_set_of_points_not_on_lines_wrt_P" << endl;
3254 }
3255 f_deleted = NEW_int(nb_pts_not_on_lines);
3257
3258 P = SO->Pts[P_idx];
3259 for (i = 0; i < nb_pts_not_on_lines; i++) {
3260 R = Pts_not_on_lines[i];
3261 if (R == P) {
3262 continue;
3263 }
3264 SO->Surf->unrank_point(Basis_of_PR, P);
3265 SO->Surf->unrank_point(Basis_of_PR + 4, R);
3266
3267 int v[2];
3268 int w[4];
3269 int j;
3270
3271 for (j = 0; j < SO->F->q + 1; j++) {
3272 SO->F->PG_element_unrank_modified(v, 1, 2, j);
3273 if (f_vv) {
3274 cout << "surface_object_properties::compute_reduced_set_of_points_not_on_lines_wrt_P v=" << endl;
3275 Int_vec_print(cout, v, 2);
3276 cout << endl;
3277 }
3278
3279 SO->F->Linear_algebra->mult_matrix_matrix(v, Basis_of_PR, w, 1, 2, 4,
3280 0 /* verbose_level */);
3281 if (f_vv) {
3282 cout << "surface_object_properties::compute_reduced_set_of_points_not_on_lines_wrt_P w=" << endl;
3283 Int_vec_print(cout, w, 4);
3284 cout << endl;
3285 }
3286
3287 Q = SO->Surf->rank_point(w);
3288
3289 if (SO->find_point(Q, idx)) {
3290 f_deleted[i] = TRUE;
3291 }
3292
3293 }
3294
3295
3296 }
3297
3298 if (f_v) {
3299 cout << "surface_object_properties::compute_reduced_set_of_points_not_on_lines_wrt_P done" << endl;
3300 }
3301}
3302
3303
3304int surface_object_properties::test_full_del_pezzo(int P_idx, int *f_deleted, int verbose_level)
3305{
3306 int f_v = (verbose_level >= 1);
3307 int i;
3308 long int P, R, rk_tangent_plane;
3309 int Basis[4 * 4];
3310
3311 if (f_v) {
3312 cout << "surface_object_properties::test_full_del_pezzo" << endl;
3313 }
3314
3315 P = SO->Pts[P_idx];
3316 rk_tangent_plane = tangent_plane_rank_global[P_idx];
3317
3319 rk_tangent_plane, 0 /* verbose_level*/);
3320
3321
3322 for (i = 0; i < nb_pts_not_on_lines; i++) {
3323 R = Pts_not_on_lines[i];
3324 if (R == P) {
3325 continue;
3326 }
3327 if (f_deleted[i]) {
3328 continue;
3329 }
3330 int rk;
3331
3332 if (f_v) {
3333 cout << "projective_space::dual_rank_of_plane_in_three_space" << endl;
3334 }
3335 SO->Surf->P->unrank_plane(Basis, rk_tangent_plane);
3336 SO->Surf->unrank_point(Basis + 12, R);
3337 rk = SO->F->Linear_algebra->Gauss_easy(Basis, 4, 4);
3338 if (rk != 3) {
3339 return FALSE;
3340 }
3341 }
3342
3343 if (f_v) {
3344 cout << "surface_object_properties::test_full_del_pezzo done" << endl;
3345 }
3346 return TRUE;
3347}
3348
3349
3351 std::string &surface_label, std::string &col_postfix, int verbose_level)
3352{
3353 string col_lab_surface_label;
3354 string col_lab_nb_lines;
3355 string col_lab_nb_points;
3356 string col_lab_nb_singular_points;
3357 string col_lab_nb_Eckardt_points;
3358 string col_lab_nb_double_points;
3359 string col_lab_nb_Single_points;
3360 string col_lab_nb_pts_not_on_lines;
3361 string col_lab_nb_Hesse_planes;
3362 string col_lab_nb_axes;
3363
3364
3365 col_lab_surface_label.assign("Surface");
3366
3367
3368 col_lab_nb_lines.assign("#L");
3369 col_lab_nb_lines.append(col_postfix);
3370
3371 col_lab_nb_points.assign("#P");
3372 col_lab_nb_points.append(col_postfix);
3373
3374 col_lab_nb_singular_points.assign("#S");
3375 col_lab_nb_singular_points.append(col_postfix);
3376
3377 col_lab_nb_Eckardt_points.assign("#E");
3378 col_lab_nb_Eckardt_points.append(col_postfix);
3379
3380 col_lab_nb_double_points.assign("#D");
3381 col_lab_nb_double_points.append(col_postfix);
3382
3383 col_lab_nb_Single_points.assign("#U");
3384 col_lab_nb_Single_points.append(col_postfix);
3385
3386 col_lab_nb_pts_not_on_lines.assign("#OFF");
3387 col_lab_nb_pts_not_on_lines.append(col_postfix);
3388
3389 col_lab_nb_Hesse_planes.assign("#H");
3390 col_lab_nb_Hesse_planes.append(col_postfix);
3391
3392 col_lab_nb_axes.assign("#AX");
3393 col_lab_nb_axes.append(col_postfix);
3394
3395#if 0
3396 SO->nb_lines;
3397
3398 SO->nb_pts;
3399
3401
3403
3405
3407
3409
3411
3412 nb_axes;
3413#endif
3414
3415
3417
3418 {
3419 ofstream f(fname);
3420
3421 f << col_lab_surface_label << ",";
3422 f << col_lab_nb_lines << ",";
3423 f << col_lab_nb_points << ",";
3424 f << col_lab_nb_singular_points << ",";
3425 f << col_lab_nb_Eckardt_points << ",";
3426 f << col_lab_nb_double_points << ",";
3427 f << col_lab_nb_Single_points << ",";
3428 f << col_lab_nb_pts_not_on_lines << ",";
3429 f << col_lab_nb_Hesse_planes << ",";
3430 f << col_lab_nb_axes << ",";
3431 f << endl;
3432
3433 f << surface_label << ",";
3434 f << SO->nb_lines << ",";
3435 f << SO->nb_pts << ",";
3436 f << nb_singular_pts << ",";
3437 f << nb_Eckardt_points << ",";
3438 f << nb_Double_points << ",";
3439 f << nb_Single_points << ",";
3440 f << nb_pts_not_on_lines << ",";
3441 f << nb_Hesse_planes << ",";
3442 f << nb_axes << ",";
3443 f << endl;
3444
3445 f << "END" << endl;
3446 }
3447 cout << "Written file " << fname << " of size " << Fio.file_size(fname) << endl;
3448
3449
3450}
3451
3452
3453}}}
3454
void three_lines(surface_domain *S, int *three_lines)
int identify_Eckardt_point(int line1, int line2, int line3, int verbose_level)
Definition: schlaefli.cpp:2637
void prepare_system_from_FG(int *F_planes, int *G_planes, int lambda, int *&system, int verbose_level)
void compute_points_on_lines(long int *Pts_on_surface, int nb_points_on_surface, long int *Lines, int nb_lines, data_structures::set_of_sets *&pts_on_lines, int *&f_is_on_line, int verbose_level)
void compute_intersection_points_and_indices(int *Adj, long int *Points, int nb_points, long int *Lines, int nb_lines, int *&Intersection_pt, int *&Intersection_pt_idx, int verbose_level)
ring_theory::homogeneous_polynomial_domain * Poly1_4
void multiply_linear_times_linear_times_linear_in_space(int *four_coeff1, int *four_coeff2, int *four_coeff3, int *twenty_coeff, int verbose_level)
void Trihedral_pairs_to_planes(long int *Lines, long int *Planes_by_rank, int verbose_level)
ring_theory::homogeneous_polynomial_domain * Poly3_4
void compute_gradient(int *equation20, int *&gradient, int verbose_level)
void print_equation_with_line_breaks_tex(std::ostream &ost, int *coeffs)
ring_theory::homogeneous_polynomial_domain * Poly2_4
void compute_adjacency_matrix_of_line_intersection_graph(int *&Adj, long int *S, int n, int verbose_level)
Given a set of lines in S[n], compute the associated line intersection graph.
void print_lines_tex(std::ostream &ost, long int *Lines, int nb_lines)
void compute_reduced_set_of_points_not_on_lines_wrt_P(int P_idx, int *&f_deleted, int verbose_level)
void clebsch_map_latex(std::ostream &ost, long int *Clebsch_map, int *Clebsch_coeff)
void compute_transversal_lines(int line_a, int line_b, int *transversals5, int verbose_level)
void create_summary_file(std::string &fname, std::string &surface_label, std::string &col_postfix, int verbose_level)
void make_equation_in_trihedral_form(int t_idx, int *F_planes, int *G_planes, int &lambda, int *equation, int verbose_level)
void print_equation_in_trihedral_form(std::ostream &ost, int *F_planes, int *G_planes, int lambda)
void print_equation_in_trihedral_form_equation_only(std::ostream &ost, int *F_planes, int *G_planes, int lambda)
a particular cubic surface in PG(3,q), given by its equation
void apply_lint(int *from, long int *through, long int *to, int len)
Definition: int_vec.cpp:57
void init_from_adjacency_matrix(int n, int *Adj, int verbose_level)
Definition: set_of_sets.cpp:87
void dualize(set_of_sets *&S, int verbose_level)
a collection of functions related to sorted vectors
int lint_vec_search_linear(long int *v, int len, long int a, int &idx)
Definition: sorting.cpp:699
void lint_vec_sort_and_remove_duplicates(long int *v, int &len)
Definition: sorting.cpp:195
int lint_vec_search(long int *v, int len, long int a, int &idx, int verbose_level)
Definition: sorting.cpp:1157
a statistical analysis of data consisting of single integers
void init(int *data, int data_length, int f_second, int verbose_level)
Definition: tally.cpp:72
void init_lint(long int *data, int data_length, int f_second, int verbose_level)
Definition: tally.cpp:123
void print_naked_tex(std::ostream &ost, int f_backwards)
Definition: tally.cpp:413
void get_class_by_value(int *&Pts, int &nb_pts, int value, int verbose_level)
Definition: tally.cpp:644
void PG_element_unrank_modified(int *v, int stride, int len, int a)
void PG_element_rank_modified_lint(int *v, int stride, int len, long int &a)
void unrank_lint(long int rk, int verbose_level)
Definition: grassmann.cpp:343
void unrank_lint_here_and_compute_perp(int *Mtx, long int rk, int verbose_level)
Definition: grassmann.cpp:979
void print_set_tex(std::ostream &ost, long int *v, int len)
Definition: grassmann.cpp:157
long int rank_lint_here(int *Mtx, int verbose_level)
Definition: grassmann.cpp:275
void print_single_generator_matrix_tex_numerical(std::ostream &ost, long int a)
Definition: grassmann.cpp:135
void unrank_lint_here(int *Mtx, long int rk, int verbose_level)
Definition: grassmann.cpp:269
void print_single_generator_matrix_tex(std::ostream &ost, long int a)
Definition: grassmann.cpp:122
void plane_intersection_type_basic(long int *set, int set_size, int *type, int verbose_level)
void planes_through_a_line(long int line_rk, std::vector< long int > &plane_ranks, int verbose_level)
void point_plane_incidence_matrix(long int *point_rks, int nb_points, long int *plane_rks, int nb_planes, int *&M, int verbose_level)
long int plane_rank_using_dual_coordinates_in_three_space(int *eqn4, int verbose_level)
void line_intersection_type_collected(long int *set, int set_size, int *type_collected, int verbose_level)
long int dual_rank_of_plane_in_three_space(long int plane_rank, int verbose_level)
void mult_matrix_matrix(int *A, int *B, int *C, int m, int n, int o, int verbose_level)
int Gauss_simple(int *A, int m, int n, int *base_cols, int verbose_level)
void print_lint_matrix_with_standard_labels(std::ostream &ost, long int *p, int m, int n, int f_tex)
void print_lint_matrix_with_standard_labels_and_offset(std::ostream &ost, long int *p, int m, int n, int m_offset, int n_offset, int f_tex)
void lint_vec_print_as_matrix(std::ostream &ost, long int *v, int len, int width, int f_tex)
void print_integer_matrix_tex(std::ostream &ost, int *p, int m, int n)
void lint_set_print_tex(std::ostream &ost, long int *v, int len)
void print_integer_matrix_with_standard_labels(std::ostream &ost, int *p, int m, int n, int f_tex)
void print_integer_matrix_with_standard_labels_and_offset(std::ostream &ost, int *p, int m, int n, int m_offset, int n_offset, int f_tex)
void int_vec_print_as_matrix(std::ostream &ost, int *v, int len, int width, int f_tex)
void vanishing_ideal(long int *Pts, int nb_pts, int &r, int *Kernel, int verbose_level)
#define Lint_vec_copy(A, B, C)
Definition: foundations.h:694
#define FREE_int(p)
Definition: foundations.h:640
#define Int_vec_zero(A, B)
Definition: foundations.h:713
#define Int_vec_print_fully(A, B, C)
Definition: foundations.h:687
#define NEW_OBJECT(type)
Definition: foundations.h:638
#define Lint_vec_print(A, B, C)
Definition: foundations.h:686
#define FREE_OBJECT(p)
Definition: foundations.h:651
#define NEW_int(n)
Definition: foundations.h:625
#define TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
#define Int_vec_copy(A, B, C)
Definition: foundations.h:693
#define FREE_lint(p)
Definition: foundations.h:642
#define NEW_lint(n)
Definition: foundations.h:628
#define Int_vec_print(A, B, C)
Definition: foundations.h:685
#define Lint_vec_print_fully(A, B, C)
Definition: foundations.h:688
orbiter_kernel_system::orbiter_session * Orbiter
global Orbiter session
the orbiter library for the classification of combinatorial objects
#define MAX_NUMBER_OF_PLANES_FOR_PLANE_TYPE