Forums > MaxMSP

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

November 6, 2011 | 3:28 am

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


November 6, 2011 | 4:06 pm

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. –

November 6, 2011 | 7:45 pm

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

Dan


Viewing 3 posts - 1 through 3 (of 3 total)