user3326720 - 9 months ago 53

Java Question

In JavaFX, there is the possibility to create a circle shape. This, however, only seems to offer the radius through

`circle#getRadius()`

Essentially, given a specific point (either in radians or degrees), I want to find the x,y position that correlates with that spot along the circle's perimeter

How would I go about finding it?

Answer Source

Try this simple geometric approach, using `awt`

's Point:

```
double radius = circle.getRadius();
double angleInRad = getInputAngle();
Point p = new (circleCenterX,circleCentery);
p.translate(Math.sin(angleInRad)*radius, Math.cos(angleInRad)*radius);
```

Now, you can just print the `x,y`

contents of the `Point`

object.