janhardo

700 Reputation

12 Badges

11 years, 46 days

MaplePrimes Activity


These are replies submitted by janhardo

Corrected 


 

Transformation of eq 1 in wanted eq 2 form

A*x^2+B*x*y+C*y^2+D*x+E*y+F = 0 (general form 2)

After complete square for x and y and some rearrangment (general form 2) ,  i got this equation eq1  

 

 

(A*(x + (B*y + D)/(2*A))^2 + C*(y + (B*x + E)/(2*C))^2)/(-C*y^2 - E*y - 2*F + (B*y + D)^2/(4*A) - A*x^2 - D*x + (B*x + E)^2/(4*C))=1;

(A*(x+(1/2)*(B*y+D)/A)^2+C*(y+(1/2)*(B*x+E)/C)^2)/(-C*y^2-E*y-2*F+(1/4)*(B*y+D)^2/A-A*x^2-D*x+(1/4)*(B*x+E)^2/C) = 1

(1)

eg1:= (-4*A^2*C*x^2 + (-4*y^2*C^2 + (-8*B*x*y - 4*D*x - 4*E*y)*C - (B*x + E)^2)*A - (B*y + D)^2*C)/(4*A^2*C*x^2 + (4*y^2*C^2 + (4*D*x + 4*E*y + 8*F)*C - (B*x + E)^2)*A - (B*y + D)^2*C) = 1;

(-4*A^2*C*x^2+(-4*y^2*C^2+(-8*B*x*y-4*D*x-4*E*y)*C-(B*x+E)^2)*A-(B*y+D)^2*C)/(4*A^2*C*x^2+(4*y^2*C^2+(4*D*x+4*E*y+8*F)*C-(B*x+E)^2)*A-(B*y+D)^2*C) = 1

(2)

 

 

 

 

 

 

lijkt niet op eq1 !

(1) wanted form of eg1
"A x^2+B x y+C y^2+D x+E y+F=0*("general form 2))

for M ≠ 0

 

(x+(B*y+D)/(2*A))^2/X+  (y+(B*x+E)/(2*C))^2/Y = 1

 

Note : what X and Y could be ? :   M/A and M/B  ..

So it must be possible to transform eq1  in this form  above ?

 

Some background info

If B= 0 in (general form 2) you get (general form 1)  

 

(2) In book for M ≠ 0 as example we get this form
 Ax^2+Cy^2+Dx+Ey+F = 0(general form 1 )

(x+C/(2*A))^2*A/M+  (y+D/(2*B))^2*B/M = 1

 

 

restart;# via forum

f := A*x^2+B*x*y+C*y^2+D*x+E*y+F;

A*x^2+B*x*y+C*y^2+D*x+E*y+F

(3)

# complete squares in x and y, then separate the term with x or y

temp := selectremove(has,Student:-Precalculus:-CompleteSquare(f,[x,y]),{x,y});

C*(y+(1/2)*((x+(1/2)*D/A)*B+E-(1/2)*D*B/A)/C)^2+A*(x+(1/2)*D/A)^2-(1/4)*((x+(1/2)*D/A)*B+E-(1/2)*D*B/A)^2/C, F-(1/4)*D^2/A

(4)

# equate the first to the negation of the second

temp[1]=-temp[2];

C*(y+(1/2)*((x+(1/2)*D/A)*B+E-(1/2)*D*B/A)/C)^2+A*(x+(1/2)*D/A)^2-(1/4)*((x+(1/2)*D/A)*B+E-(1/2)*D*B/A)^2/C = -F+(1/4)*D^2/A

(5)

# alternate way

((a,b)->a=-b)(temp);

C*(y+(1/2)*((x+(1/2)*D/A)*B+E-(1/2)*D*B/A)/C)^2+A*(x+(1/2)*D/A)^2-(1/4)*((x+(1/2)*D/A)*B+E-(1/2)*D*B/A)^2/C = -F+(1/4)*D^2/A

(6)

# one way to treat the new rhs (there are others)

((a,b)->a=(numer/denom)(-b))(temp);

C*(y+(1/2)*((x+(1/2)*D/A)*B+E-(1/2)*D*B/A)/C)^2+A*(x+(1/2)*D/A)^2-(1/4)*((x+(1/2)*D/A)*B+E-(1/2)*D*B/A)^2/C = (1/4)*(-4*A*F+D^2)/A

(7)

# with some forcing sorting of terms

((a,b)->sort(a,order=plex(A,B))=sort(numer(-b),order=plex(C,D))/denom(-b))(temp);

((1/2)*D/A+x)^2*A+C*(y+(1/2)*(-(1/2)*D*B/A+((1/2)*D/A+x)*B+E)/C)^2-(1/4)*(-(1/2)*D*B/A+((1/2)*D/A+x)*B+E)^2/C = (1/4)*(D^2-4*F*A)/A

(8)

simplify( (8), 'symbolic' );

(1/4)*(4*A^2*x^2+((4*B*y+4*D)*x+4*C*y^2+4*E*y)*A+D^2)/A = (1/4)*(D^2-4*F*A)/A

(9)

(4*A^2*x^2 + ((4*B*y + 4*D)*x + 4*C*y^2 + 4*E*y)*A + D^2)/(4*A)/(D^2 - 4*F*A)/(4*A)=1;

(1/16)*(4*A^2*x^2+((4*B*y+4*D)*x+4*C*y^2+4*E*y)*A+D^2)/(A^2*(D^2-4*F*A)) = 1

(10)

 

 

Check-----------------------------------------------------------------------------------------------

A*(x + (B*y + D)/(2*A))^2 + C*y^2 + E*y + F - (B*y + D)^2/(4*A)=C*(y + (B*x + E)/(2*C))^2 + A*x^2 + D*x + F - (B*x + E)^2/(4*C);

A*(x+(1/2)*(B*y+D)/A)^2+C*y^2+E*y+F-(1/4)*(B*y+D)^2/A = D*x+C*(y+(1/2)*(B*x+E)/C)^2+A*x^2+F-(1/4)*(B*x+E)^2/C

(11)

(A*(x + (B*y + D)/(2*A))^2)-(C*(y + (B*x + E)/(2*C))^2)=A*x^2 + D*x + F - (B*x + E)^2/(4*C)-(C*y^2 + E*y + F - (B*y + D)^2/(4*A));

A*(x+(1/2)*(B*y+D)/A)^2-C*(y+(1/2)*(B*x+E)/C)^2 = A*x^2+D*x-(1/4)*(B*x+E)^2/C-C*y^2-E*y+(1/4)*(B*y+D)^2/A

(12)

M=A*x^2 + D*x - (B*x + E)^2/(4*C) - C*y^2 - E*y + (B*y + D)^2/(4*A);

M = A*x^2+D*x-(1/4)*(B*x+E)^2/C-C*y^2-E*y+(1/4)*(B*y+D)^2/A

(13)

 

 

 

A*(x + (B*y + D)/(2*A))^2 - C*(y + (B*x + E)/(2*C))^2/(A*x^2 + D*x - (B*x + E)^2/(4*C) - C*y^2 - E*y + (B*y + D)^2/(4*A));

A*(x+(1/2)*(B*y+D)/A)^2-C*(y+(1/2)*(B*x+E)/C)^2/(A*x^2+D*x-(1/4)*(B*x+E)^2/C-C*y^2-E*y+(1/4)*(B*y+D)^2/A)

(14)

A*(x + (B*y + D)/(2*A))^2 - C*(y + (B*x + E)/(2*C))^2/(A*x^2 + D*x - (B*x + E)^2/(4*C) - C*y^2 - E*y + (B*y + D)^2/(4*A))=1;

A*(x+(1/2)*(B*y+D)/A)^2-C*(y+(1/2)*(B*x+E)/C)^2/(A*x^2+D*x-(1/4)*(B*x+E)^2/C-C*y^2-E*y+(1/4)*(B*y+D)^2/A) = 1

(15)

A*(x + (B*y + D)/(2*A))^2 - C*(y + (B*x + E)/(2*C))^2/M=1;

A*(x+(1/2)*(B*y+D)/A)^2-C*(y+(1/2)*(B*x+E)/C)^2/M = 1

(16)

(A*(x + (B*y + D)/(2*A))^2 - C*(y + (B*x + E)/(2*C))^2/M)/A = 1/A;

(A*(x+(1/2)*(B*y+D)/A)^2-C*(y+(1/2)*(B*x+E)/C)^2/M)/A = 1/A

(17)

(x + (B*y + D)/(2*A))^2-(C*(y + (B*x + E)/(2*C))^2)/M/A=1/A;

(x+(1/2)*(B*y+D)/A)^2-C*(y+(1/2)*(B*x+E)/C)^2/(M*A) = 1/A

(18)

((x + (B*y + D)/(2*A))^2 - C*(y + (B*x + E)/(2*C))^2/(M*A))/C=(1/A)/C;

((x+(1/2)*(B*y+D)/A)^2-C*(y+(1/2)*(B*x+E)/C)^2/(M*A))/C = 1/(A*C)

(19)

((x + (B*y + D)/(2*A))^2)/C;

(x+(1/2)*(B*y+D)/A)^2/C

(20)

(x + (B*y + D)/(2*A))^2/C-( (y + (B*x + E)/(2*C))^2/(M*A))=1/(A*C);

(x+(1/2)*(B*y+D)/A)^2/C-(y+(1/2)*(B*x+E)/C)^2/(M*A) = 1/(A*C)

(21)

 

 


 

Download vraag1-herleidingconics2_1.mw

@janhardo 

The definitive procedure


 

restart; with(plots):

conics:=proc(A,B,C,D,E)

  local N,M,O, ans;

    if A<>0 and B<>0 then #(1)

         M:=evalf((B*C^2+A*D^2-4*E*A*B)/(4*A*B));

           if M=0 then

                 if A*B>0 then ans:= "point"

                 else ans:="two lines"

                 end if;

           elif M<>0 then

              if (M/A)>0 and (M/B)>0 then  ans:= "ellipse"

             elif (M/A)<0 and (M/B)<0 then ans:= "no graph"

             else ans:="hyperbola"

             end if;

           end if;

     elif A=0 and B<>0 #(2)

           then N:=-E/B+D^2/(4*B^2);

            if C<>0 then ans:=" laying parabola"

            elif C=0 then

              if N>0 then ans:="two lines"

              elif N=0 then ans:="point"

                else  ans:="no graph"

              end if;

            end if;

     elif A<>0 and B=0 #3 was excercise
           then O:=-E/A-C^2/(4*A^2);

            if D<>0 then ans:=" vertical parabola"

            elif D= 0 then

              if O>0 then ans:="two lines"

              elif O= 0 then ans:="point"

                else  ans:="no graph"

              end if;

            end if;

     elif A=0 and B=0 then #(4)

           if C<>0 or D<>0 then ans:="line"

           elif E=0 then ans:="the whole plane"

           else ans:="no graph"

           end if;

      end if;

      ans;

     end proc:

maplemint(conics);

 

Input for conics : A,B,C,D,E to check : 0 and  +  
For 0 and 1  input gives 2^5 = 32 inputs for parabola, lines,points, hyperbola , whole plane, nothing.
Should be useful to check all input automated , but how?

Lets look for the

 # ans:= conics(0, A, D, C, E).

conics(2,0,5,1,-7)# y=-2x^2+5x-7 ;conics(0,0,1,2,3);#y= -0.5x-1.5

" vertical parabola"

 

"line"

(1)

display(implicitplot({2*x^2-5*x+y+7=0,x+2*y+3=0},x=-4..4,y=-8..4));

 

