## 375 Reputation

6 years, 250 days

## Center and radiius of a circle in 3d...

Maple Flow 2021

restart;
_local(D, O);
with(Student:-MultivariateCalculus);
A := [0, 0, 0];
B := [a, 0, 0];
C := [a, b, 0];
D := [0, b, 0];
S := [0, 0, h];
O := [x, y, z];
lineSC := Line(S, C);
lineSD := Line(S, D);
H := Projection(A, lineSC);
K := Projection(A, lineSD);
OH := H - O;
OK := K - O;
OC := C - O;
M := Matrix([OH, OK, OC]);
O := eval(O, %);
R := simplify(Distance(O, H));
O

Student:-MultivariateCalculus:-LineApplyFunction([0,0,h],

[Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(a,

rowalign = "", columnalign = "", groupalign = "",

rowspan = "1", columnspan = "1"), rowalign = "",

columnalign = "", groupalign = ""), Typesetting:-mtr(

Typesetting:-mtd(b, rowalign = "", columnalign = "",

groupalign = "", rowspan = "1", columnspan = "1"),

rowalign = "", columnalign = "", groupalign = ""),

Typesetting:-mtr(Typesetting:-mtd(uminus0h, rowalign = "",

columnalign = "", groupalign = "", rowspan = "1",

columnspan = "1"), rowalign = "", columnalign = "",

groupalign = ""), foreground = "[0,0,0]", readonly = "false",

align = "axis", rowalign = "baseline", columnalign = "center",

groupalign = "{left}", alignmentscope = "true",

columnwidth = "auto", width = "auto", rowspacing = "1.0ex",

columnspacing = "0.8em", rowlines = "none",

columnlines = "none", frame = "none",

framespacing = "0.4em 0.5ex", equalrows = "false",

equalcolumns = "false", displaystyle = "false", side = "right",

minlabelspacing = "0.8em")],variables=[x,y,z],parameter=t,id=1)

Student:-MultivariateCalculus:-LineApplyFunction([0,0,h],

[Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(0,

rowalign = "", columnalign = "", groupalign = "",

rowspan = "1", columnspan = "1"), rowalign = "",

columnalign = "", groupalign = ""), Typesetting:-mtr(

Typesetting:-mtd(b, rowalign = "", columnalign = "",

groupalign = "", rowspan = "1", columnspan = "1"),

rowalign = "", columnalign = "", groupalign = ""),

Typesetting:-mtr(Typesetting:-mtd(uminus0h, rowalign = "",

columnalign = "", groupalign = "", rowspan = "1",

columnspan = "1"), rowalign = "", columnalign = "",

groupalign = ""), foreground = "[0,0,0]", readonly = "false",

align = "axis", rowalign = "baseline", columnalign = "center",

groupalign = "{left}", alignmentscope = "true",

columnwidth = "auto", width = "auto", rowspacing = "1.0ex",

columnspacing = "0.8em", rowlines = "none",

columnlines = "none", frame = "none",

framespacing = "0.4em 0.5ex", equalrows = "false",

equalcolumns = "false", displaystyle = "false", side = "right",

minlabelspacing = "0.8em")],variables=[x,y,z],parameter=t,id=2)

/     2            2         / 2    2\ /
|    h  a         h  b     h \a  + b / |
HAssign|------------,------------,------------|
| 2    2    2  2    2    2  2    2    2|
\a  + b  + h  a  + b  + h  a  + b  + h \

/    2         2  /
|   h  b    h b   |
KAssign|0,-------,-------|
|   2    2  2    2|
\  b  + h  b  + h \

/                2                       2
|               h  a                    h  b
OHAssign|uminus0x + ------------,uminus0y + ------------,uminus0z
|            2    2    2             2    2    2
\           a  + b  + h             a  + b  + h

/ 2    2\ /
h \a  + b / |
+ ------------|
2    2    2|
a  + b  + h \

/                      2                    2  /
|                     h  b               h b   |
OKAssign|uminus0x,uminus0y + -------,uminus0z + -------|
|                     2    2             2    2|
\                    b  + h             b  + h \

OCAssign(uminus0x + a,uminus0y + b,uminus0z)

M := Matrix(3, 3, {(1, 1) = Typesetting:-mrow(Typesetting:-mo("&\

uminus0;"), Typesetting:-mi("x"), Typesetting:-mo("&plus;"),

Typesetting:-mfrac(Typesetting:-mrow(Typesetting:-msup(Typese\

tting:-mi("h"), Typesetting:-mn("2")), Typesetting:-mo("&Invis\

ibleTimes;"), Typesetting:-mi("a")), Typesetting:-mrow(Typeset\

ting:-msup(Typesetting:-mi("a"), Typesetting:-mn("2")),

Typesetting:-mo("&plus;"), Typesetting:-msup(Typesetting:-mi(\

"b"), Typesetting:-mn("2")), Typesetting:-mo("&plus;"),

Typesetting:-msup(Typesetting:-mi("h"), Typesetting:-mn("2"))\

))), (1, 2) = Typesetting:-mrow(Typesetting:-mo("&uminus0;"),

Typesetting:-mi("y"), Typesetting:-mo("&plus;"), Typesetting:\

-mfrac(Typesetting:-mrow(Typesetting:-msup(Typesetting:-mi("h"\

), Typesetting:-mn("2")), Typesetting:-mo("&InvisibleTimes;"),\

Typesetting:-mi("b")), Typesetting:-mrow(Typesetting:-msup(Ty\

pesetting:-mi("a"), Typesetting:-mn("2")), Typesetting:-mo("&p\

lus;"), Typesetting:-msup(Typesetting:-mi("b"), Typesetting:-m\

n("2")), Typesetting:-mo("&plus;"), Typesetting:-msup(Typesett\

ing:-mi("h"), Typesetting:-mn("2"))))), (1, 3) = Typesetting:-\

mrow(Typesetting:-mo("&uminus0;"), Typesetting:-mi("z"),

Typesetting:-mo("&plus;"), Typesetting:-mfrac(Typesetting:-mr\

ow(Typesetting:-mi("h"), Typesetting:-mo("&InvisibleTimes;"),

Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-msup(Type\

setting:-mi("a"), Typesetting:-mn("2")), Typesetting:-mo("&plu\

s;"), Typesetting:-msup(Typesetting:-mi("b"), Typesetting:-mn(\

"2"))))), Typesetting:-mrow(Typesetting:-msup(Typesetting:-mi(\

"a"), Typesetting:-mn("2")), Typesetting:-mo("&plus;"),

Typesetting:-msup(Typesetting:-mi("b"), Typesetting:-mn("2"))\

, Typesetting:-mo("&plus;"), Typesetting:-msup(Typesetting:-mi\

("h"), Typesetting:-mn("2"))))), (2, 1) = Typesetting:-mrow(Ty\

pesetting:-mo("&uminus0;"), Typesetting:-mi("x")), (2, 2) =

Typesetting:-mrow(Typesetting:-mo("&uminus0;"), Typesetting:-\

mi("y"), Typesetting:-mo("&plus;"), Typesetting:-mfrac(Typeset\

ting:-mrow(Typesetting:-msup(Typesetting:-mi("h"),

Typesetting:-mn("2")), Typesetting:-mo("&InvisibleTimes;"),

Typesetting:-mi("b")), Typesetting:-mrow(Typesetting:-msup(Ty\

pesetting:-mi("b"), Typesetting:-mn("2")), Typesetting:-mo("&p\

lus;"), Typesetting:-msup(Typesetting:-mi("h"), Typesetting:-m\

n("2"))))), (2, 3) = Typesetting:-mrow(Typesetting:-mo("&uminu\

s0;"), Typesetting:-mi("z"), Typesetting:-mo("&plus;"),

Typesetting:-mfrac(Typesetting:-mrow(Typesetting:-mi("h"),

Typesetting:-mo("&InvisibleTimes;"), Typesetting:-msup(Typese\

tting:-mi("b"), Typesetting:-mn("2"))), Typesetting:-mrow(Type\

setting:-msup(Typesetting:-mi("b"), Typesetting:-mn("2")),

Typesetting:-mo("&plus;"), Typesetting:-msup(Typesetting:-mi(\

"h"), Typesetting:-mn("2"))))), (3, 1) = Typesetting:-mrow(Typ\

esetting:-mo("&uminus0;"), Typesetting:-mi("x"), Typesetting:-\

mo("&plus;"), Typesetting:-mi("a")), (3, 2) = Typesetting:-mro\

w(Typesetting:-mo("&uminus0;"), Typesetting:-mi("y"),

Typesetting:-mo("&plus;"), Typesetting:-mi("b")), (3, 3) =

Typesetting:-mrow(Typesetting:-mo("&uminus0;"), Typesetting:-\

mi("z"))})

