On 2017-12-25 02:42, G Yu wrote:
Ah, I get it now. I have to store the acircle.getCenter() in a point Point,
and then access Point.getX() and Point.getY() separately. It was just that
middle step that I was missing. Thanks so much!
It's not strictly true that you _have to_ store the result
Ah, I get it now. I have to store the acircle.getCenter() in a point Point,
and then access Point.getX() and Point.getY() separately. It was just that
middle step that I was missing. Thanks so much!
--
https://mail.python.org/mailman/listinfo/python-list
On 2017-12-24 02:31, G Yu wrote:
But your code has:
moving_circle.move(P_to_R/P_to_E, E_to_R/P_to_E)
so won't that move the circle and change what:
moving_circle.getCenter()
returns?
Yes, moving the circle changes the value of moving_circle.getCenter(). The problem is
interpretin
> On Dec 23, 2017, at 11:44 AM, G Yu wrote:
>
> My program has two circles: one stationary circle, drawn at a random
> location; and one moving circle, consistently drawn in the same place in the
> graphics window.
>
>
>
> Currently, acircle.getCenter() outputs this:
>
>
>
>
> I don't u
G Yu wrote:
The command gives , and I don't know how to determine the x-coordinate of
the center from that output.
Try this in an interactive session:
p = circle.getCenter()
help(p)
This should give you a page of text showing all the attributes
and methods your point object has. Somewhe
> But your code has:
>
> moving_circle.move(P_to_R/P_to_E, E_to_R/P_to_E)
>
> so won't that move the circle and change what:
>
> moving_circle.getCenter()
>
> returns?
Yes, moving the circle changes the value of moving_circle.getCenter(). The
problem is interpreting the output. The
On 2017-12-23 21:30, G Yu wrote:
I did try that. The problem is that I already declared a point
moving_object_center = (-555,-555), because that's the point I used as the
center to draw the moving_object circle itself. So the
moving_object_center.getX() will return -555 no matter what I do.
I did try that. The problem is that I already declared a point
moving_object_center = (-555,-555), because that's the point I used as the
center to draw the moving_object circle itself. So the
moving_object_center.getX() will return -555 no matter what I do.
That's why I need to calculate the
On 2017-12-23 19:44, G Yu wrote:
My program has two circles: one stationary circle, drawn at a random location;
and one moving circle, consistently drawn in the same place in the graphics
window.
The moving circle moves towards the stationary one. However, when the moving
circle hits the sta