Question
void spiral( centerX, centerY, maxRadius, spinRate, numSegments) This will draw a spiral centered at (x, y). The maxRadius determines how large the spiral can be.
void spiral( centerX, centerY, maxRadius, spinRate, numSegments)
This will draw a spiral centered at (x, y). The maxRadius determines how large the spiral can be. A low spin rate will be basically a line out from the center. A high spin rate will have more circles. The spiral will be consist of many line segments. The numSegments parameters says how many to use to draw it.
Basically we're using a drawline method with a drawing library where StdDraw.drawline(x,y,x1,y1) draws a line at those coordinates. We need to create a spiral drawing method with the parameters above.
Step 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