[REQ] Apollonian Circles
-
Hello,
I got a little lost with the forum layout and thought the plugins forum was locked so I posted this elsewhere, but I'm posting it here again and with the request in the title.
I hope it is not misleading this time around.
I've been an avid user of Sketchup and a lurker here. My most interaction has been to ask a question or two and silently admire all those RubyGurus who've managed to whip up such gems that make working in sketchup the best thing ever. So a big thank you to all the RubyGurus who have been so kind to share their scripts here.
#1. I have very little knowledge of Ruby Scripting, but I feel an itch in my bones ot learn it. could anyone suggest what would be a good way to start?#2. I recently saw an ruby script for making SierpiΕski tetrahedron by Regular Polygon here:http://sketchucation.com/forums/viewtopic.php?t=30328 and I was wondering if anyone has ever made a script to draw Apollonian circles of specific radii within a specified area e.g. a face. Till date I have not found any software that can do that, that which we can simply do on paper by sketching tangential circles of varying sizes.
( We used to do sheets and sheets of them while learning to draw!)
This would be very handy to populate an area with circles and maybe generate grills.
I've done this in actuality but can't manage to do on sketchup.Here is an image of what I am talking about except it is within a circle,( as defined by the Apollonian Gasket formula) ideally it would be nice to fill any shape and not just a circle.
I have no knowledge of Ruby scripting and although I am willing to learn, it might be years before I would be good enough to write such a script!So if there is anyone who would write such a script it'd be quite wonderful to explore the possibilities.
Regards,
flyashy -
@unknownuser said:
it would be nice to fill any shape and not just a circle.
yes Cool!And bravo to RegularPolygon!
-
AH, merci beaucoup Pilou, (that is the limit of my french tho!)
I had missed that page.
I really liked the poem:
For pairs of lips to kiss maybe
Involves no trigonometry.
'Tis not so when four circles kiss
Each one the other three.
To bring this off the four must be
As three in one or one in three.
If one in three, beyond a doubt
Each gets three kisses from without.
If three in one, then is that one
Thrice kissed internally.
Four circles to the kissing come.
The smaller are the benter.
The bend is just the inverse of
The distance from the center.
Though their intrigue left Euclid dumb
There's now no need for rule of thumb.
Since zero bend's a dead straight line
And concave bends have minus sign,
The sum of the squares of all four bends
Is half the square of their sum.& I really like what you did with the fire extinguishers
& yes Totally BRAVO to random polygon!
btw, if you like such fractals you must try Mandelbulb3D (in case you haven't already)regards,
flyashy -
Well I know the Mandelbub, as I was going in the past on the forum where all arrive in the fractal 3D world!
And make some articles in French Forum etc... -
there are some interesting javascript and f#/c# examples
http://en.wikibooks.org/wiki/Fractals/Apollonian_fractalshttp://www.jasondavies.com/apollonian-gasket/
http://through-the-interface.typepad.com/through_the_interface/2012/02/circle-packing-in-autocad-creating-an-apollonian-gasket-using-net.html -
Hi Glenn,
Those are great links.
I'm going to see if I can make that autocad script work.
Makes me wish I had even rudimentary knowledge of Ruby Scripting
Thanks,
flyashy
P.S. I also found an app called percolator on apple store that uses tangential circles and the results are quite amazing. An example:
http://www.brandsixtysix.com/brand66new/percolator.html -
Maybe you can find a method with SketchyPhysics!
Fall some spheres with a big root in a circular box!
Root + sphere's diameter is equal for all different spheres
So all spheres are blocked at the same diameters altitude! -
Hi Pilou,
That sounds good.
I think the closet thing to what I was aiming for is sphere packing or circle packing.
(http://en.wikipedia.org/wiki/Circle_packing)
The thing is I tried sketchy physics a long while back and it always crashed my sketchup so I gave up on it, so I am not too conversant with it. Maybe it'll work now.
I'll definitely give it a try, but from what I foresee it seems like trying to catch your ear with the other hand (as we say here in India)
The method I foresee is to make a vertical box of x,y,z where the x would be the width of the grill z would be the height and y would be the radius of the largest sphere (assuming that there are 3 sizes of lets say, 2",3" & 4", so 4") and then drop the sphere components in the box so they pack the space within. Then I'd have to cut a section across the midpoint of the box (@ 1/2 Y) and that section should give me packed circles. The problem with spheres of different sizes would be misalignment in the Y axis, So probably I'd have to use horizontal cylinders. Hmm. That sounds quite encouraging.
I'm sorry to ramble, but this helped me clarify the idea
I'm going to try it today!
Thanks,
flyashy -
Oops.
I just found out that sketchyphysics has been quarantined!?!
http://sketchucation.com/forums/viewtopic.php?f=323&t=47371Does it work for you??
I don't want to break my sketchup!! -
@flyashy said:
Oops.
I just found out that sketchyphysics has been quarantined!?!
http://sketchucation.com/forums/viewtopic.php?f=323&t=47371
Does it work for you??
I don't want to break my sketchup!!
The degree of 'seriousness' is reflected in the quarantine notes - SketchyPhysics is a problem... but not a 'killer'...
It's quarantining is a warning.
Thankfully SketchyPhysics's author IS updating it as we speak.
It IS currently implicated in breaking [or even crashing] some other scripts, however most authors have by now contrived convoluted workarounds to avoid the issues that it creates [it unnecessarily messes with some API base-class 'group' methods etc, that other tools expect to work [understandably!] !!].
Currently SketchyPhysics should work OK [although there might be a few fairly minor issues within it that need fixing/improving], BUT currently it might well break some other unrelated ad innocent tools.
You can always load SketchyPhysics, run SketchUp then later unload SketchyPhysics and restart SketchUp if you want to use some other tools later...
You just need to be aware of the potential problems that SketchUp can currently create unexpectedly... -
Hi TIG,
Thanks for the heads up on the sketchy physics.
I did install it & but it broke my sketchup, alas!:(
I get an error about undefined method 'extend_object' for 'singleton' & it seems to have an issue with additionalfolders.rb because the message is from the additional folders dialouge even though sketchy physics is not installed to the additional folder but the resident plugin folder in the program files (x86) folder. It might probably have to do something with the 64 bit windows I'm running, ...or not. I guess I'll just wait for the update.
Oh,well!I don't suppose I could tempt you into whipping up a ruby for circle stacking, could I?
I mean I find your tangent tools quite invaluable in my work process, (so thanks for that) and what I was talking about might be closer to circle stacking/tangent tools than Apollonian circles
cheers,
flyashy
Advertisement