Question: Theorem of cosine

I want to make triangle oAB with the angle AoB equal to 2*Pi/3. The following code is not right.

> restart:





for x1 to N do


for y1 from x1 to N do

 for z1 from y1 to N do

 for x2 to N do

 for y2 to N do

 for z2 to N do




if type(a, positive) and type(b, positive) and type(c, positive)  and c=sqrt((x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2) then L:=[op(L), {[0, 0, 0], [x1, y1, z1], [x2, y2, z2]}]: fi:

 od: od: od: od: od: od:




 Please help me. Thank you

Please Wait...