And we qualified the 3d-calculation all here.
1 | vLine* to_screen_line( vLine* ll ) ; | qualified | 3/23 |
2 | int create_model_lines( vLine **lines, int *line_index, int max_num ) ; | qualified | 3/23 |
3 | int convert_model_lines( vLine **lines, vLine **lines_2D, int line_index, int max_num ) ; | qualified | 3/23 |
We use the below function for print memorization:
vCalculation::Print_Point_Memories ()
--- execution 001 ---
grid 3 3: p|0038B8B0|( 60.000000, 30.000000, 235.000000)
memorizevLine( vPoint* a, vPoint* b ) starts.a , b = |0038B8B0||0038B838|p|0038B8B0|( 60.000000, 30.000000, 235.000000)
p|0038B838|( 15.000000, 30.000000, 285.000000)
memorized line |0038BEC8| = L|0038BEC8| p|0038B8B0|( 60.000000, 30.000000, 235.000000)
p|0038B838|( 15.000000, 30.000000, 285.000000)
L|0038BEC8| p|0038B8B0|( 60.000000, 30.000000, 235.000000)
p|0038B838|( 15.000000, 30.000000, 285.000000)
memorizevLine( vPoint* a, vPoint* b ) starts.a , b = |0038B8B0||0038BA90|p|0038B8B0|( 60.000000, 30.000000, 235.000000)
p|0038BA90|( 110.000000, 40.000000, 280.000000)
memorized line |0038BF10| = L|0038BF10| p|0038B8B0|( 60.000000, 30.000000, 235.000000)
p|0038BA90|( 110.000000, 40.000000, 280.000000)
L|0038BF10| p|0038B8B0|( 60.000000, 30.000000, 235.000000)
p|0038BA90|( 110.000000, 40.000000, 280.000000)
i: 0 p: 00387F88
i: 1 p: 00387FA0
i: 2 p: 00387FD0
i: 3 p: 00381178
i: 4 p: 003811A8
i: 5 p: 003811C0
i: 6 p: 003811F0
i: 7 p: 00387F60
i: 8 p: 00381208
--- execution 001 ---
--- execution 002 ---
lines_2D[ 36 ] L|01DF1130| p|01DF1370|( 448.537292, 172.856720, 195.000000)
p|01DF11A8|( 509.862396, 201.103546, 240.000000)
lines[ 37 ] L|006CBC88| p|006CBA90|( -35.000000, 20.000000, 240.000000)
p|006CB820|( 15.000000, 30.000000, 285.000000)
lines_2D[ 37 ] L|01DF12B0| p|01DF12C8|( 509.862396, 201.103546, 240.000000)
p|01DF1280|( 571.173950, 229.389130, 285.000000)
lines[ 38 ] L|006CBD78| p|006CB820|( 15.000000, 30.000000, 285.000000)
p|006CB9E8|( 65.000000, 40.000000, 330.000000)
lines_2D[ 38 ] L|01DF1190| p|01DF1220|( 571.173950, 229.389130, 285.000000)
p|01DF1100|( 632.464172, 257.686432, 330.000000)
lines[ 39 ] L|006CBD30| p|006CB168|( 200.000000, 40.000000, 180.000000)
p|006CB108|( 200.000000, 40.000000, 180.000000)
lines_2D[ 39 ] L|01DF1640| p|01DF1550|( 564.658875, 353.003204, 180.000000)
p|01DF15F8|( 564.658875, 353.003204, 180.000000)
lines[ 40 ] L|006CBD90| p|006CB108|( 200.000000, 40.000000, 180.000000)
p|006CB120|( 155.000000, 40.000000, 230.000000)
lines_2D[ 40 ] L|01DF1598| p|01DF14C0|( 564.658875, 353.003204, 180.000000)
p|01DF13D0|( 587.369751, 321.307312, 230.000000)
lines[ 41 ] L|006CBDF0| p|006CB120|( 155.000000, 40.000000, 230.000000)
p|006CB940|( 110.000000, 40.000000, 280.000000)
lines_2D[ 41 ] L|01DF1838| p|01DF1508|( 587.369751, 321.307312, 230.000000)
p|01DF15C8|( 609.742554, 289.478149, 280.000000)
lines[ 42 ] L|006CBDA8| p|006CB940|( 110.000000, 40.000000, 280.000000)
p|006CB9E8|( 65.000000, 40.000000, 330.000000)
lines_2D[ 42 ] L|01DF1808| p|01DF1718|( 609.742554, 289.478149, 280.000000)
p|01DF16A0|( 632.464172, 257.686432, 330.000000)
v3dCalculation:: calculation_thread_015 () ends.
main ends.
--- execution 002 ---
.\display_threeD.cpp Tue Mar 23 08:57:51 2021 816 :int create_model_lines( vLine **lines, int *line_index, int max_num ) { 817 : int i, j; 818 : vCalculation calc; 819 : printf("int create_model_lines( vLine **lines, int *line_index, int max_num ) starts. *line_index=%d\r\n", *line_index); 820 : 821 : vPoint* o = memorizevPoint( 0.0f, 0.0f, 0.0f) ; 822 : vPoint* p = memorizevPoint( 0.0f, 0.0f, 0.0f) ; 823 : vPoint* a = memorizevPoint ( 50.0f, 10.0f, 45.0f ); 824 : vPoint* up = memorizevPoint ( 0.0f, 1.0f, 0.0f ); 825 : vPoint* right = memorizevPoint ( 1.0f, 0.0f, 0.0f ); 826 : vPoint*** grid = (vPoint***) malloc (sizeof (vPoint**)* 5 ); 827 : 828 : for( i = 0; i<5; i++ ) { 829 : grid[i] = (vPoint**) malloc (sizeof (vPoint*)* 5 ); 830 : } 831 : 832 : calc.cross ( up, a, right ); 833 : printf("right is going to print:\r\n"); 834 : right->print(); 835 : 836 : for( i = 0; i<5; i++ ) { 837 : for( j = 0; j<5; j++ ) { 838 : printf("additional p calculation is going to print: i, j = %d , %d \r\n", i, j); 839 : p->print(); 840 : grid[i][j] = (vPoint*) p; 841 : grid[i][j]->print(); 842 : p = calc.add( p, a); 843 : } 844 : printf("additional p calculation is going to print: i, j = %d , %d \r\n", i, j); 845 : p->print(); 846 : p = calc.add( o, calc.scalize ( right, (float) i ) ); 847 : //if ( i == 1 ) exit(-1); //debug 848 : } 849 : 850 : 851 : calc.Print_Point_Memories (); 852 :// vCalculation::Print_Point_Memories (); 853 : printf("*line_index=%d\r\n", *line_index ); 854 :// exit(-1); 855 : 856 : for ( i=0; i< 4; i++ ) { 857 : for ( j=0; j< 4; j++ ) { 858 : printf(" i , j = %d, %d line_index %d \r\n", i, j , *line_index ); 859 : printf("grid %d %d: ", i, j ); 860 : grid[i][j]->print(); 861 : 862 : lines[(*line_index)] = memorizevLine ( grid[i][j], grid[i+1][j]); 863 : lines[(*line_index)]->print(); 864 : ++(*line_index); 865 : lines[(*line_index)] = memorizevLine ( grid[i][j], grid[i][j+1]); 866 : lines[(*line_index)]->print(); 867 : ++(*line_index); 868 : } 869 : }