CDExercises

(1) Adjust the conics procedure to classify a circle as a circle instead of as an ellipse.

 

(2)  Write a conics2 procedure that will classify a quadratic equation of the form

Ax^2+Cy^2+Bxy+Dx+Ey+F = 0

 

where there is a cross term. You might want to review the conic sections chapter in you calculus book.  This classification involves a rotation of axes and is considerably more complicated.

Qestion: what is rotation of axes ? and what kind of graphs ?

 

-----------------------------------------------

Note : is conics() procedure above

the input to the procedure are coefficients of a quadratic equation of the form

"Ax^2+By^2+Cx+Dy+E=0 ---------------------"

 

 

 


 

Download def_conics_procedure.mw

 

@janhardo 

Made a analyse analog in the book for case 3

There was enough formula manipulation to do in Maple , but don't know exactly the handling of this all.
So i did it with drag and drop and as start with Student[Precalculus][CompleteSquare]( );

For case #3 (a is not 0 and B=0 ), the parabola is in normal position  


 

Classification of conic sections

mijn herleiding i als acer maar met drag and drop formule gedeelts

restart; with(student):

A*x^2+B*y^2+C*x+D*y+E=0;

A*x^2+B*y^2+C*x+D*y+E = 0

(1)

f:= A*x^2+B*y^2+C*x+D*y+E; # via contextmenu :

A*x^2+B*y^2+C*x+D*y+E

(2)

Student[Precalculus][CompleteSquare]( (2), [y] ); ## voor [x] en [y] tegelijk: zie commando van acer  # hier 1 voor  1 , eerst naar y

B*(y+(1/2)*D/B)^2+A*x^2+C*x+E-(1/4)*D^2/B

(3)

Student[Precalculus][CompleteSquare]( (2), [x] ); # via x  

A*(x+(1/2)*C/A)^2+B*y^2+D*y+E-(1/4)*C^2/A

(4)

 

B*y^2 + D*y + E - C^2/(4*A);

B*y^2+D*y+E-(1/4)*C^2/A

(5)

Student[Precalculus][CompleteSquare]( (5), [y] );

B*(y+(1/2)*D/B)^2+E-(1/4)*C^2/A-(1/4)*D^2/B

(6)

A*(x + C/(2*A))^2+ B*(y + D/(2*B))^2 + E - C^2/(4*A) - D^2/(4*B);

A*(x+(1/2)*C/A)^2+B*(y+(1/2)*D/B)^2+E-(1/4)*C^2/A-(1/4)*D^2/B

(7)

A*(x + C/(2*A))^2+B*(y + D/(2*B))^2=- (E + C^2/(4*A) + D^2/(4*B));

A*(x+(1/2)*C/A)^2+B*(y+(1/2)*D/B)^2 = -E-(1/4)*C^2/A-(1/4)*D^2/B

(8)

 

 

=====================================================

case 2 A=0 en B niet 0

 

B*(y + D/(2*B))^2 + A*x^2 + C*x + E - D^2/(4*B)=0;#A=0

 

 

B*(y+(1/2)*D/B)^2+A*x^2+C*x+E-(1/4)*D^2/B = 0

(9)

B*(y + D/(2*B))^2= -C*x - E + D^2/(4*B);

B*(y+(1/2)*D/B)^2 = -C*x-E+(1/4)*D^2/B

(10)

B*(y + D/(2*B))^2= -C*(x-E/C+D^2/(4*B*C));

B*(y+(1/2)*D/B)^2 = -C*(x-E/C+(1/4)*D^2/(B*C))

(11)

 

(-C*(x - E/C + D^2/(4*B*C)))/B;

-C*(x-E/C+(1/4)*D^2/(B*C))/B

(12)

simplify(%);

(1/4)*((-4*C*x+4*E)*B-D^2)/B^2

(13)

N=%; #

N = (1/4)*((-4*C*x+4*E)*B-D^2)/B^2

(14)

N= (-E/B)+(D^2/(4*B^2)); # for C = 0 in (14), N can be 0, + , or  -

N = -E/B+(1/4)*D^2/B^2

(15)

================================================
case 3 A niet 0 en B=0

 

A*(x + C/(2*A))^2 + B*y^2 + D*y + E - C^2/(4*A)=0;

A*(x+(1/2)*C/A)^2+B*y^2+D*y+E-(1/4)*C^2/A = 0

(16)

A*(x + C/(2*A))^2= -D*y - E + C^2/(4*A);#B=#0

A*(x+(1/2)*C/A)^2 = -D*y-E+(1/4)*C^2/A

(17)

A*(x + C/(2*A))^2= -D*(y-E/D+C^2/(4*A*D));

A*(x+(1/2)*C/A)^2 = -D*(y-E/D+(1/4)*C^2/(A*D))

(18)

 

(x + C/(2*A))^2= (-D*(y - E/D + C^2/(4*A*D)))/A;

(x+(1/2)*C/A)^2 = -D*(y-E/D+(1/4)*C^2/(A*D))/A

(19)

-D*(y - E/D + C^2/(4*A*D))/A;

-D*(y-E/D+(1/4)*C^2/(A*D))/A

(20)

simplify(%);

(1/4)*((-4*D*y+4*E)*A-C^2)/A^2

(21)

O=%;

O = (1/4)*((-4*D*y+4*E)*A-C^2)/A^2

(22)

O=((-4*0*y + 4*E)*A - C^2)/(4*A^2);# for D=0 in( #22)

O = (1/4)*(4*A*E-C^2)/A^2

(23)

O= E/A-C^2/(4*A^2); # can be 0 , + , or -

O = E/A-(1/4)*C^2/A^2

(24)

 


 

Download vraag_herleiding_conic_sections_formule.mw

@janhardo 

Indeed a parabola in standard position
A error ..division by 0  


 

restart; with(plots):

conics:=proc(A,B,C,D,E)

  local N,M,ans;

    if A<>0 and B<>0 then #(1)

         M:=evalf((B*C^2+A*D^2-4*E*A*B)/(4*A*B));

           if M=0 then

                 if A*B>0 then ans:= "point"

                 else ans:="two lines"

                 end if;

           elif M<>0 then

              if (M/A)>0 and (M/B)>0 then  ans:="ellipse"

             elif (M/A)<0 and (M/B)<0 then ans:="no graph"

             else ans:="hyperbola"

             end if;

           end if;

     elif A=0 and B<>0 #(2)

           then N:=-E/B+D^2/(4*B^2);

            if C<>0 then ans:="parabola"

            elif C=0 then

              if N>0 then ans:="two lines"

              elif N=0 then ans:="point"

                else  ans:="no graph"

              end if;

            end if;

     elif A<>0 and B=0 #3
           then N:=-E/B+D^2/(4*B^2);

            if C<>0 then ans:="parabola"

            elif C=0 then

              if N>0 then ans:="two lines"

              elif N=0 then ans:="point"

                else  ans:="no graph"

              end if;

            end if;

     elif A=0 and B=0 then #(4)

           if C<>0 or D<>0 then ans:="line"

           elif E=0 then ans:="the whole plane"

           else ans:="no graph"

           end if;

      end if;

      ans;

     end proc:

 conics(1,-1,-6,5,3);   

"hyperbola"

(1)

 

 

 

conics(2,0,5,1,-7);

Error, (in conics) numeric exception: division by zero

 

implicitplot(2*x^2-5*x+y+7=0,x=-4..4,y=-8..4);

 

 


 

Download antw_symmetry_of_cases.mw

@Carl Love 

Thanks

That's a ingenious way to look at this problem!
Then in case # 2 (A =0) and B not 0 ) the parabola is laying one
For case #3 (a is not 0 and B=0 ), the parabola is in normal position  

All other in # case 2 stays the same in #case 3
Try this out with the code 

@acer 

