HP Prime - Drawing a circle from a program



I can draw a line from a program:


But I cannot find the correct syntax to draw a circle by giving coordinates of the center and the radius. I tried all kind of syntaxes I could imagine with no success. Manual did not help me more.

Help much appreciated.

Kind regards.




ARC_P (G,x,y,r,a1,a2,c)

Page 538 in Edition 1, July 2013, User Guide.



Note: radius (r) is always in pixels, regardless of whether ARC or ARC_P is used. So if you are using the Cartesian version of ARC, convert the radius first.

I recommend just using ARC_P and work with pixels.
I believe the conversion formulas are:

X point to pixel: integer((x - Xmin)/(Xmax - Xmin)) * 318

Y point to pixel: integer((y - Ymax)/(Ymin -Ymax)) * 218

Also you can use the C>PX command in the catalog. C>PX(x,y) returns the list {x pixel, y pixel}.


Bonjour Thomas

Why does the command "circle()" not be used?

It was the command I was trying to use. I am confused.
Many thanks for you answer. Kind regards.


elle n'existe pas, tu dois utiliser ARC_P



in fact, I was using the line() command of the Geometry App in a program, which works fine as soon as you use the following syntax:


But for an unknown reason, trying to use a similar syntax on the circle() command of the Geometry App in a program does not work. For instance, here is a syntax I tried:


I thought this would draw a circle where x1,y1 and x2,y2 would be the coordinates of two end points of a diameter.

Kind regards.


Because "circle" implies that you are drawing a complete circle exclusively. ARC can draw curved arcs between 0<x<2pi angular values.


Possibly Related Threads...
Thread Author Replies Views Last Post
  Sending little images to the Prime (...and Program name bug?) Erwin Ried 19 2,560 12-10-2013, 05:35 PM
Last Post: Erwin Ried
  HP Prime Tutorial #6 and #7: Drawing Eddie W. Shore 2 731 12-10-2013, 08:16 AM
Last Post: Eddie W. Shore
  Problem with debug HP prime program, somebody help me? Carlos CM (Mexico) 6 1,207 12-05-2013, 03:07 PM
Last Post: Carlos CM (Mexico)
  HP PRIME: APP program code DISAPPEARS !! Joseph Ec 0 377 11-25-2013, 11:35 AM
Last Post: Joseph Ec
  Prime: Placing more than 1 item on the RPN stack in a single program? John Colvin 4 811 11-19-2013, 08:59 AM
Last Post: Miguel Toro
  Prime: Program size limited to 64K? Erwin Ried 4 742 11-17-2013, 11:42 PM
Last Post: Joseph Ec
  [HP-Prime] Picking elements from a List in a program Jean-Michel 3 707 11-15-2013, 04:16 AM
Last Post: dg1969
  HP Prime: Recommendation for future RPN Program Mode BruceTTT 3 695 11-13-2013, 10:03 PM
Last Post: BruceTTT
  Converting Great Circle Navigation from 41C to 42S Bill Triplett 11 1,410 11-13-2013, 07:24 AM
Last Post: Kimberly Thompson
  HP Prime: run a program in another program Davi Ribeiro de Oliveira 6 959 11-11-2013, 08:28 PM
Last Post: Davi Ribeiro de Oliveira

Forum Jump: