We are about to switch to a new forum software. Until then we have removed the registration on this forum.
In the processing language, how to draw a circle and lines with a dotted line? Can it be achieved? like this?
Demo below. Typically, you provide your attempt or you describe what part you are struggling.
final float N=100;
PVector centroid =new PVector(width/2,height/2);
Is there any other way? For example, set a function to make straight lines at intervals every other period?
You can write your own function
Based on the code above
N is the number of steps
If you want a library for dashed lines on a wide variety of shapes, try Dashed Lines for Processing:
For lines, the Processing reference also has an example of using lerp to draw dotted lines.
This method can be used radially as well for r rather than x,y.