Question: I am using a simple GUI that draws a tracer point in a window. The method I wrote above draws a circle in the GUI.

 I am using a simple GUI that draws a tracer point

I am using a simple GUI that draws a tracer point in a window. The method I wrote above draws a circle in the GUI. I need to find a way to draw another circle, with its center being the point on the circumference of the above circle. So the x and y values I get from the above method should be the center of my new circle. Everything I try seems to only modify the existing circle or make an ellipse I'm so stuck! I asked this on here once and they just pasted my own code as an answer.

public static void drawspiral (Display panel int originx panel .getWidth 2 int originY panel. getHeight 2 double degAng 270 double radius 150 double x y, radAng Centerx, centerY; while true rad Ang degAng Math.PI 180: centerX originx radius Math. .cos radAng centerY origin Y radius Math.. sin (radAng centerX 25 Mat radAng y centerY 2.5 Math Sin radAng panel drawNextPoint (int) centerX (int) centerY degAng 0.45 System. out println "x x y y

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!