File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to plot this contour ?

 
motress zlting
Ranch Hand
Posts: 55
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
contour.jpg
[Thumbnail for contour.jpg]
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
motress zlting
Ranch Hand
Posts: 55
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Pie
Posts: 1225
10
Eclipse IDE Google Web Toolkit Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
motress zlting
Ranch Hand
Posts: 55
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Pie
Posts: 1225
10
Eclipse IDE Google Web Toolkit Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
motress zlting
I suggest you go through the api first.
 
motress zlting
Ranch Hand
Posts: 55
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
salvin francis wrote:motress zlting
I suggest you go through the api first.


does it need any plugin ?
 
salvin francis
Bartender
Pie
Posts: 1225
10
Eclipse IDE Google Web Toolkit Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 55
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you only have one data point, you're not going to be drawing any lines.
 
motress zlting
Ranch Hand
Posts: 55
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Newton wrote:If you only have one data point, you're not going to be drawing any lines.


Then 3 data will do ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic