open gl trig question / follow circumference of circle

justin's icon

trying to code something to draw circles around circles, and yes im going round in circles ;)

basically i want my blue and green circles to follow the circumference of the red circle. i would like to get the coordinates out of the red circle (jit.gl.gridshape geometry matrix). the other circles will use the coordinates to set centre position along circumference...

my main problem is that i dont know which points to extract from the geometry dim.

hope that makes sense, any help much appreciated!

Max Patch
Copy patch and select New From Clipboard in Max.

J

justin's icon

oops here's screenshot...

1161.circles.png
png
Rob Ramirez's icon

part of the problem is that the when matrixoutput enabled, the scale attribute is not applied to the vertices coming out of the matrix.

for this goal, you probably don't need to use matrixoutput, but simply the equation of a circle with simple scaling applied (sin theta, cos theta).

Max Patch
Copy patch and select New From Clipboard in Max.

see if this helps you out. notice that every frame 10 circles are being drawn using one single jit.gl.gridshape (by turning automatic off, explicitly banging and setting the position 10 times, using uzi).

justin's icon

thanks for the answer robtherich... i was hoping i'd be able to use a certain part of the matrix as kind of animation path, but your explanation clarifies that this isnt really feasible. so yes the equation approach seems a logical way to progress...

seems spam may have hijacked my thread :(