Nuevo

El polígono no es simple!

P11: (1, 1)
P12: (2, 1)
P13: (3, 1)
P14: (4, 1)
P15: (5, 1)
P16: (6, 1)
P17: (7, 1)
P18: (8, 1)
LP11: {P11, P11 + (1, 0), P11 + (1, 1), P11 + (0, 1)}
LP12: {P12, P12 + (1, 0), P12 + (1, 1), P12 + (0, 1)}
LP13: {P13, P13 + (1, 0), P13 + (1, 1), P13 + (0, 1)}
LP14: {P14, P14 + (1, 0), P14 + (1, 1), P14 + (0, 1)}
LP15: {P15, P15 + (1, 0), P15 + (1, 1), P15 + (0, 1)}
LP16: {P16, P16 + (1, 0), P16 + (1, 1), P16 + (0, 1)}
LP17: {P17, P17 + (1, 0), P17 + (1, 1), P17 + (0, 1)}
LP18: {P18, P18 + (1, 0), P18 + (1, 1), P18 + (0, 1)}
p11 = Polygon(LP11)
p12 = Polygon(LP12)
p13 = Polygon(LP13)
p14 = Polygon(LP14)
p15 = Polygon(LP15)
p16 = Polygon(LP16)
p17 = Polygon(LP17)
p18 = Polygon(LP18)
P21: (1, 2)
P22: (2, 2)
P23: (3, 2)
P24: (4, 2)
P25: (5, 2)
P26: (6, 2)
P27: (7, 2)
P28: (8, 2)
LP21: {P21, P21 + (1, 0), P21 + (1, 1), P21 + (0, 1)}
LP22: {P22, P22 + (1, 0), P22 + (1, 1), P22 + (0, 1)}
LP23: {P23, P23 + (1, 0), P23 + (1, 1), P23 + (0, 1)}
LP24: {P24, P24 + (1, 0), P24 + (1, 1), P24 + (0, 1)}
LP25: {P25, P25 + (1, 0), P25 + (1, 1), P25 + (0, 1)}
LP26: {P26, P26 + (1, 0), P26 + (1, 1), P26 + (0, 1)}
LP27: {P27, P27 + (1, 0), P27 + (1, 1), P27 + (0, 1)}
LP28: {P28, P28 + (1, 0), P28 + (1, 1), P28 + (0, 1)}
p21 = Polygon(LP21)
p22 = Polygon(LP22)
p23 = Polygon(LP23)
p24 = Polygon(LP24)
p25 = Polygon(LP25)
p26 = Polygon(LP26)
p27 = Polygon(LP27)
p28 = Polygon(LP28)
P31: (1, 3)
P32: (2, 3)
P33: (3, 3)
P34: (4, 3)
P35: (5, 3)
P36: (6, 3)
P37: (7, 3)
P38: (8, 3)
LP31: {P31, P31 + (1, 0), P31 + (1, 1), P31 + (0, 1)}
LP32: {P32, P32 + (1, 0), P32 + (1, 1), P32 + (0, 1)}
LP33: {P33, P33 + (1, 0), P33 + (1, 1), P33 + (0, 1)}
LP34: {P34, P34 + (1, 0), P34 + (1, 1), P34 + (0, 1)}
LP35: {P35, P35 + (1, 0), P35 + (1, 1), P35 + (0, 1)}
LP36: {P36, P36 + (1, 0), P36 + (1, 1), P36 + (0, 1)}
LP37: {P37, P37 + (1, 0), P37 + (1, 1), P37 + (0, 1)}
LP38: {P38, P38 + (1, 0), P38 + (1, 1), P38 + (0, 1)}
p31 = Polygon(LP31)
p32 = Polygon(LP32)
p33 = Polygon(LP33)
p34 = Polygon(LP34)
p35 = Polygon(LP35)
p36 = Polygon(LP36)
p37 = Polygon(LP37)
p38 = Polygon(LP38)
P41: (1, 4)
P42: (2, 4)
P43: (3, 4)
P44: (4, 4)
P45: (5, 4)
P46: (6, 4)
P47: (7, 4)
P48: (8, 4)
LP41: {P41, P41 + (1, 0), P41 + (1, 1), P41 + (0, 1)}
LP42: {P42, P42 + (1, 0), P42 + (1, 1), P42 + (0, 1)}
LP43: {P43, P43 + (1, 0), P43 + (1, 1), P43 + (0, 1)}
LP44: {P44, P44 + (1, 0), P44 + (1, 1), P44 + (0, 1)}
LP45: {P45, P45 + (1, 0), P45 + (1, 1), P45 + (0, 1)}
LP46: {P46, P46 + (1, 0), P46 + (1, 1), P46 + (0, 1)}
LP47: {P47, P47 + (1, 0), P47 + (1, 1), P47 + (0, 1)}
LP48: {P48, P48 + (1, 0), P48 + (1, 1), P48 + (0, 1)}
p41 = Polygon(LP41)
p42 = Polygon(LP42)
p43 = Polygon(LP43)
p44 = Polygon(LP44)
p45 = Polygon(LP45)
p46 = Polygon(LP46)
p47 = Polygon(LP47)
p48 = Polygon(LP48)
P51: (1, 5)
P52: (2, 5)
P53: (3, 5)
P54: (4, 5)
P55: (5, 5)
P56: (6, 5)
P57: (7, 5)
P58: (8, 5)
LP51: {P51, P51 + (1, 0), P51 + (1, 1), P51 + (0, 1)}
LP52: {P52, P52 + (1, 0), P52 + (1, 1), P52 + (0, 1)}
LP53: {P53, P53 + (1, 0), P53 + (1, 1), P53 + (0, 1)}
LP54: {P54, P54 + (1, 0), P54 + (1, 1), P54 + (0, 1)}
LP55: {P55, P55 + (1, 0), P55 + (1, 1), P55 + (0, 1)}
LP56: {P56, P56 + (1, 0), P56 + (1, 1), P56 + (0, 1)}
LP57: {P57, P57 + (1, 0), P57 + (1, 1), P57 + (0, 1)}
LP58: {P58, P58 + (1, 0), P58 + (1, 1), P58 + (0, 1)}
p51 = Polygon(LP51)
p52 = Polygon(LP52)
p53 = Polygon(LP53)
p54 = Polygon(LP54)
p55 = Polygon(LP55)
p56 = Polygon(LP56)
p57 = Polygon(LP57)
p58 = Polygon(LP58)
P61: (1, 6)
P62: (2, 6)
P63: (3, 6)
P64: (4, 6)
P65: (5, 6)
P66: (6, 6)
P67: (7, 6)
P68: (8, 6)
LP61: {P61, P61 + (1, 0), P61 + (1, 1), P61 + (0, 1)}
LP62: {P62, P62 + (1, 0), P62 + (1, 1), P62 + (0, 1)}
LP63: {P63, P63 + (1, 0), P63 + (1, 1), P63 + (0, 1)}
LP64: {P64, P64 + (1, 0), P64 + (1, 1), P64 + (0, 1)}
LP65: {P65, P65 + (1, 0), P65 + (1, 1), P65 + (0, 1)}
LP66: {P66, P66 + (1, 0), P66 + (1, 1), P66 + (0, 1)}
LP67: {P67, P67 + (1, 0), P67 + (1, 1), P67 + (0, 1)}
LP68: {P68, P68 + (1, 0), P68 + (1, 1), P68 + (0, 1)}
p61 = Polygon(LP61)
p62 = Polygon(LP62)
p63 = Polygon(LP63)
p64 = Polygon(LP64)
p65 = Polygon(LP65)
p66 = Polygon(LP66)
p67 = Polygon(LP67)
p68 = Polygon(LP68)
P71: (1, 7)
P72: (2, 7)
P73: (3, 7)
P74: (4, 7)
P75: (5, 7)
P76: (6, 7)
P77: (7, 7)
P78: (8, 7)
LP71: {P71, P71 + (1, 0), P71 + (1, 1), P71 + (0, 1)}
LP72: {P72, P72 + (1, 0), P72 + (1, 1), P72 + (0, 1)}
LP73: {P73, P73 + (1, 0), P73 + (1, 1), P73 + (0, 1)}
LP74: {P74, P74 + (1, 0), P74 + (1, 1), P74 + (0, 1)}
LP75: {P75, P75 + (1, 0), P75 + (1, 1), P75 + (0, 1)}
LP76: {P76, P76 + (1, 0), P76 + (1, 1), P76 + (0, 1)}
LP77: {P77, P77 + (1, 0), P77 + (1, 1), P77 + (0, 1)}
LP78: {P78, P78 + (1, 0), P78 + (1, 1), P78 + (0, 1)}
p71 = Polygon(LP71)
p72 = Polygon(LP72)
p73 = Polygon(LP73)
p74 = Polygon(LP74)
p75 = Polygon(LP75)
p76 = Polygon(LP76)
p77 = Polygon(LP77)
p78 = Polygon(LP78)
P81: (1, 8)
P82: (2, 8)
P83: (3, 8)
P84: (4, 8)
P85: (5, 8)
P86: (6, 8)
P87: (7, 8)
P88: (8, 8)
LP81: {P81, P81 + (1, 0), P81 + (1, 1), P81 + (0, 1)}
LP82: {P82, P82 + (1, 0), P82 + (1, 1), P82 + (0, 1)}
LP83: {P83, P83 + (1, 0), P83 + (1, 1), P83 + (0, 1)}
LP84: {P84, P84 + (1, 0), P84 + (1, 1), P84 + (0, 1)}
LP85: {P85, P85 + (1, 0), P85 + (1, 1), P85 + (0, 1)}
LP86: {P86, P86 + (1, 0), P86 + (1, 1), P86 + (0, 1)}
LP87: {P87, P87 + (1, 0), P87 + (1, 1), P87 + (0, 1)}
LP88: {P88, P88 + (1, 0), P88 + (1, 1), P88 + (0, 1)}
p81 = Polygon(LP81)
p82 = Polygon(LP82)
p83 = Polygon(LP83)
p84 = Polygon(LP84)
p85 = Polygon(LP85)
p86 = Polygon(LP86)
p87 = Polygon(LP87)
p88 = Polygon(LP88)
a0: 0
a1: 0
a2: 0
a3: 0
a4: 0
a5: 0
a6: 0
a7: 0
a8: 0
a9: 0
a10: 0
a11: 0
a12: 0
a13: 0
a14: 0
a15: 0
a16: 0
a17: 0
a18: 0
a19: 0
a20: 0
a21: 0
a22: 0
a23: 0
a24: 0
a25: 0
a26: 0
a27: 0
a28: 0
a29: 0
a30: 0
a31: 0
a32: 0
a33: 0
a34: 0
a35: 0
a36: 0
a37: 0
a38: 0
a39: 0
a40: 0
a41: 0
a42: 0
a43: 0
a44: 0
a45: 0
a46: 0
a47: 0
a48: 0
a49: 0
a50: 0
a51: 0
a52: 0
a53: 0
a54: 0
a55: 0
a56: 0
a57: 0
a58: 0
a59: 0
a60: 0
a61: 0
a62: 0
a63: 0
a64: 0
a65: 0
a66: 0
a67: 0
a68: 0
a69: 0
a70: 0
a71: 0
a72: 0
a73: 0
a74: 0
a75: 0
a76: 0
a77: 0
a78: 0
a79: 0
a80: 0
a81: 0
a82: 0
a83: 0
a84: 0
a85: 0
a86: 0
a87: 0
a88: 0
a89: 0
a90: 0
a91: 0
a92: 0
a93: 0
a94: 0
a95: 0
a96: 0
a97: 0
a98: 0
a99: 0
cont: 0
n: 57
area: 0
per: 0
lista1: {(5, 4), (5, 7), (6, 7), (6, 8), (7, 5), (7, 6), (7, 7), (7, 8), (8, 5), (8, 6), (8, 7), (8, 8), (9, 4), (9, 8)}
L: {(5, 4), (5, 7), (6, 7), (6, 8), (7, 8), (7, 7), (8, 7), (8, 8), (9, 8), (9, 7), (9, 6), (9, 5), (9, 4), (8, 4), (7, 4), (6, 4), (5, 4)}
pol1 = Polygon(L)
A = (1, 1)
B = (9, 1)
pol2, f, g, h, i, C, D = Polygon(A, B, 4)
texto2: "Área = " + (If[area ≟ pol1 ∨ cont ≟ 1, area, 0]) + ""
texto1: "Perímetro = " + (If[area ≟ pol1 ∨ cont ≟ 1, per, 0]) + ""
num = 11
minimo: (2 * ceil((2 * sqrt(num))))
maximo: (2 * num) + 2
perimetro: (Random[minimo / 2, maximo / 2] * 2)
E = (10.144531215657269, 3.8882226889769225)
F = (13.408866035531739, 3.857997366570677)
G: (1, 1)
H: (9, 1)
j = Segment(G, H)
I = (9, 9)
k = Segment(H, I)
J = (1, 9)
l = Segment(I, J)
m = Segment(J, G)
p = Segment(H, G)
q = Segment(I, H)
r = Segment(I, J)
s = Segment(J, G)
t = Segment(G, H)
lista2 = Union(lista1, LP57)
lista3 = Intersection(lista1, LP57)
texto4: "Construye un poliminó de área " + num + " y perímetro " + perimetro + ""