# Question:Trying to draw a sequence of triangles for animation

## Question:Trying to draw a sequence of triangles for animation

Maple

Am trying to draw a series of triangles for animation.  I try to construct the triangles in a loop using:

triangle(cat(T1,`a`),[A,B,C]):

so that the names of the triangles are meant to beT14, T15, T16

I have tried unsuccessfully to use the plots and draw commands ie

draw({seq(tabl[i], i=4..6)}, insequence=true, scaling=constrained);

plots[display({seq(tabl[i], i=4..6)}, insequence=true, scaling=constrained);

Can the animation be done in either?

It seems to want a variable in a list/set format - How do I set that up?  Any comments, or help gratefully received.  The program is below.  Part of the output does give triangles - but they all seem identical:-(

restart:

# # # # # # # # # # # # # # # # # # # # # # # # # # # #

# Altitude exploration  program

#Trying to draw a sequence of triangles for animation

# # # # # # # # # # # # # # # # # # # # # # # # # # # #

with(plots):

with(geometry):

for a from 4 to 6 do

b:=a+1: c:=a+2:

angA:=arccos((a+5)/2/(a+2));

point(A,0,0),point(B,c*cos(angA),c*sin(angA)),point(C,a+1,0):

tabl[a]:=triangle(cat(T1,`a`),[A,B,C]):

printf("a=%d\n",a);

triangle(cat(T1,`a`),[A,B,C]):

end do:

for i from 4 to 6 do

draw({seq(tabl[i], i=4..6)}, scaling=constrained);

printf("a=%d\n",i);

end do;

print(`After do`);

draw({seq(tabl[i], i=4..6)}, insequence=true, scaling=constrained);

Warning, the name changecoords has been redefined

Warning, the name arrow has been redefined

Warning, these names have been redefined: circle, ellipse, homothety, hyperbola, line, point

a=4

a=5

a=6

a=4

a=5

a=6

﻿