Error, invalid input: eval received Matrix(3, 3, {(1, 1) = -x+h^2*a/(a^2+b^2+h^2), (1, 2) = -y+h^2*b/(a^2+b^2+h^2), (1, 3) = -z+h*(a^2+b^2)/(a^2+b^2+h^2), (2, 1) = -x, (2, 2) = -y+h^2*b/(b^2+h^2), (2, 3) = -z+h*b^2/(b^2+h^2), (3, 1) = -x+a, (3, 2) = -y+b, (3, 3) = -z}), which is not valid for its 2nd argument, eqns
/     1       / 2  2      2        2  2    2  2    2  2
R := |------------ \a  h  - 2 a  h z + a  x  + a  y  + a  z
| 2    2    2
\a  + b  + h

2      2  2      2        2  2    2  2    2  2
- 2 a h  x + b  h  - 2 b  h z + b  x  + b  y  + b  z

2      2  2    2  2    2  2\\
- 2 b h  y + h  x  + h  y  + h  z /|^(1/2)
|
/
Why this error ? Thank you.

## Zeckendorf's Theoreme...

Maple 2021

How to find all occurrences with Fibonacchi numbers?
100=89+8+2+1=89+5+3+1=55+34+8+2+1 etc...

fib := proc(n::nonnegint) option remember; if n <= 1 then n; else fib(n - 1) + fib(n - 2); end if; end proc;
zeck := proc(n::posint) local k, d; k := 2; while fib(k) <= n do k := k + 1; end do; d := n - fib(k - 1); if d = 0 then k - 1; else k - 1, zeck(d); end if; end proc;
zeck(100);
E := [fib(11), fib(6), fib(4)]; add(E[i], i = 1 .. nops(E));

## Search for congruent numbers...

Maple 2021

Cong:=proc(n)
local  a,b,An,Bn,Cn,Dn:
if n mod 2 = 1
An:=0:     Bn:=0:
for a  from (round(-sqrt(n/(2)))) to round(sqrt(n/(2)) )
do:
for b  from (round(-sqrt(n)) )to round(sqrt(n) )do :
if (sqrt(n-2*a^(2)-b^(2)) )/(32)isInteger
then An:=An+1
elif (sqrt(n-2*a^(2)-b^(2)) )/(8) isInteger
then Bn:=Bn+1  fi:
od:  od:
if 2*An=Bn
return(True)  else  return(False)
fi: else if n mod 2 = 0 :
Cn:=0:  Dn:=0:
for a  from (round(-sqrt(n/(8)))) to round(sqrt(n/(8)) )
do :
for b  from (round(-sqrt(n/(2)))) to round(sqrt(n/(2))) do:
f (sqrt(n/(2)-4*a^(2)-b^(2)) )/(32)isInteger
then Cn:=Cn+1
elif (sqrt(n/(2)-4*a^(2)-b^(2)) )/(8) isInteger
then Dn:=Dn+1 fi: od:  od:
if 2*Cn=Dn:
return(True)  else  return(False)fi:
end:

Why do I get this messge : Error, unterminated procedure. Thank you.

## Conversion of barycentric coordinates in...

Maple

How to convert barycentric coordinates to cartesian ? Thank you

## Difficulty with Transpose...

Maple 2021

with(geometry);
with(LinearAlgebra);
xA := 1;
yA := 0;
xB := 0;
yB := 0;
xC := 0;
yC := 1;
Mat := Matrix(3, 3, [xA, xB, xC, yA, yB, yC, 1, 1, 1]);
Miv := MatrixInverse(Mat);
phi := (x, y) -> Transpose(Multiphy(Miv), <x, y, 1>);
for i to 6 do
B || i := phi(xA || i, yA || i);
end do;
Error, (in LinearAlgebra:-Transpose) invalid input: too many and/or wrong type of arguments passed to LinearAlgebra:-Transpose; first unused argument is Vector(3, {(1) = xA1, (2) = yA1, (3) = 1})
How to correct this error ? Thank you.

 1 2 3 4 5 6 7 Last Page 1 of 27
﻿