Drawing points on circumference of circle- LCD? JSUI MGraphics?

Nov 6, 2011 at 3:28am

Drawing points on circumference of circle- LCD? JSUI MGraphics?

Say I want to draw a circle of diameter X. On that circle’s circumference, I want to draw some small dots, at one or more of 32 evenly spaced positions on the circle’s circumference. How do I do this? So for example, I want to be able to specify circle of diameter 100 pixels, and then plot points at positions 0, 2, 4, and 6, where positions 0 through 31 are evenly spaced around the circumference.

Would LCD be best? Or perhaps JSUI’s new MGraphics in Max 6 (Darwin are you reading?)

Thanks,
Dan

#59837
Nov 6, 2011 at 4:06pm

lcd or jit.lcd works fine. Knowing the center and radius of the circle, the number of possible dot locations, and the index number of the particular dot, you can calculate the location of the dot using cosine and sine functions.

– Pasted Max Patch, click to expand. –
#215373
Nov 6, 2011 at 7:45pm

THANK YOU Christopher!! Exactly what I was looking for – greatly appreciated!!

Dan

#215374

You must be logged in to reply to this topic.