Draw a circle segment


Hello, I am currently trying to draw a sailboat with Processing in Java. I'm failing on the bottom part right now.
I was thinking that I can use a circle segment for it.
I wanted to use the arc() method for this only it doesn't work.
The call: arc(x, y, 20, 20, 45, 45);
I played a bit with the parameters hoping this would work.
If there is no circle segment to draw, I figured I could "squeeze" another shape, like a semicircle, to the right size or I could use a trapezoid for it.

1.) Is there a method for a circle segment?
2.) Are there methods for scaling?
3.) Is there a method for a trapezoid or do I have to do it with a rectangle and two triangles?

Sorry if there are any grammar mistaces. I asked on a German forum and I was too lazy to rewrite the whole text.

Did you read the reference for arc?

The angles must be 45 and 45+180 and radians

Also you can have it wider than high

Two or three lines would work:


\________/

Hello,

arc(x, y, 20, 20, 45, 45)

Check out the reference for arc() for examples:
arc() \ Language (API) \ Processing 3+

You should be using radians for angles.

I encourage you to review the resources available here:

:)

I just found it out. But thanks anyway. I think this will help me later.

Yeah, your right. Ty

1 Like