# How do an arc (specifically semi-circle) on the Drawing Canvas?

0 favourites
• 7 posts
From the Asset Store
You can change amount and speed of circles, length of lines and etc. Only 6 events.
• I hope this is possible!

Thanks

#### Tagged:

• Wow! Thank you. That's quite a solution!

• In fact that is a very complete solution. It leaves with me the diameter line which I don't want but I can create a separate function to overwrite that. Thanks again!

• Overwrite?

If you don't want the diameter line, use the drawing canvas's line action instead of add poly point to draw a polygon. The only difference is that you'll have to specify the next point along with the current point, and that the number of iterations goes down by one since the last point doesn't need a line drawn anywhere.

+ System: For "steps" from 0 to resolution-1

-> DrawingCanvas: Draw line from
(x+cos((a-90)+(180÷resolution×LoopIndex))×r,
y+sin((a-90)+(180÷resolution×LoopIndex))×r)
to
(x+cos((a-90)+(180÷resolution×(LoopIndex+1)))×r,
y+sin((a-90)+(180÷resolution×(LoopIndex+1)))×r)
with rgba(0, 0, 0, 100), thickness 1, cap Butt

The example has also been updated.

• Thank you oosyrag! That is just perfect and fits my needs exactly. Is this a standard technique for drawing curves from multiple straight lines?

• ## Try Construct 3

Develop games in your browser. Powerful, performant & highly capable.

Construct 3 users don't see these ads
• You can do it per pixel if you want, but I think that's unnecessary. Just increase the resolution/number of lines until it is as smooth a circle as you want, it will still take less iterations then going through one pixel at a time.

• 7 posts