wood burning stoves 2.0*
The moose likes Java in General and the fly likes How to plot this contour ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to plot this contour ?" Watch "How to plot this contour ?" New topic
Author

How to plot this contour ?

motress zlting
Ranch Hand

Joined: Jan 10, 2010
Posts: 55
Im doing detection of access point signal strength ....but i now don't know how to plot contour ....
Can anyone tell me how to plot this shown in that image ?
I have the signal data collected at different place.


[Thumbnail for contour.jpg]

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41599
    
  55
I'm guessing that the problem is not so much doing the actual drawing (which, using the Graphics and Graphics2D classes, should not be too hard) but figuring out where to draw the contour lines; is that correct?

The first step would be to classify the measurements into groups of similar signal strength - between those the contour lines would be drawn. For example, if signal strength is measured by a number between 0 and 100, then there's a group for maybe signals strengths > 75 right around the AP point, another group for maybe signal strengths > 50 further out, a third group fro strengths > 25 even further out, and a forth group for everything below that. With those 4 groups, you'd get the 3 dividing lines seen in the picture.


Ping & DNS - my free Android networking tools app
motress zlting
Ranch Hand

Joined: Jan 10, 2010
Posts: 55
Ulf Dittmer wrote:I'm guessing that the problem is not so much doing the actual drawing (which, using the Graphics and Graphics2D classes, should not be too hard) but figuring out where to draw the contour lines; is that correct?

The first step would be to classify the measurements into groups of similar signal strength - between those the contour lines would be drawn. For example, if signal strength is measured by a number between 0 and 100, then there's a group for maybe signals strengths > 75 right around the AP point, another group for maybe signal strengths > 50 further out, a third group fro strengths > 25 even further out, and a forth group for everything below that. With those 4 groups, you'd get the 3 dividing lines seen in the picture.


But for now i even don't know how to plot the first line .....
Can you teach me ?
Let say i set the first line as -65dbm which is strong signal, and i gonna how to draw it (the circle line) ?
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 928


Have you looked at java 2d api ?

http://java.sun.com/products/java-media/2D/index.jsp


Also check your java installation folder for the following program:

/demo/jfc/Java2D/Java2Demo.jar

run it and check the output

My Website: [Salvin.in] Cool your mind:[Salvin.in/painting] My Sally:[Salvin.in/sally]
motress zlting
Ranch Hand

Joined: Jan 10, 2010
Posts: 55
salvin francis wrote:
Have you looked at java 2d api ?

http://java.sun.com/products/java-media/2D/index.jsp


Also check your java installation folder for the following program:

/demo/jfc/Java2D/Java2Demo.jar

run it and check the output


but it is not a complete circle....., it must have surge....that is the difficult part, im headache with this problem.
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 928

motress zlting
I suggest you go through the api first.
motress zlting
Ranch Hand

Joined: Jan 10, 2010
Posts: 55
salvin francis wrote:motress zlting
I suggest you go through the api first.


does it need any plugin ?
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 928

no
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

You're going to have to be more specific about the actual problem you're having.

So far it looks like you don't know how to draw a smooth line given a limited set of data points. There are an arbitrary number of ways to do that--which works best for you can only be decided by you. If this is the problem, search the web for various line-drawing algorithms and pick which one you think works best.
motress zlting
Ranch Hand

Joined: Jan 10, 2010
Posts: 55
David Newton wrote:You're going to have to be more specific about the actual problem you're having.

So far it looks like you don't know how to draw a smooth line given a limited set of data points. There are an arbitrary number of ways to do that--which works best for you can only be decided by you. If this is the problem, search the web for various line-drawing algorithms and pick which one you think works best.


Let say i just want to draw the first line,
how can i set a point (access point) on an image ?
if i have only one data which is at distance=12m, signal strength=-68dbm, how am i going to plot for the first line ?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

If you only have one data point, you're not going to be drawing any lines.
motress zlting
Ranch Hand

Joined: Jan 10, 2010
Posts: 55
David Newton wrote:If you only have one data point, you're not going to be drawing any lines.


Then 3 data will do ?
 
Consider Paul's rocket mass heater.
 
subject: How to plot this contour ?