toandhsp

300 Reputation

11 Badges

12 years, 277 days

MaplePrimes Activity


These are replies submitted by toandhsp

Base on Kitonum's answer. I tried
restart;
RegTetr := proc (L) local T, Dist, P;
T := combinat:-choose(L, 4);
Dist := proc (p, q) options operator, arrow; sqrt((p[1]-q[1])^2+(p[2]-q[2])^2+(p[3]-q[3])^2) end proc;
P := proc (v) options operator, arrow; combinat:-choose(v, 2) end proc; [seq(`if`(nops(convert(`~`[Dist@op](P(t)), set)) = 1, t, NULL), t = T)] end proc;
L := [[0, 0, 0], [1, 0, 0], [1, 1, 0], [0, 1, 0], [0, 0, 1], [1, 0, 1], [1, 1, 1], [0, 1, 1]];
L2 := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20];
k := seq(op(i, L2), i = 1 .. nops(L2));
L1 := [seq(`~`[`*`](k[i], map(proc (t) options operator, arrow; `~`[`-`](t, [1/k[i], 2/k[i], 3/k[i]]) end proc, L)), i = 1 .. nops(L2))];
for i from 2 to nops(L2) do RegTetr(L1[i]) end do

@Kitonum Thank you very much.

@Kitonum My question is too old. Now I need it. I don't know the L2 as you said. When I ues nops(T); I allway get the number 0. Please show L2 for me clearly. Thank you.

@Kitonum  Thank you very much. I shall try.

@Kitonum  How can I repair your code in 3D?

Thank you for your answer. The number of triangles will be reduced if I add the condition "all vertices and incenter must have different integer coordinates (8 different integers)." 

I tried:
restart;
L := [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [13, 84, 85], [15, 112, 113], [16, 63, 65], [17, 144, 145], [19, 180, 181], [20, 21, 29], [20, 99, 101], [21, 220, 221], [23, 264, 265], [24, 143, 145], [28, 45, 53], [28, 195, 197], [32, 255, 257], [33, 56, 65], [36, 77, 85], [39, 80, 89], [44, 117, 125], [48, 55, 73], [51, 140, 149], [52, 165, 173], [57, 176, 185], [60, 91, 109], [60, 221, 229], [65, 72, 97], [68, 285, 293], [69, 260, 269], [84, 187, 205], [85, 132, 157], [88, 105, 137], [95, 168, 193], [96, 247, 265], [104, 153, 185], [105, 208, 233], [115, 252, 277], [119, 120, 169], [120, 209, 241], [133, 156, 205], [140, 171, 221], [160, 231, 281], [161, 240, 289]];
for i to nops(L) do
R := op(1, L[i]);
h := op(2, L[i]);
l := op(3, L[i]);
peremeter_base := 2*Pi*R;
S_base := Pi*R^2;
V := (1/3)*Pi*R^2*h;
S_lateral := Pi*R*l;
S_total := Pi*R^2+Pi*R*l end do;

How can I reduce my code?

I am sorry about my unclear question, I want the first part in each equation is following out put

restart; A := [1, 2, 3/2, 4, 5/9]; B := [2, 5, -7, 1, 8]; C := [-1, -2, -3, -4, -5/3]; for i to nops(A) do latex(x^2*A[i]+x*B[i]+C[i] = 0) end do

Example, the first {x}^{2}+2\,x-1=0, and next is has  two solutions which are latex([solve( A[i]*x^2+B[i]*x+C[i] = 0)]. 
It's mean, out put has the form for the first equation
The equation {x}^{2}+2\,x-1=0  has  two solutions which are [\sqrt {2}-1,-1-\sqrt {2}]

If I have output in the form "The equation x^2*A[i]+x*B[i]+C[i] = 0  has  two solutions are solve(x^2*A[i]+x*B[i]+C[i] = 0]"
How can I put so that?

@acer Your method is not true with 
restart; z := a+I*b; extrema(evalc(abs(z)), evalc({3*abs(z-4-3*I)+4*abs(z-8-6*I) = 20}), {a, b}); ?

@Kitonum Thank you very much.

@John Fredsted Thank you four your answer. How can I repair my code?

@tomleslie Thank you very much.

@tomleslie If there is three points are collinear, how can I get the annount "three points are collinear"? For example, if list of points contains three points [[1, 2, 3], [3, 4, 5], [4, 5, 6]].

@vv If there is three points are collinear, how can I get the annount "three points are collinear"? For example, if list of points contains three points [[1, 2, 3], [3, 4, 5], [4, 5, 6]].

1 2 3 4 5 6 7 Last Page 1 of 13