1
play

1 # - PDF document

1 2


  1. ������������������ 1 2 ���������� ��������������������������� ���������������������������������������������������� ������������� ������ !��������������"� �������� ��"��������# �������������� $�� � ��"����������� %� �� � ���&�� ����������������"�������������� % ���� ����������� ������������� � ������������������������ !������������"�������������������������#' � (��� ������������"���������������������� % ��� ��)&����*���������������� � ������������������ !+��,�- ���������"��# ����������������������������� ����������������������������� ������� ���������� ����������������������������� ������� ���������� ����������� ����������������� 3 4 center * display * * ������*�.��� FIGURE rotate* feature A * %�������*����������� * OPEN_ perimeter* CLOSED_ FIGURE FIGURE � ("��������������� � ���� � ������� perimeter + perimeter �����"��������������������������' feature + + B + SEGMENT POLYLINE POLYGON ELLIPSE ���������������*������������������ diagonal ... ���������������*�$������� perimeter ++ ... side1 TRIANGLE RECTANGLE � ("��������������� % �����"�� side2 �����������������������������������' CIRCLE * deferred perimeter ++ perimeter ++ SQUARE + effective !/�"������������ ����&������*��&��������*�����������# ++ redefine d ����������������������������� ������� ���������� ����������������������������� ������� ���������� ���� ������������������� ���� ��������!������������ 5 6 ����� �/�01/2 ������� 3�/45�67$1895 ����� 953(%21�5 ������� ������ �/�01/2 ��:� �������� ������� ��������� diagonal ������ �� %99%0 ; �/$2( < ��� vertex [ i ] side2 ������ ������6��&�� �� $2(5159 ��:� ��������� �� 95%� �� side1 ,, ������������� �" ������� vertex [ i + 1] �� ��� ����*������*��������95%� ���� ''' ����� ''' ���� ��������� �� 95%� �� ������ �= ������ >�� ������ ; � < ' �������� ! ������ ; � >��<# ,, ������������� �" ''' �� ������ �=���A ! ����� >������#��� ��� ��� ��������� ��� ��������� ������6��&�� =�B ������6��&�� ?=�@ ��� ������6��&�� =� ������ ' ��&�� ��� ����������������������������� ������� ���������� ����������������������������� ������� ���������� 1

  2. #�������������� �����������"������������������������ 7 8 � F"�������"�������������"���������� �!���&��� � ����6���� ��&�#G � %��&���� � �� �/�01/2 C� � �� 953(%21�5 C� � �� (9$%21�5 C� �� ����6���� ���� � �� 95%� � �=� � p ���� ✂ � ����������� � �=� � � �=� � ' ��������� (POLYGON) ��� � �=� � ' ��������� � �=� � ' ��������� � �=� � ' ��� ���� � 9�������������%������������"�� �������"�����������&��*�������"� r � �=� � �/�01/2 ��������� ����������' � ��������"����� � ����"������������������������&�,����' � 2/(������������ (RECTANGLE) � �=� � ' ��� ���� !�����D&��������� � �=� � E#� � �������������� ��5��������� � ' ��������� ������������&�,���������� ��� � ' � �=� � ����������������������������� ������� ���������� ����������������������������� ������� ���������� $������������������% $���������������% 9 10 With: and: ������� ! � �� 7$1895 #� �� �� � �� 7$1895 create c . make (...) �� HH�������3$93�5II ���� � �� 3$93�5 create p . make (...) ''' � �� �/�01/2 ������ HH��������/�01/2II ���� ''' ��� Then just use: ��� Initialize: f . move (...) if ... then f . rotate (...) f := c ������������������������"�����&�����E f . display (...) else f := p -- and so on for every end (����&�C��&�������"�� ����"��������"���I���������� &�������' -- operation on f ! ����������������������������� ������� ���������� ����������������������������� ������� ���������� ���������������������� &��������� 11 12 � (�������"��������������&��� �������&������� ������������� ���������������������������� �$4(�;1< �' ' �$4(�;$2(5159<*��$4(�;�594/2< � ���&������"��������������&��&������������������� ��������������������� ����� ������������ .%4.6(%��5�;1 J?�.%4.%��5< � ��������"�����7����������� ���" ����������� K53(/9�;1 J?�28�59$3< � �������������� ���&����������������������������������� ��� ��*�������������&����������������"�����&��� ����������������������������� ������� ���������� ����������������������������� ������� ���������� 2

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend