On 2012-09-05, at 01:22, irfankhan1 <irfankhan@hotmail.ca> wrote:
I have a new class for Circle Morph which has a step method that increases the diameter.
step
self extent: self extent +1. (self extent )>(400@400) ifTrue: [self stopStepping]
b:=CircleAnimeMorph new // new class for Circle Morph b openInWorld b startStepping b1:CircleAnimeMorph new b1 openInWorld b1 startStepping.
So when these both Circles meet i wanna get the Intersecting point,idk how to implement this can any one help?
see all the details here: http://mathworld.wolfram.com/Circle-CircleIntersection.html basically you first check if both radii overlap, once you know that you can do the detailed trigonometry to get the intersection points. As a first step I would implement a #intersectsCircle: aCircle method. The I think it makes most sense to put the two circles into a surrounding morph which will take care of the intersection check. Simply override the step method there and perform the tests.