456mb
Posts: 12
Joined: Sat Jul 23, 2016 1:52 am

[Question] Perimeter

Mon May 21, 2018 5:51 pm

Hi !

i start a proyect in the university but i have a big question (sry my language native no is english), i want check via GPS if the prototype is inside of the irregular area, image of example

Image

i dont have problem with sensor, the big big dude is, how check is inside of the irregular perimeter, some idea for start ?

any idea is welcome

thanks for you time

User avatar
HawaiianPi
Posts: 2764
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: [Question] Perimeter

Mon May 21, 2018 6:20 pm

That depends on how the perimeter is defined. For example, painted lines could be detected with a camera. If the perimeter is not clearly marked, then it becomes more difficult. GPS might work for an outdoor location, but might not work inside a building (or any location with poor GPS reception). We really need more information to help you.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

B.Goode
Posts: 6436
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: [Question] Perimeter

Mon May 21, 2018 6:25 pm

any idea is welcome


Go to the Mathematics Department of your University and ask them to teach you some (Cartesian) coordinate geometry.



It is an interesting question.

But it is not one that is directly related to the use of a Raspberry Pi.

456mb
Posts: 12
Joined: Sat Jul 23, 2016 1:52 am

Re: [Question] Perimeter

Mon May 21, 2018 7:56 pm

HawaiianPi wrote:
Mon May 21, 2018 6:20 pm
That depends on how the perimeter is defined. For example, painted lines could be detected with a camera. If the perimeter is not clearly marked, then it becomes more difficult. GPS might work for an outdoor location, but might not work inside a building (or any location with poor GPS reception). We really need more information to help you.
yes, that use in open field, the points will be configured previusly (point = GPS position)

The general idea is use in a motorbike for big places, but the first step is detect the area

drgeoff
Posts: 8497
Joined: Wed Jan 25, 2012 6:39 pm

Re: [Question] Perimeter

Mon May 21, 2018 8:31 pm

B.Goode wrote:
Mon May 21, 2018 6:25 pm
Go to the Mathematics Department of your University and ask them to teach you some (Cartesian) coordinate geometry.
Surely anyone in a University faculty doing this project would have already been taught coordinate geometry at school.

456mb
Posts: 12
Joined: Sat Jul 23, 2016 1:52 am

Re: [Question] Perimeter

Mon May 21, 2018 9:06 pm

drgeoff wrote:
Mon May 21, 2018 8:31 pm
B.Goode wrote:
Mon May 21, 2018 6:25 pm
Go to the Mathematics Department of your University and ask them to teach you some (Cartesian) coordinate geometry.
Surely anyone in a University faculty doing this project would have already been taught coordinate geometry at school.

it's irony ?

its a free proyect, the question how to pass the points to identify them as a "side"

ejolson
Posts: 1890
Joined: Tue Mar 18, 2014 11:47 am

Re: [Question] Perimeter

Tue May 22, 2018 7:49 pm

drgeoff wrote:
Mon May 21, 2018 8:31 pm
B.Goode wrote:
Mon May 21, 2018 6:25 pm
Go to the Mathematics Department of your University and ask them to teach you some (Cartesian) coordinate geometry.
Surely anyone in a University faculty doing this project would have already been taught coordinate geometry at school.
Maybe even Calculus, but apparently not on this forum. Does Green's theorem help?

B.Goode
Posts: 6436
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: [Question] Perimeter

Tue May 22, 2018 8:55 pm

the question how to pass the points to identify them as a "side"
Presumably you will represent the points defining the area as pairs of coordinates in the form returned by a GPS receiver. The standard used to be WGS84, but that may no longer be current.

I think I remember that if you know the coordinates of 2 points in a plane you can deduce the equation for the straight line passing through those points? The portion of that line between the 2 positions represents a side of your boundary shape.

(Still not sure why this is in a Raspberry Pi forum.)

ejolson
Posts: 1890
Joined: Tue Mar 18, 2014 11:47 am

Re: [Question] Perimeter

Tue May 22, 2018 10:13 pm

B.Goode wrote:
Tue May 22, 2018 8:55 pm
(Still not sure why this is in a Raspberry Pi forum.)
I think the idea is to build a GPS surveying tool using Raspberry Pi. Green's theorem is surely the way to compute the area. Please read the whole Wikipedia article I linked to in my previous post.

gkaiseril
Posts: 443
Joined: Mon Aug 08, 2016 9:27 pm
Location: Chicago, IL

Re: [Question] Perimeter

Tue May 22, 2018 10:54 pm

One might also want to look at the Coastline paradox. It might not be as simple as some think.

ejolson
Posts: 1890
Joined: Tue Mar 18, 2014 11:47 am

Re: [Question] Perimeter

Wed May 23, 2018 2:28 am

gkaiseril wrote:
Tue May 22, 2018 10:54 pm
One might also want to look at the Coastline paradox. It might not be as simple as some think.
Interesting article. While the length of the coastline may not be well defined, the area enclosed is. But now that I reread the question I see that it isn't a matter of finding the area, but whether a particular point is inside or outside the area. Again the answer can be determined by an integral over the perimeter, just a different one than for finding area.

scotty101
Posts: 3094
Joined: Fri Jun 08, 2012 6:03 pm

Re: [Question] Perimeter

Wed May 23, 2018 8:43 am

The information at this link seems helpful
http://alienryderflex.com/polygon/
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

456mb
Posts: 12
Joined: Sat Jul 23, 2016 1:52 am

Re: [Question] Perimeter

Sat May 26, 2018 5:09 am

thank all the guys for taking the time to help me find a solution :D
scotty101 wrote:
Wed May 23, 2018 8:43 am
The information at this link seems helpful
http://alienryderflex.com/polygon/
I want to thank you, I turned google looking for information but I did not succeed

It's just what I needed to put the idea, I want to tell you that this was the last problem for my project to work.

Really thank you ;)

Heater
Posts: 9832
Joined: Tue Jul 17, 2012 3:02 pm

Re: [Question] Perimeter

Sat Jun 02, 2018 2:04 am

There is a much simpler way to find if a point is inside or outside a polygon. Use the "winding number algorithm" See here: https://en.wikipedia.org/wiki/Point_in_polygon

Return to “Mathematica”

Who is online

Users browsing this forum: No registered users and 2 guests