//--------------------------------------------------------------------------- // -Create bunch of points as matrix on p0 // -Convert the matrix to plot::Pointlist // -Create scene and plot //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- // Create points on p0 as matrix matlst_p0[] //--------------------------------------------------------------------------- print( "Initializing..."): my_y := 0: my_x := 0: counter := 1: dommat:=Dom::Matrix(): resonance := 1/40: print( "Creating Bottom Triangle p0"): //while ( my_y < float( sqrt( 3))) do while ( my_y < float( sqrt( 3) / 2)) do my_x := float( my_y) / float( sqrt(3)); while my_x < (( float( sqrt(3)) - my_y) / float( sqrt( 3))) do matlst_p0[counter] := dommat( [[my_x], [my_y], [0]]); my_x := my_x + resonance; counter := counter + 1; end_while; my_y := my_y + resonance; end_while: //--------------------------------------------------------------------------- // Convert p0 to p1, p2, p3 and p4 //--------------------------------------------------------------------------- print( "Converting p0 to p1, p2, p3 and p4"): listlength := nops( matlst_p0): counter := 1: while counter <= listlength do matlst_p1[counter] := mcnv2p1( matlst_p0[counter]); matlst_p2[counter] := mcnv2p2( matlst_p0[counter]); matlst_p3[counter] := mcnv2p3( matlst_p0[counter]); matlst_p4[counter] := mcnv2p4( matlst_p0[counter]); counter := counter + 1; end_while: print( "Converting Cartesian Coordinate to Spherical Coordinate"): counter := 1: listlength := nops( matlst_p1): while counter <= listlength do matlst_m1[counter] := mcnvCartesian2Mercator( matlst_p1[counter]); matlst_m2[counter] := mcnvCartesian2Mercator( matlst_p2[counter]); matlst_m3[counter] := mcnvCartesian2Mercator( matlst_p3[counter]); matlst_m4[counter] := mcnvCartesian2Mercator( matlst_p4[counter]); counter := counter + 1; end_while: //--------------------------------------------------------------------------- // Creating Point Lists //--------------------------------------------------------------------------- print( "Converting matrix to point list"): listofpoints0 := matlst2pointlst( matlst_p0, RGB::Red): listofpoints1 := matlst2pointlst( matlst_m1, RGB::Blue): listofpoints2 := matlst2pointlst( matlst_m2, RGB::Green): listofpoints3 := matlst2pointlst( matlst_m3, RGB::Orange): listofpoints4 := matlst2pointlst( matlst_m4, RGB::Olive): listlength := nops( listofpoints0): bunchofpoints0 := plot::Pointlist( listofpoints0[i]$i=1..listlength): bunchofpoints1 := plot::Pointlist( listofpoints1[i]$i=1..listlength): bunchofpoints2 := plot::Pointlist( listofpoints2[i]$i=1..listlength): bunchofpoints3 := plot::Pointlist( listofpoints3[i]$i=1..listlength): bunchofpoints4 := plot::Pointlist( listofpoints4[i]$i=1..listlength): //--------------------------------------------------------------------------- // Plotting Graph //--------------------------------------------------------------------------- print( "plotting..."): plot( bunchofpoints1, bunchofpoints2, bunchofpoints3, bunchofpoints4): ///// new //listofpoints1 := matlst2pointlst( matlst_p1, RGB::Blue): //listofpoints2 := matlst2pointlst( matlst_p2, RGB::Green): //listofpoints3 := matlst2pointlst( matlst_p3, RGB::Orange): //listofpoints4 := matlst2pointlst( matlst_p4, RGB::Olive): //bunchofpoints1 := plot::Pointlist( listofpoints1[i]$i=1..listlength): //bunchofpoints2 := plot::Pointlist( listofpoints2[i]$i=1..listlength): //bunchofpoints3 := plot::Pointlist( listofpoints3[i]$i=1..listlength): //bunchofpoints4 := plot::Pointlist( listofpoints4[i]$i=1..listlength):