broken polygon

Cfmattox shared this problem 1 year ago
Not a Problem

If I enter a list of points in the algebra panel and create a polygon from it, one of the points is slightly wrong. In the attached file, B should be (52, 0), not (52.07, 0).

Files: bug.ggb

1

If you want a triangle from a list l1, then you have to define your polygon as Polygon(l1). This is not what you did in your file. You have created it by clicking more or less yourself on these points, and you nearly succeeded for B. With the right syntax you get the right triangle.

chris

1

If I use Polygon(l1), what are the names of the vertices? I was hoping to address them as points, A, B, C for example. Is this possible?

And thank you for the speedy response!

Fletcher

1

Set in your file : A=l1(1) , B=l1(2) , C=l1(3)

2

It's a question of chicken or egg. Do you want to start with a list of given coordinates or do you want to start from three given points? In your file you started from a list of given coordinates. If you want to show them with a name, then define A=Element(l1,1) B=Element(l1,2) and C=Element(l1,3). Otherwise define A, B and C first with the given coordinates and define l1={A, B, C}. In both cases points and list will match.