Thanks


 

 

restart;

The following procedure is for classifying conic sections and starts on page 84 of the text.   The input to the procedure are coefficients of a quadratic equation of the form

Ax^2+By^2+Cx+Dy+E = 0

and the ouput is the type of conic section the equation describes.

 

conics:=proc(A,B,C,D,E)

  local N,M,ans;

    if A<>0 and B<>0 then #(1)

         M:=evalf((B*C^2+A*D^2-4*E*A*B)/(4*A*B));

           if M=0 then

                 if A*B>0 then ans:= "point"

                 else ans:="two lines"

                 end if;

           elif M<>0 then

              if (M/A)>0 and (M/B)>0 then  ans:="ellipse"

             elif (M/A)<0 and (M/B)<0 then ans:="no graph"

             else ans:="hyperbola"

             end if;

           end if;

     elif A=0 and B<>0 #(2)

           then N:=-E/B+D^2/(4*B^2);

            if C<>0 then ans:="parabola"

            elif C=0 then

              if N>0 then ans:="two lines"

              elif N=0 then ans:="point"

                else  ans:="no graph"

              end if;

            end if;

      elif A<>0 and B=0  then ans:="Exercise" #(3)EXERCISE

      elif A=0 and B=0 then #(4)

           if C<>0 or D<>0 then ans:="line"

           elif E=0 then ans:="the whole plane"

           else ans:="no graph"

           end if;

      end if;

      ans;

     end proc:

 

 

Example 1

Let's test the procedure on a few equations.  We will start with ones we can classify on sight.  For instance the circle  x^2+y^2 = 4 .

 

conics(1,1,0,0,-4);

"ellipse"

(1)

 

If we look back at the code we see that this is the correct output.  The procedure classifies a circle as an ellipse whose foci coincide.  Let's try another example.

Example 2

conics(2,3,1,5,-7);

"ellipse"

(2)

This corresponds to the equation

2*x^2+3*y^2+x+5*y-7 = 0

We can visually check this by looking at the graph.

 

with(plots):

implicitplot(2*x^2+3*y^2+x+5*y-7=0,x=-4..4,y=-5..5,grid=[75,75]):

 

In the procedure conics as extra to add a small plot as output next to the classification name .  
For case # 3 ( A ≠ 0 o B= 0 )  EXERCISE we need a derived formula based on (1.6) -section start formula

``

 

start formula

   

For case # 3 ( A ≠ 0 o B= 0 )

 

((a,b)->sort(a,order=plex(A,B))=sort(numer(-b),order=plex(C,D))/denom(-b))(temp);

((1/2)*C/A+x)^2*A+((1/2)*D/B+y)^2*B = (1/4)*(B*C^2+A*D^2-4*E*A*B)/(A*B)

(3)

from this formula (3) to this formula below  for further analyse
How to this with Maple?

A(x+C/2*A)^2 = -C(x-E/C+D^2/4*B*C);

A(x+(1/2)*C*A)^2 = -C(x-E/C+(1/4)*D^2*B*C)

 


 

Download vraag_2_herleiding_conic_sections_formule.mw

@Carl Love 

Thanks

The procedure conics must show this too the degenerate cases

@acer 

Thanks

This formula is good enough.

((1/2)*C/A+x)^2*A+((1/2)*D/B+y)^2*B = (1/4)*(B*C^2+A*D^2-4*E*A*B)/(A*B)

 

The whole analyse starts with

A*x^2+B*y^2+C*x+D*y+E= 0 
 It defines , conics , lines, point, plane , nothing ,  ?

It are preparations for a new procedure for classifying conic sections 
At page 83 of the enclosed pdf  at number 1 : it starts with a characterization

 

@acer 

Thanks

Looks the correct formula, yes and the command used to produce this is not simple.

With order of addens you mean : leftside of equation : starts with A ?
That doesn't matter here, although the book starts with A( )^2 +.B( )^2 

M is now the new name of rhs of the equation

M = (BC^2+AD^2-4EAB)/4AB shows the book

Maple can do it all, but it is specialized use

I must investigate your derived formula for different conditions for M(=0) and A and B for sign combinations.
It seems to be quicker done by hand, then using Maple for this ?   
blz83.pdf

blz84.pdf

@janhardo 


 

restart;

B:=Array(1..5,1..2);

Matrix(5, 2, {(1, 1) = 0, (1, 2) = 0, (2, 1) = 0, (2, 2) = 0, (3, 1) = 0, (3, 2) = 0, (4, 1) = 0, (4, 2) = 0, (5, 1) = 0, (5, 2) = 0})

(1)

T2:=Array([[0.5,-1],[1,2],[1.5,1],[1.75,2],[2,2.5]]);

Matrix(5, 2, {(1, 1) = .5, (1, 2) = -1, (2, 1) = 1, (2, 2) = 2, (3, 1) = 1.5, (3, 2) = 1, (4, 1) = 1.75, (4, 2) = 2, (5, 1) = 2, (5, 2) = 2.5})

(2)

op(eval(T2));

1 .. 5, 1 .. 2, {(1, 1) = .5, (1, 2) = -1, (2, 1) = 1, (2, 2) = 2, (3, 1) = 1.5, (3, 2) = 1, (4, 1) = 1.75, (4, 2) = 2, (5, 1) = 2, (5, 2) = 2.5}, datatype = anything, storage = rectangular, order = Fortran_order

(3)

op([2],T2); # go further with this

1 .. 5, 1 .. 2

(4)

Can select all : 1..5 , 1 and 5  ;  1..2 , 1 , 2

op([2,1],T2);

1 .. 5

(5)

op([2,1,1],T2);

1

(6)

op([2,1,2],T2);

5

(7)

op([2,2],T2);

1 .. 2

(8)

op([2,2,1],T2);

1

(9)

op([2,2,2],T2);

2

(10)

 

#op([1],T2); nothing ,[2] is two-dimensional?

op([2],T2);

1 .. 5, 1 .. 2

(11)

 

 

whattype(op([2],T2));

exprseq

(12)

upperbound(T2);

5, 2

(13)

lowerbound(T2);

1, 1

(14)

op([2,1,2], T2) ;

5

(15)

 

op(2, op(1, op(2, T2)));

Error, invalid input: op expects 1 or 2 arguments, but received 3

 

 

 

 


 

Download utzoeken_array_dimensie.mw

 

@Carl Love 

Thanks

The content of the array and the array indexing  are related in this programming of "view" is that it? 
Its a way of modern programming then.

The wireframe ranges for domain must also be made general for any array procedure input

 

@acer 
Thanks

Looking to this explanation ...complicated

Compared with the original bookprogramming is this new programming more advanced , because the intervals for x, y and z  for the 3 axis by a given  input  array are also calculated  by the "view "code in the procedure.

Only how the view code this handles seems to be complicated. 

 

 

 

@acer 

Thanks
I agree with you, to stay in a context for better understanding

@Carl Love 

Thanks

Works great , its the wireframe what's doing the job.
To program this from scratch could be complex to figure out.

Its shows the domain for the planes and compaired with the bookprogramming example, this is so much better.

@janhardo 

It is that the x-axis and y-axis are not visible anymore

 

  restart;
  with(plots):
  T:=Array([[1,2],[1.5,1]]):
  rooster:= plot3d(0,x=0..2, y=0..2,grid=[3,3],color=white):
  display
  ( rooster, [ seq
      ( seq
        ( plot3d
          ( T[i,j],
            x=i-1..i,
            y=j-1..j,
            shading=zhue,
            style=surface,
            axes=normal,
            view=[0..2,0..2,0..2]
          ),
          i=1..2
        ),
        j=1..2
      )
    ]
  );

 

 


 

Download arrplot2domain.mw

First 57 58 59 60 61 62 63 Last Page 59 of 73