Points on a circle. - MATLAB Cody - MATLAB Central

Problem 1387. Points on a circle.

Difficulty:Rate

This problem is related to 1283, Points on a Sphere. In this case, instead of a sphere, you have a circle. Given a radius R, calculate the number of points on the circumference of the circle that have two integer coordinates. For a circle of radius 5, you would have 12 points:

  • (0, 5) and (0, -5)
  • (5, 0) and (-5, 0)
  • (4, 3) and (4, -3)
  • (-4, 3) and (-4, -3)
  • (3, 4) and (3, -4)
  • (-3, 4) and (-3, -4)

Some radii are quite large, so watch out. Good luck!

Solution Stats

29.91% Correct | 70.09% Incorrect
Last Solution submitted on Jan 16, 2025

Problem Comments

Solution Comments

Show comments
PIVlab surpasses 100K all-time File Exchange downloads
During the past twelve months, PIVlab, a MATLAB Community Toolbox for particle...
4
8
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
4

Problem Recent Solvers23

Suggested Problems

More from this Author80

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!