Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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 yStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started