查找区域,按坐标的周长 [英] finding area,perimeter by coordinates

查看:89
本文介绍了查找区域,按坐标的周长的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们输入点(xi,yi)之类的点,具体取决于它计算面积,permeter的点数.
如果我给两个点是直线,如果三个点是三角形,如果4给定是四边形.
如果一个点和一个半径计算出圆的面积,则表示周长.
如果我们提供irrelevent数据,则必须提供一些警报消息.
irrelevent数据的意思是,如果我们提供字符,数字之类的其他数据,则不是给出点,即:错误的输入

we input the points like (xi,yi), depending on number of points it has to caluclate area,permeter.
if i give two points it is line,if three points it is triangle,if 4 it is quadrilateral.
if one point&radius it caluclate circle area,permeter.
if we provide irrelevent data it has to give some alert message.
irrelevent data means istead of giving points if we give an other data like characters,numbers i.e:wrong input

推荐答案

定义无关数据".

具有三点或更多点,就不可能拥有无关数据".您仍然可以通过按指定顺序考虑点或通过标准化"这些点以使结果形状为闭合平面多边形来计算结果形状的面积.
Define "irrelevant data".

With three or more points, it''s impossible to have "irrelvant data". You can still calculate the area of the resulting shape by either considering the points in the order specified, or by "normalizing" the points so that the resulting shape is a closed-plane polygon.


这篇关于查找区域,按坐标的周长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