Area of irregular polygon

Area of irregular polygon - Сообщения

#1 Опубликовано: 20.02.2015 14:54:13
vivsets

vivsets

0 сообщений из 2 понравились пользователям.

Группа: User

Hi friends,
I am newbie to Smath studio and I am trying to find area for irregular polygon. I have input the coordinates in a matrix and created a small function to find the area using coordinate geometry. But i am getting an error as the function is not evaluated. if I run the function for a square it works fine. Can somebody help me what is wrong with my function? I have attached the file for reference.

Thanks
Vivek
Page1.sm (5 КиБ) скачан 61 раз(а).
#2 Опубликовано: 20.02.2015 16:15:43
Gerry_Bush

Gerry_Bush

12 сообщений из 14 понравились пользователям.

Группа: User

Hello Vivsets,

I think your formula is trying to reference one more row than you need to (outside your matrix). Try rows(X)-1 in your for loop.


Gerry Bush
Page1-1.sm (5 КиБ) скачан 61 раз(а).
#3 Опубликовано: 20.02.2015 18:03:56
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: Moderator

If you are interested, in the Extensions Manager (Tools > Plugins > Examples [Local Storage > Online Gallery]) there is a worksheet dedicated to to polygons' properties - just to not reinvent the wheel
2015-02-20 22_02_34-SMath Studio Desktop - [Page2.sm].png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#4 Опубликовано: 20.02.2015 19:36:54
vivsets

vivsets

0 сообщений из 2 понравились пользователям.

Группа: User

Thanks Gerry and Davide for your replies.

Gerry I fixed the function based on your answer and it works fine.

Davide your example sheet is awesome. You are right there is no point in reinventing the wheel. I will go through it in detail and put it in use in my future development of sheets.

  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений