1

I want to create dots/ points in my java-fx application. But there are some conditions:

1)The dots should be random

2)The dots have to be bounded inside a circle ie all the dots must be inside a circle of given dimension

3)The concentration of dots must be far greater near the outer portion ie towards the boundary than anywhere else.

How do i do this ?

Plutonium smuggler
  • 329
  • 5
  • 6
  • 17
  • 1
    what have you tried? I love javafx, and would like to see this be a great Q&A for others to learn from... – SnakeDoc Oct 08 '13 at 14:35
  • You have any sample code? I dont feel like doing all this from 0. – Magcus Oct 08 '13 at 14:36
  • Actually i was making a simple clock widget. I wanted to add a border to the clock with pattern ( border in the sense. like rim of wheel). So thought that placing random colored dots would be a good idea. – Plutonium smuggler Oct 08 '13 at 14:39
  • Ok..i think theres one way around the third condition..fill the entire circle with lots nd lots of dots and den draw another smaller circle on top of it. But how do i create dots bounded within a circle ? – Plutonium smuggler Oct 09 '13 at 06:05
  • 1
    Values thanks to the classic equation of a circle? http://stackoverflow.com/questions/481144/equation-for-testing-if-a-point-is-inside-a-circle – zenbeni Oct 09 '13 at 12:45
  • Yeah. Thnx a lot for the help. – Plutonium smuggler Oct 09 '13 at 13:41

0 Answers0