Orbiter 2022
Combinatorial Objects
quartic_curve_object_properties.cpp
Go to the documentation of this file.
1/*
2 * quartic_curve_object_properties.cpp
3 *
4 * Created on: May 21, 2021
5 * Author: betten
6 */
7
8
9
10
11
12
13#include "foundations.h"
14
15
16using namespace std;
17
18
19
20namespace orbiter {
21namespace layer1_foundations {
22namespace algebraic_geometry {
23
24
26{
27 QO = NULL;
28 pts_on_lines = NULL;
29 f_is_on_line = NULL;
31 //line_type_distribution[3];
32 lines_on_point = NULL;
33 Point_type = NULL;
36 nb_Kovalevski = 0;
40 Kovalevski_points = NULL;
41 Pts_off = NULL;
42 nb_pts_off = 0;
43 pts_off_on_lines = NULL;
44 f_is_on_line2 = NULL;
46 Point_off_type = NULL;
47 gradient = NULL;
48
49 singular_pts = NULL;
50
53
56
57
58}
59
61{
62 if (pts_on_lines) {
64 }
65 if (f_is_on_line) {
67 }
70 }
71 if (lines_on_point) {
73 }
74 if (Point_type) {
76 }
79 }
82 }
83 if (Pts_off) {
85 }
86 if (pts_off_on_lines) {
88 }
89 if (f_is_on_line2) {
91 }
94 }
95 if (Point_off_type) {
97 }
98 if (gradient) {
100 }
101 if (singular_pts) {
103 }
104
107 }
110 }
111}
112
114{
115 int f_v = (verbose_level >= 1);
116
117 if (f_v) {
118 cout << "quartic_curve_object_properties::init" << endl;
119 }
121
122
123
124
125 if (QO->f_has_bitangents) {
126 if (f_v) {
127 cout << "quartic_curve_object_properties::init before points_on_curve_on_lines" << endl;
128 }
129 points_on_curve_on_lines(verbose_level);
130 if (f_v) {
131 cout << "quartic_curve_object_properties::init after points_on_curve_on_lines" << endl;
132 }
133 }
134
135
136 if (f_v) {
137 cout << "quartic_curve_object_properties::init before compute_singular_points_and_tangent_lines" << endl;
138 }
140 if (f_v) {
141 cout << "quartic_curve_object_properties::init after compute_singular_points_and_tangent_lines" << endl;
142 }
143
144 if (f_v) {
145 cout << "quartic_curve_object_properties::init done" << endl;
146 }
147}
148
149
151 std::string &surface_label, std::string &col_postfix, int verbose_level)
152{
153#if 0
154 string col_lab_surface_label;
155 string col_lab_nb_lines;
156 string col_lab_nb_points;
157 string col_lab_nb_singular_points;
158 string col_lab_nb_Eckardt_points;
159 string col_lab_nb_double_points;
160 string col_lab_nb_Single_points;
161 string col_lab_nb_pts_not_on_lines;
162 string col_lab_nb_Hesse_planes;
163 string col_lab_nb_axes;
164
165
166 col_lab_surface_label.assign("Surface");
167
168
169 col_lab_nb_lines.assign("#L");
170 col_lab_nb_lines.append(col_postfix);
171
172 col_lab_nb_points.assign("#P");
173 col_lab_nb_points.append(col_postfix);
174
175 col_lab_nb_singular_points.assign("#S");
176 col_lab_nb_singular_points.append(col_postfix);
177
178 col_lab_nb_Eckardt_points.assign("#E");
179 col_lab_nb_Eckardt_points.append(col_postfix);
180
181 col_lab_nb_double_points.assign("#D");
182 col_lab_nb_double_points.append(col_postfix);
183
184 col_lab_nb_Single_points.assign("#U");
185 col_lab_nb_Single_points.append(col_postfix);
186
187 col_lab_nb_pts_not_on_lines.assign("#OFF");
188 col_lab_nb_pts_not_on_lines.append(col_postfix);
189
190 col_lab_nb_Hesse_planes.assign("#H");
191 col_lab_nb_Hesse_planes.append(col_postfix);
192
193 col_lab_nb_axes.assign("#AX");
194 col_lab_nb_axes.append(col_postfix);
195
196#if 0
197 SO->nb_lines;
198
199 SO->nb_pts;
200
202
203 nb_Eckardt_points;
204
205 nb_Double_points;
206
207 nb_Single_points;
208
209 nb_pts_not_on_lines;
210
211 nb_Hesse_planes;
212
213 nb_axes;
214#endif
215
216
217 file_io Fio;
218
219 {
220 ofstream f(fname);
221
222 f << col_lab_surface_label << ",";
223 f << col_lab_nb_lines << ",";
224 f << col_lab_nb_points << ",";
225 f << col_lab_nb_singular_points << ",";
226 f << col_lab_nb_Eckardt_points << ",";
227 f << col_lab_nb_double_points << ",";
228 f << col_lab_nb_Single_points << ",";
229 f << col_lab_nb_pts_not_on_lines << ",";
230 f << col_lab_nb_Hesse_planes << ",";
231 f << col_lab_nb_axes << ",";
232 f << endl;
233
234 f << surface_label << ",";
235 f << SO->nb_lines << ",";
236 f << SO->nb_pts << ",";
237 f << nb_singular_pts << ",";
238 f << nb_Eckardt_points << ",";
239 f << nb_Double_points << ",";
240 f << nb_Single_points << ",";
241 f << nb_pts_not_on_lines << ",";
242 f << nb_Hesse_planes << ",";
243 f << nb_axes << ",";
244 f << endl;
245
246 f << "END" << endl;
247 }
248 cout << "Written file " << fname << " of size " << Fio.file_size(fname) << endl;
249#endif
250
251}
252
253void quartic_curve_object_properties::report_properties_simple(std::ostream &ost, int verbose_level)
254{
255 int f_v = (verbose_level >= 1);
256
257 if (f_v) {
258 cout << "quartic_curve_object_properties::report_properties_simple" << endl;
259 }
260
261
262 if (f_v) {
263 cout << "quartic_curve_object_properties::report_properties_simple before print_equation" << endl;
264 }
265 print_equation(ost);
266
267 if (f_v) {
268 cout << "quartic_curve_object_properties::report_properties_simple before print_gradient" << endl;
269 }
270 print_gradient(ost);
271
272 if (f_v) {
273 cout << "quartic_curve_object_properties::report_properties_simple before print_general" << endl;
274 }
275 print_general(ost);
276
277 if (f_v) {
278 cout << "quartic_curve_object_properties::report_properties_simple before print_points" << endl;
279 }
280 print_points(ost);
281
282
283
284 if (pts_on_lines) {
285 if (f_v) {
286 cout << "quartic_curve_object_properties::report_properties_simple before print_lines_with_points_on_them" << endl;
287 }
289 }
290 else {
291 if (f_v) {
292 cout << "quartic_curve_object_properties::report_properties_simple before print_bitangents" << endl;
293 }
294 print_bitangents(ost);
295 }
296
297 if (f_v) {
298 cout << "quartic_curve_object_properties::report_properties_simple before report_bitangent_line_type" << endl;
299 }
301
302 if (f_v) {
303 cout << "quartic_curve_object_properties::report_properties_simple done" << endl;
304 }
305}
306
308{
309 ost << "\\subsection*{The equation}" << endl;
310 ost << "The equation of the quartic curve ";
311 ost << " is :" << endl;
312
313 ost << "$$" << endl;
314 ost << "\\begin{array}{c}" << endl;
316 ost << "\\end{array}" << endl;
317 ost << "$$" << endl;
318
319 ost << "$$" << endl;
320 Int_vec_print(ost, QO->eqn15, 15);
321 ost << "$$" << endl;
322
323#if 0
324 long int rk;
325
327 ost << "The point rank of the equation over GF$(" << QO->F->q << ")$ is " << rk << "\\\\" << endl;
328#endif
329
330 //ost << "Number of points on the surface " << SO->nb_pts << "\\\\" << endl;
331
332
333}
334
336{
337 int i;
338
339 ost << "\\subsection*{The gradient}" << endl;
340 ost << "The gradient of the quartic curve ";
341 ost << " is :" << endl;
342
343 for (i = 0; i < 3; i++) {
344 ost << "$$" << endl;
345 ost << "\\begin{array}{c}" << endl;
347 ost << "\\end{array}" << endl;
348 ost << "$$" << endl;
349
350 ost << "$$" << endl;
352 ost << "$$" << endl;
353 }
354
355#if 0
356 long int rk;
357
359 ost << "The point rank of the equation over GF$(" << QO->F->q << ")$ is " << rk << "\\\\" << endl;
360#endif
361
362 //ost << "Number of points on the surface " << SO->nb_pts << "\\\\" << endl;
363
364
365}
366
367
368
370{
371 ost << "\\subsection*{General information}" << endl;
372
373
374 int nb_bitangents;
375
376
377 if (QO->f_has_bitangents) {
378 nb_bitangents = 28;
379 }
380 else {
381 nb_bitangents = 0;
382 }
383
384 ost << "{\\renewcommand{\\arraystretch}{1.5}" << endl;
385 ost << "$$" << endl;
386 ost << "\\begin{array}{|l|r|}" << endl;
387 ost << "\\hline" << endl;
388 ost << "\\mbox{Number of bitangents} & " << nb_bitangents << "\\\\" << endl;
389 ost << "\\hline" << endl;
390 ost << "\\mbox{Number of points} & " << QO->nb_pts << "\\\\" << endl;
391 ost << "\\hline" << endl;
392
394 if (f_is_full) {
395 ost << "\\mbox{Fullness} & \\mbox{is full}\\\\" << endl;
396 ost << "\\hline" << endl;
397 }
398 else {
399 ost << "\\mbox{Fullness} & \\mbox{not full}\\\\" << endl;
400 ost << "\\hline" << endl;
401 }
402 }
403 ost << "\\mbox{Number of Kovalevski points} & " << nb_Kovalevski << "\\\\" << endl;
404 ost << "\\hline" << endl;
405
406
407 ost << "\\mbox{Bitangent line type $(a_0,a_1,a_2)$} & ";
408 ost << "(";
409 ost << line_type_distribution[0];
410 ost << "," << endl;
411 ost << line_type_distribution[1];
412 ost << "," << endl;
413 ost << line_type_distribution[2];
414 ost << ")";
415 ost << "\\\\" << endl;
416 ost << "\\hline" << endl;
417 ost << "\\mbox{Number of singular points} & " << nb_singular_pts << "\\\\" << endl;
418 ost << "\\hline" << endl;
419
420
421#if 0
422 ost << "\\mbox{Number of Eckardt points} & " << nb_Eckardt_points << "\\\\" << endl;
423 ost << "\\hline" << endl;
424 ost << "\\mbox{Number of double points} & " << nb_Double_points << "\\\\" << endl;
425 ost << "\\hline" << endl;
426 ost << "\\mbox{Number of single points} & " << nb_Single_points << "\\\\" << endl;
427 ost << "\\hline" << endl;
428 ost << "\\mbox{Number of points off lines} & " << nb_pts_not_on_lines << "\\\\" << endl;
429 ost << "\\hline" << endl;
430 ost << "\\mbox{Number of Hesse planes} & " << nb_Hesse_planes << "\\\\" << endl;
431 ost << "\\hline" << endl;
432 ost << "\\mbox{Number of axes} & " << nb_axes << "\\\\" << endl;
433 ost << "\\hline" << endl;
434 ost << "\\mbox{Type of points on lines} & ";
435 Type_pts_on_lines->print_naked_tex(ost, TRUE);
436 ost << "\\\\" << endl;
437 ost << "\\hline" << endl;
438 ost << "\\mbox{Type of lines on points} & ";
439 Type_lines_on_point->print_naked_tex(ost, TRUE);
440 ost << "\\\\" << endl;
441 ost << "\\hline" << endl;
442#endif
443
444
445 ost << "\\end{array}" << endl;
446 ost << "$$}" << endl;
447#if 0
448 ost << "Points on lines:" << endl;
449 ost << "$$" << endl;
450 Type_pts_on_lines->print_naked_tex(ost, TRUE);
451 ost << "$$" << endl;
452 ost << "Lines on points:" << endl;
453 ost << "$$" << endl;
454 Type_lines_on_point->print_naked_tex(ost, TRUE);
455 ost << "$$" << endl;
456#endif
457}
458
459
461{
462 ost << "\\subsection*{All points on the curve}" << endl;
463
464 cout << "quartic_curve_object_properties::print_points before print_all_points" << endl;
465 print_all_points(ost);
466
467#if 0
468 ost << "\\subsubsection*{Eckardt Points}" << endl;
469 cout << "quartic_curve_object_properties::print_points before print_Eckardt_points" << endl;
470 print_Eckardt_points(ost);
471
472 ost << "\\subsubsection*{Singular Points}" << endl;
473 cout << "quartic_curve_object_properties::print_points before print_singular_points" << endl;
474 print_singular_points(ost);
475
476 ost << "\\subsubsection*{Double Points}" << endl;
477 cout << "quartic_curve_object_properties::print_points before print_double_points" << endl;
478 print_double_points(ost);
479
480 ost << "\\subsubsection*{Points on lines}" << endl;
481 cout << "quartic_curve_object_properties::print_points before print_points_on_lines" << endl;
482 print_points_on_lines(ost);
483
484 ost << "\\subsubsection*{Points on surface but on no line}" << endl;
485 cout << "quartic_curve_object_properties::print_points before print_points_on_surface_but_not_on_a_line" << endl;
486 print_points_on_surface_but_not_on_a_line(ost);
487#endif
488}
489
490
491
493{
494 //latex_interface L;
495 //int i;
496 //int v[4];
497
498 //ost << "\\clearpage" << endl;
499 ost << "The surface has " << QO->nb_pts << " points:\\\\" << endl;
500
501 if (QO->nb_pts < 1000) {
502 //ost << "$$" << endl;
503 //L.lint_vec_print_as_matrix(ost, SO->Pts, SO->nb_pts, 10, TRUE /* f_tex */);
504 //ost << "$$" << endl;
505 //ost << "\\clearpage" << endl;
506 ost << "The points on the quartic curve are:\\\\" << endl;
507 ost << "\\begin{multicols}{3}" << endl;
508 ost << "\\noindent" << endl;
509 int i, j;
510 int v[3];
511 int a;
512 long int b;
513
514 for (i = 0; i < QO->nb_pts; i++) {
515 QO->Dom->unrank_point(v, QO->Pts[i]);
516 ost << i << " : $P_{" << QO->Pts[i] << "}=";
517 Int_vec_print_fully(ost, v, 3);
518 ost << "$\\\\" << endl;
519 }
520 ost << "\\end{multicols}" << endl;
521 ost << "The points by rank are: " << endl;
523 ost << "\\\\" << endl;
524
525
527
529 if (FALSE) {
530 cout << "quartic_curve_object_properties::print_all_points before Labels->init" << endl;
531 }
532 Labels->init(0 /*verbose_level*/);
533 if (FALSE) {
534 cout << "quartic_curve_object_properties::print_all_points after Labels->init" << endl;
535 }
536
537
538
539 ost << "The Kovalevski points are: \\\\" << endl;
540 for (i = 0; i < nb_Kovalevski; i++) {
543 ost << i << " : $P_{" << Kovalevski_points[i] << "}=";
544 Int_vec_print_fully(ost, v, 3);
545
546 ost << " = ";
547
548 for (j = 0; j < 4; j++) {
549 b = lines_on_points_off->Sets[a][j];
550 //ost << "\\ell_{" << b << "}";
551 ost << Labels->Line_label_tex[b];
552 if (j < 4 - 1) {
553 ost << " \\cap ";
554 }
555 }
556 ost << "$\\\\" << endl;
557 }
558
559 FREE_OBJECT(Labels);
560
561 ost << "The Kovalevski points by rank are: " << endl;
563 ost << "\\\\" << endl;
564
565 ost << "The points off the curve are: \\\\" << endl;
566 ost << "\\begin{multicols}{3}" << endl;
567 ost << "\\noindent" << endl;
568 for (i = 0; i < nb_pts_off; i++) {
569 QO->Dom->unrank_point(v, Pts_off[i]);
570 ost << i << " : $P_{" << Pts_off[i] << "}=";
571 Int_vec_print_fully(ost, v, 3);
572 ost << "$\\\\" << endl;
573 }
574 ost << "\\end{multicols}" << endl;
576 ost << "\\\\" << endl;
577
578 }
579 else {
580 ost << "Too many to print.\\\\" << endl;
581 }
582}
583
585{
586 if (QO->f_has_bitangents) {
587 ost << "\\subsection*{The 28 Bitangents}" << endl;
588 QO->Dom->print_lines_tex(ost, QO->bitangents28, 28);
589 ost << "Curve Points on Bitangents:\\\\" << endl;
591 }
592}
593
595 long int *Lines, int nb_lines, data_structures::set_of_sets *SoS)
596{
597 int i, j, h;
598 int verbose_level = 1;
599 long int a;
601 int w[3];
602 int coeff_out[5];
603 int Basis[6];
604
605 ost << "The lines and their points of contact are:\\\\" << endl;
606 //ost << "\\begin{multicols}{2}" << endl;
607
608 for (i = 0; i < nb_lines; i++) {
609 //fp << "Line " << i << " is " << v[i] << ":\\\\" << endl;
610 QO->Dom->P->Grass_lines->unrank_lint(Lines[i], 0 /*verbose_level*/);
611 ost << "$" << endl;
612
613 ost << QO->Dom->Schlaefli->Line_label_tex[i];
614 //ost << "\\ell_{" << i << "}";
615
616#if 0
617 if (nb_lines == 27) {
618 ost << " = " << Schlaefli->Line_label_tex[i];
619 }
620#endif
621 ost << " = " << endl;
622 //print_integer_matrix_width(cout,
623 // P->Grass_lines->M, k, n, n, F->log10_of_q + 1);
625
626
627 //print_integer_matrix_tex(ost, P->Grass_lines->M, 2, 4);
628 //ost << "\\right]_{" << Lines[i] << "}" << endl;
629 ost << "_{" << Lines[i] << "}" << endl;
630
631 if (QO->Dom->F->e > 1) {
632 ost << "=" << endl;
633 ost << "\\left[" << endl;
634 L.print_integer_matrix_tex(ost, QO->Dom->P->Grass_lines->M, 2, 3);
635 ost << "\\right]_{" << Lines[i] << "}" << endl;
636 }
637
638 for (j = 0; j < SoS->Set_size[i]; j++) {
639 a = SoS->Sets[i][j];
640 QO->Dom->unrank_point(w, QO->Pts[a]);
641 ost << "P_{" << QO->Pts[a] << "}";
642 ost << "=\\bP";
643 Int_vec_print(ost, w, 3);
644
645 Int_vec_copy(QO->Dom->P->Grass_lines->M, Basis, 6);
646
647 QO->Dom->F->Linear_algebra->adjust_basis(Basis, w,
648 3 /* n */, 2 /* k */, 1 /* d */, verbose_level);
649
651 QO->eqn15 /* int *coeff_in */, coeff_out,
652 Basis /* int *Pt1_coeff */, Basis + 3,
653 0 /*verbose_level*/);
654 // coeff_in[nb_monomials], coeff_out[degree + 1]
655 for (h = 0; h <= 4; h++) {
656 if (coeff_out[h]) {
657 break;
658 }
659 }
660
661 ost << "\\;" << h << " \\times ";
662
663 if (j < SoS->Set_size[i] - 1) {
664 ost << ", ";
665 }
666
667 }
668 ost << "$\\\\" << endl;
669 }
670 //ost << "\\end{multicols}" << endl;
671 ost << "Rank of lines: ";
672 Lint_vec_print(ost, Lines, nb_lines);
673 ost << "\\\\" << endl;
674
675}
676
677
678
679#if 0
680void quartic_curve_object_properties::print_bitangents_with_points_on_them(std::ostream &ost)
681{
682 latex_interface L;
683
684 if (QO->f_has_bitangents) {
685 ost << "\\subsection*{The 28 bitangents with points on them}" << endl;
686 int i; //, j;
687 //int pt;
688
689 for (i = 0; i < 28; i++) {
690 //fp << "Line " << i << " is " << v[i] << ":\\\\" << endl;
691 QO->Dom->P->Grass_lines->unrank_lint(QO->bitangents28[i], 0 /*verbose_level*/);
692 ost << "$$" << endl;
693 ost << "\\ell_{" << i << "} ";
694#if 0
695 if (SO->nb_lines == 27) {
696 ost << " = " << SO->Surf->Schlaefli->Line_label_tex[i];
697 }
698#endif
699 ost << " = \\left[" << endl;
700 //print_integer_matrix_width(cout, Gr->M,
701 // k, n, n, F->log10_of_q + 1);
702 L.print_integer_matrix_tex(ost, QO->Dom->P->Grass_lines->M, 2, 4);
703 ost << "\\right]_{" << QO->bitangents28[i] << "}" << endl;
704 ost << "$$" << endl;
705
706#if 0
707 ost << "which contains the point set " << endl;
708 ost << "$$" << endl;
709 ost << "\\{ P_{i} \\mid i \\in ";
710 L.lint_set_print_tex(ost, pts_on_lines->Sets[i],
712 ost << "\\}." << endl;
713 ost << "$$" << endl;
714
715 {
716 std::vector<long int> plane_ranks;
717
718 SO->Surf->P->planes_through_a_line(
719 SO->Lines[i], plane_ranks,
720 0 /*verbose_level*/);
721
722 // print the tangent planes associated with the points on the line:
723 ost << "The tangent planes associated with the points on this line are:\\\\" << endl;
724 for (j = 0; j < pts_on_lines->Set_size[i]; j++) {
725
726 int w[4];
727
728 pt = pts_on_lines->Sets[i][j];
729 ost << j << " : " << pt << " : ";
730 SO->Surf->unrank_point(w, SO->Pts[pt]);
731 Orbiter->Int_vec.print(ost, w, 4);
732 ost << " : ";
733 if (tangent_plane_rank_global[pt] == -1) {
734 ost << " is singular\\\\" << endl;
735 }
736 else {
737 ost << tangent_plane_rank_global[pt] << "\\\\" << endl;
738 }
739 }
740 ost << "The planes in the pencil through the line are:\\\\" << endl;
741 for (j = 0; j < plane_ranks.size(); j++) {
742 ost << j << " : " << plane_ranks[j] << "\\\\" << endl;
743
744 }
745 }
746#endif
747 }
748 }
749}
750#endif
751
753{
754 int f_v = (verbose_level >= 1);
755
756 if (f_v) {
757 cout << "quartic_curve_object_properties::points_on_curve_on_lines" << endl;
758 }
759
760 if (!QO->f_has_bitangents) {
761 cout << "quartic_curve_object_properties::points_on_curve_on_lines !QO->f_has_bitangents" << endl;
762 exit(1);
763 }
765
766
768
769 Combi.set_complement_lint(QO->Pts, QO->nb_pts, Pts_off /*complement*/,
771
772 if (f_v) {
773 cout << "quartic_curve_object_properties::points_on_curve_on_lines before "
774 "Surf->compute_points_on_lines" << endl;
775 }
777 QO->bitangents28, 28,
780 0 /* verbose_level */);
781 if (f_v) {
782 cout << "quartic_curve_object_properties::points_on_curve_on_lines after "
783 "Surf->compute_points_on_lines" << endl;
784 }
785
787
788 if (f_v) {
789 cout << "quartic_curve_object_properties::points_on_curve_on_lines pts_on_lines:" << endl;
791 }
792
796
797 if (f_v) {
798 cout << "Line type:" << endl;
800 cout << endl;
801 }
802
803 int i, j;
804
805 for (i = 0; i <= 2; i++) {
807 if (j == -1) {
809 }
810 else {
812 }
813 }
814
815
816 pts_on_lines->dualize(lines_on_point, 0 /* verbose_level */);
817 if (f_v) {
818 cout << "quartic_curve_object_properties::points_on_curve_on_lines lines_on_point:" << endl;
820 }
821
825 if (f_v) {
826 cout << "quartic_curve_object_properties::points_on_curve_on_lines type of lines_on_point:" << endl;
828 cout << endl;
829 }
830
831 int f, l, a, b;
832 vector<int> K;
833
834
835 f_is_full = TRUE;
837 for (i = Point_type->nb_types - 1; i >= 0; i--) {
838 f = Point_type->type_first[i];
839 l = Point_type->type_len[i];
840 a = Point_type->data_sorted[f];
841 if (a == 0) {
843 }
844 if (a == 4) {
845 nb_Kovalevski_on += l;
846 for (j = 0; j < l; j++) {
847 b = Point_type->sorting_perm_inv[f + j];
848 K.push_back(b);
849 }
850 }
851 }
853
854
855
856 if (f_v) {
857 cout << "quartic_curve_object_properties::points_on_curve_on_lines before "
858 "Surf->compute_points_on_lines for complement" << endl;
859 }
861 QO->bitangents28, 28,
864 0 /* verbose_level */);
865 if (f_v) {
866 cout << "quartic_curve_object_properties::points_on_curve_on_lines after "
867 "Surf->compute_points_on_lines" << endl;
868 }
869
871
872 if (f_v) {
873 cout << "quartic_curve_object_properties::points_on_curve_on_lines pts_off_on_lines:" << endl;
875 }
876
877 pts_off_on_lines->dualize(lines_on_points_off, 0 /* verbose_level */);
878 if (f_v) {
879 cout << "quartic_curve_object_properties::points_on_curve_on_lines lines_on_point:" << endl;
881 }
882
886 if (f_v) {
887 cout << "quartic_curve_object_properties::points_on_curve_on_lines type of lines_on_point off:" << endl;
889 cout << endl;
890 }
891
892
894 for (i = Point_off_type->nb_types - 1; i >= 0; i--) {
896 l = Point_off_type->type_len[i];
898 if (a == 4) {
900 for (j = 0; j < l; j++) {
902 K.push_back(b);
903 }
904 }
905 }
907 if (K.size() != nb_Kovalevski) {
908 cout << "K.size() != nb_Kovalevski" << endl;
909 cout << "K.size()=" << K.size() << endl;
910 cout << "nb_Kovalevski=" << nb_Kovalevski << endl;
911 exit(1);
912 }
913
916 for (j = 0; j < nb_Kovalevski; j++) {
917 Kovalevski_point_idx[j] = K[j];
918 Kovalevski_points[j] = Pts_off[K[j]];
919 }
920
921 if (f_v) {
922 cout << "quartic_curve_object_properties::points_on_curve_on_lines done" << endl;
923 }
924}
925
927{
928 if (QO->f_has_bitangents) {
930 int i;
931 long int a;
932 int v[3];
933
934
935 ost << "Line type: $" << endl;
937 ost << "$\\\\" << endl;
938
939 ost << "$$" << endl;
940 Bitangent_line_type->print_array_tex(ost, TRUE /* f_backwards */);
941 ost << "$$" << endl;
942
943
944 ost << "point types: $" << endl;
946 ost << "$\\\\" << endl;
947
948 ost << "$$" << endl;
949 Point_type->print_array_tex(ost, TRUE /* f_backwards */);
950 ost << "$$" << endl;
951
952 ost << "point types for points off the curve: $" << endl;
954 ost << "$\\\\" << endl;
955
956 ost << "$$" << endl;
957 Point_off_type->print_array_tex(ost, TRUE /* f_backwards */);
958 ost << "$$" << endl;
959
960 ost << "Lines on points off the curve:\\\\" << endl;
961 //lines_on_points_off->print_table_tex(ost);
962 for (i = 0; i < lines_on_points_off->nb_sets; i++) {
963
964 a = Pts_off[i];
965 QO->Dom->unrank_point(v, a);
966
967
968 ost << "Off point " << i << " = $P_{" << a << "} = ";
969
970 Int_vec_print(ost, v, 3);
971
972 ost << "$ lies on " << lines_on_points_off->Set_size[i] << " bisecants : ";
974 ost << "\\\\" << endl;
975 }
976
977
978 }
979}
980
982{
983 int f_v = (verbose_level >= 1);
984
985 if (f_v) {
986 cout << "quartic_curve_object_properties::compute_gradient" << endl;
987 }
988
989
990 if (f_v) {
991 cout << "quartic_curve_object_properties::compute_gradient before QO->Dom->compute_gradient" << endl;
992 }
993
994 QO->Dom->compute_gradient(QO->eqn15, gradient, verbose_level);
995
996 if (f_v) {
997 cout << "quartic_curve_object_properties::compute_gradient done" << endl;
998 }
999}
1000
1001
1002
1004// a singular point is a point where all partials vanish
1005// We compute the set of singular points into Pts[nb_pts]
1006{
1007 int f_v = (verbose_level >= 1);
1008 int f_vv = FALSE; //(verbose_level >= 2);
1009
1010 if (f_v) {
1011 cout << "quartic_curve_object_properties::compute_singular_points_and_tangent_lines" << endl;
1012 }
1013 int h, i;
1014 long int rk;
1015 int nb_eqns = 3;
1016 int v[3];
1017 int w[3];
1018
1019
1020 if (f_v) {
1021 cout << "quartic_curve_object_properties::compute_singular_points_and_tangent_lines before compute_gradient" << endl;
1022 }
1023 compute_gradient(verbose_level - 2);
1024 if (f_v) {
1025 cout << "quartic_curve_object_properties::compute_singular_points_and_tangent_lines after compute_gradient" << endl;
1026 }
1027
1028 nb_singular_pts = 0;
1030
1034 for (h = 0; h < QO->nb_pts; h++) {
1035 if (f_vv) {
1036 cout << "quartic_curve_object_properties::compute_singular_points_and_tangent_lines "
1037 "h=" << h << " / " << QO->nb_pts << endl;
1038 }
1039 rk = QO->Pts[h];
1040 if (f_vv) {
1041 cout << "quartic_curve_object_properties::compute_singular_points_and_tangent_lines "
1042 "rk=" << rk << endl;
1043 }
1044 QO->Dom->unrank_point(v, rk);
1045 if (f_vv) {
1046 cout << "quartic_curve_object_properties::compute_singular_points_and_tangent_lines "
1047 "v=";
1048 Int_vec_print(cout, v, 4);
1049 cout << endl;
1050 }
1051 for (i = 0; i < nb_eqns; i++) {
1052 if (f_vv) {
1053 cout << "quartic_curve_object_properties::compute_singular_points_and_tangent_lines "
1054 "gradient i=" << i << " / " << nb_eqns << endl;
1055 }
1056 if (FALSE) {
1057 cout << "quartic_curve_object_properties::compute_singular_points_and_tangent_lines "
1058 "gradient " << i << " = ";
1059 Int_vec_print(cout,
1062 cout << endl;
1063 }
1065 gradient + i * QO->Dom->Poly3_3->get_nb_monomials(), v);
1066 if (f_vv) {
1067 cout << "quartic_curve_object_properties::compute_singular_points_and_tangent_lines "
1068 "value = " << w[i] << endl;
1069 }
1070 }
1071 for (i = 0; i < nb_eqns; i++) {
1072 if (w[i]) {
1073 break;
1074 }
1075 }
1076
1077 if (i == nb_eqns) {
1080 }
1081 else {
1082 long int line_rk;
1083
1085 w /* eqn3 */,
1086 0 /* verbose_level*/);
1087 tangent_line_rank_global[h] = line_rk;
1090 line_rk, 0 /* verbose_level*/);
1091 }
1092 }
1093
1095 int nb_tangent_lines;
1096
1097 nb_tangent_lines = nb_non_singular_pts;
1098
1100
1101 if (f_v) {
1102 cout << "quartic_curve_object_properties::compute_singular_points_and_tangent_lines nb_tangent_lines " << nb_tangent_lines << endl;
1103 }
1104
1105#if 0
1106 string fname_tangents;
1107 file_io Fio;
1108
1109 fname_tangents.assign("tangents.txt");
1110
1111 Fio.write_set_to_file_lint(fname_tangents,
1112 tangent_plane_rank_dual, nb_tangent_planes, verbose_level);
1113
1114 if (f_v) {
1115 cout << "Written file " << fname_tangents << " of size " << Fio.file_size(fname_tangents) << endl;
1116 }
1117#endif
1118
1119
1120 int *Kernel;
1121 int *w1;
1122 int *w2;
1123 int r, ns;
1124
1128
1129
1130
1132 r, Kernel, 0 /*verbose_level */);
1133
1134 ns = QO->Dom->Poly2_3->get_nb_monomials() - r; // dimension of null space
1135 if (f_v) {
1136 cout << "The system has rank " << r << endl;
1137 cout << "The ideal has dimension " << ns << endl;
1138#if 0
1139 cout << "and is generated by:" << endl;
1140 int_matrix_print(Kernel, ns, QO->Dom->Poly2_3->get_nb_monomials());
1141 cout << "corresponding to the following basis "
1142 "of polynomials:" << endl;
1143 for (h = 0; h < ns; h++) {
1144 SO->Surf->Poly2_3->print_equation(cout, Kernel + h * QO->Dom->Poly2_3->get_nb_monomials());
1145 cout << endl;
1146 }
1147#endif
1148 }
1149
1150 FREE_int(Kernel);
1151 FREE_int(w1);
1152 FREE_int(w2);
1153
1154
1155 if (f_v) {
1156 cout << "quartic_curve_object_properties::compute_singular_points_and_tangent_lines done" << endl;
1157 }
1158}
1159
1160}}}
1161
1162
void compute_points_on_lines(long int *Pts, int nb_points, long int *Lines, int nb_lines, data_structures::set_of_sets *&pts_on_lines, int *&f_is_on_line, int verbose_level)
void print_lines_tex(std::ostream &ost, long int *Lines, int nb_lines)
void compute_gradient(int *equation15, int *&gradient, int verbose_level)
void print_lines_with_points_on_them(std::ostream &ost, long int *Lines, int nb_lines, data_structures::set_of_sets *SoS)
void create_summary_file(std::string &fname, std::string &surface_label, std::string &col_postfix, int verbose_level)
a particular quartic curve in PG(2,q), given by its equation
schlaefli labeling of objects in cubic surfaces with 27 lines
void set_complement_lint(long int *subset, int subset_size, long int *complement, int &size_complement, int universal_set_size)
void print(std::ostream &ost, std::vector< int > &v)
Definition: int_vec.cpp:413
void dualize(set_of_sets *&S, int verbose_level)
a collection of functions related to sorted vectors
void lint_vec_sort_and_remove_duplicates(long int *v, int &len)
Definition: sorting.cpp:195
a statistical analysis of data consisting of single integers
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 print_array_tex(std::ostream &ost, int f_backwards)
Definition: tally.cpp:471
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 latex_matrix(std::ostream &ost, int *p)
Definition: grassmann.cpp:1200
long int dual_rank_of_line_in_plane(long int line_rank, int verbose_level)
long int line_rank_using_dual_coordinates_in_plane(int *eqn3, int verbose_level)
void adjust_basis(int *V, int *U, int n, int k, int d, int verbose_level)
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 substitute_line(int *coeff_in, int *coeff_out, int *Pt1_coeff, int *Pt2_coeff, int verbose_level)
void vanishing_ideal(long int *Pts, int nb_pts, int &r, int *Kernel, int verbose_level)
#define FREE_int(p)
Definition: foundations.h:640
#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