Tuesday, March 13, 2012

More Practice

Easy exercise.

The objective is to draw a circle of variable radius (ie.you can change the radius at a single point in your code without having to change everything!), at points drawn manually in the Rhino workspace.



(Far too easy!) But now we're going to add other secondary circles, again of variable radius, around all of these main circles, so that each of these secondary circles touches the main one at A SINGLE POINT in their circumferences (ie. the main circle and each secondary circle touch but do not intersect). The number of these secondary circles is again variable, but they have to surround the main circle as shown (- we do not care if the secondary circles intersect each other, if they have to).





All of the above patterns were obtained using the same code, but by varying the 3 input parameters: radius1, radius2, number of secondary circles around main circles. No more than 20 lines of code!

No comments:

Post a Comment