29 Replies Latest reply: May 4, 2013 1:23 AM by Jacob Bugge RSS

    Random Patchwork Sphere

    JETalmage Community Member

      Resulting partially from a recent thread about drawing a sphere with randomly distributed circles on its surface:

       

       

      The script has been added to the archive here.

       

      Draw a simple circle.

      Store it as a Symbol.

      Select the Symbol Instance and run the script.

      Thereafter, use the Replace Symbol command to replace the Instances with any other Symbol.

      Also experiment scaling the results with Transform Each, using the Random setting.

       

      JET

        • 1. Re: Random Patchwork Sphere
          Harron K. Appleman Community Member

          Thank you, James. Great stuff.

          • 2. Re: Random Patchwork Sphere
            jay fresno Community Member

            JET,

            Your illustration is very cool. I tried following the instructions, but my symbol isn't working the same way. Would it be possible to post an AI file of your example or a PDF that could be opened in AI? That would be very helpful so that I can spot where I'm going wrong.

            • 3. Re: Random Patchwork Sphere
              tromboniator Community Member

              James,

               

              This is a wonderful tool. I'm getting fascinating results. There's a tendency for objects to cluster at the poles; horizontal objects are distributed radially, but, as far as I can tell, at random angles and length, and it seems that the script can be run on any object, not just a circular symbol. I like this script very much. Thank you.

               

              Peter

              • 4. Re: Random Patchwork Sphere
                JETalmage Community Member
                horizontal objects are distributed radially, but, as far as I can tell, at random angles and length,

                 

                The latitude/longitude distribution is random. The scaling is not; each instance of whatever you use as the original object is scaled, rotated, and tranlated so as to be effectively "pierced" by its thrust line (the invisible "radius" of the "sphere" at the instance's center).

                 

                Thus, it only looks like instances of an original object with a horizontal aspect ratio are distributed radially at "random" length. To see this, first make a Symbol out of your horizontally-shaped object. Then apply the script, then use Replace Symbol to replace the instances with instances of some other Symbol that has a square bounding box (ex: a circle). You'll then see that the instances are not scaled randomly at all. The scaling is applied as percentages of original width, according to the object's longitude. Because Symbol Instances retain their scale percentages as attributes, the replacing Symbol is scaled to the same percentages.

                 

                and it seems that the script can be run on any object, not just a circular symbol.

                 

                It can. However, that is inefficient, and prevents your exploring alot of other possibilities inherent in following up with the standard Replace Symbol command, or my RandomReplaceSymbol script, and/or the Symbolism tools.

                 

                I like this script very much. Thank you.

                 

                You're welcome. Let's see some of those fascinating results you mentioned.

                 

                JET

                • 5. Re: Random Patchwork Sphere
                  jay fresno Community Member

                  Something is missing here in the instructions. When I try the instructions, my original circle symbol ends up with very jaggy edges. JETs circles maintain their circular look. Some of JETs symbols have a transparent look to them. How was that implemented?

                  • 6. Re: Random Patchwork Sphere
                    tromboniator Community Member

                    Perhaps more fascinating possibilities than results at this point, and family obligations have intervened today, but here's a small sample of what I've been looking at.:

                     

                    Screen shot 2009-12-31 at 3.27.41 PM.png

                    A bit hard to see in this shot, but you may be able to recognize your own stipples in black around the lavender shapes in the middle.

                     

                    I tried your suggestions, comparing application of the script to symbols with that of plain objects, horizontal, vertical, and oblique, and I see exactly what you are talking about. Replacing straight-line symbol instances with square bounding box symbols gives virtually identical results, regardless of the orientation of the original, as makes sense for a sphere. Replace the results of running the script on a non-symbol line with a symbol (clumsy sentence, sorry, in a hurry) then the distribution and scaling work, but the rotation and translation disappear, reducing the results to two dimensions rather than three. This bears a lot more examination when I have time again, and I'm utterly delighted with it. Happy New Year.

                     

                    Peter

                    • 7. Re: Random Patchwork Sphere
                      JETalmage Community Member

                      Peter,

                      Good examples. And being differnt from mine, they help show the variety of effects that can be achieved by playing around with simple geometric manipulations like this script. (Imagine the time it would take to generate those same effects "by hand" in the standard feature set.)

                      Replace the results of running the script on a non-symbol line with a symbol (clumsy sentence, sorry, in a hurry) then the distribution and scaling work, but the rotation and translation disappear, reducing the results to two dimensions rather than three.

                      That's why I recommend making a Symbol out of your initial object before running the script. As explained in my last post, the script scales and rotates (and translates) copies of the original object you have selected. Illustrator does not store scaling and rotation values for ordinary objects. It does for Symbol Instances.

                       

                      Each Symbol Instance on the page carries with it its current scale and rotation (and other attributes, such as colorization applied with the Symbol Stainer) as long as it remains a Symbol Instance. Therefore, when you use the Replace Symbol command to "swap out" the base Symbol of an Instance, the new Symbol "picks up" the same transformations that were applied to the Instance.

                       

                      JET

                      • 8. Re: Random Patchwork Sphere
                        JETalmage Community Member
                        Would it be possible to post an AI file of your example or a PDF that could be opened in AI? That would be very helpful so that I can spot where I'm going wrong.

                        Jay,

                        My posting an .ai file would in no way reveal anything extra about the script. The result of the script is just a set of copies of whatever object you had selected. There is no after-the-fact "live connection" between the script and the objects for you to dissect.

                         

                         

                        my original circle symbol ends up with very jaggy edges. JETs circles maintain their circular look.

                        Well, so do mine. Look at the ball of pink triangles. Or the ball of randomly-replaced Symbols (most from the default AI Symbol library) at the very bottom of my first screenshot.

                         

                        As already explained, the script effectively merely does this:

                         

                        1. Uses some basic trig to randomly "plot" locations on the surface of the "sphere".

                         

                        2. For each location, scales, rotates, and moves a copy of the selected object, so as to be properly shaped as if the "radius" of the "sphere" were the copy's "axle". The script does not do any kind of warping to add any spherical surface"bulge" to the copies.

                         

                        So with a circle as the selected object, don't think of the individual resulting ellipses as renderings of bulging "contact lenses" as they near the horizon of the sphere. They are just ellipses. Think of them as mere circles drawn on the surface of the transparent sphere. Any "bulge" you want to add to those which occur on the horizon of the sphere would simply be a matter of drawing a circle behind the whole thing, slightly larger than the radius value you entered in the script's dialog.

                         

                        Think of it this way:

                         

                        1. Draw an ordinary small circle.

                         

                        2. Now imagine that this circle is drawn on the equator of a globe. From your line of sight, the equator is a straight horizontal line. The only reason the circle's shape appears perfectly circular to you is, you are viewing it "dead on." In other words, that circle, laying on the surface of a globe will only look like a circle to your eye when your line of sight happens to be the one radius of the sphere which pierces the center of the circle--the radius of the sphere that is pointing directly toward your eye.

                         

                        3. Now imagine the globe spins a bit counter-clockwise (as viewed from its north pole). As the globe spins about its pole, the circle enscribed on the equator becomes more elliptical from your viewpoint, because it is "rotating away from" your line of sight.

                         

                        4. So what would be the apparent shape of the circle when the globe has rotated a full 90 degrees? From your viewpoint, the circle now lies on the horizon of the globe. You are viewing the circle perfectly "edge on". The circle now looks like a straight line. That's what you are calling "jaggedness." But it's not jagged at all. A straight line is exactly (in orthographic projection) what a circle would look like when rotated 90 degrees from your line of sight.

                         

                        It's simply that you just drew a circle. The script does not in the least pretend to draw a sperical surface within your circle for you.

                        For all practical purposes intended by the script, the profile of any such desired "bulging surface" to fill in the ellipse would only be evident at the edges of the sphere. And the radius of those surfaces would be the radius of the sphere. So simply draw a filled circle behind the set of ellipses with a radius equal to the distance from the sphere's center to the corner of one of what you're calling the "jaggies."

                         

                        Now, of course, for shapes that include straight lines, such as my pink triangle, an increasing slight curvature would have to be imposed on the edges of the triangles if they were meant to accurately depict triangles drawn on the surface of the sphere. That would be an extraordinarily ambitious Javascript. So with straight-sided polygons, you have to think of the script results as a bunch of flat-plate polygons "pasted" or "pinned" onto the surface of the sphere (like the mirrors on the Tellstar satellite), not as polygons actually drawn on the spherical surface.

                         

                        So using a circle as your initial object, the script results in a quite reasonable reprensentation of circles either actually drawn on the sphere's surface or flat circular "plates" attached to or orbiting the sphere. (The difference is simply a matter of what size circle you decide to draw as the sphere itself.)

                         

                        Using a polygon, the script results in a reasonable representation of polyonal flat plates attached to or orbiting the sphere, but not of polygons actually drawn upon the sphere's surface.

                         

                        Some of JETs symbols have a transparent look to them. How was that implemented?

                         

                        C'mon, Jay, you can figure that out. Simply apply transparency to the initial object.

                         

                        For the appearance of a translucent sphere:

                         

                        1. Run the script on your selected small circle. Group the results.

                         

                        2. Run the script another copy of your small circle. Group the results.

                         

                        OR

                         

                        2. Simply make a copy of the first group and rotate it a bit.

                         

                        3. Draw a circle with a translucent fill for the sphere.

                         

                        4. Stack and align with the large circle sandwiched between the two Groups.

                         

                        JET

                        • 9. Re: Random Patchwork Sphere
                          jay fresno Community Member

                          JET,

                          Thanks for your patient explanation. I get it now. You are always an inspiration.

                          • 10. Re: Random Patchwork Sphere
                            JETalmage Community Member

                            Try copying the original result, then scaling it and applying Replace Symbol:

                             

                            Group the first set of results; then apply Transform Effect:

                             

                             

                             

                            Rotation setting added to the Transform Effect:

                             

                             

                             

                            (Am I the only one who finds it silly the way this forum assumes every post is a question, and requests the silly awarding of meaningless "points" and insists that even a non-question should be marked "answered" or "not answered"?)

                             

                            JET

                            • 11. Re: Random Patchwork Sphere
                              tromboniator Community Member

                               

                               

                              (Am I the only one who finds it silly the way this forum assumes every post is a question, and requests the silly awarding of meaningless "points" and insists that even a non-question should be marked "answered" or "not answered"?)

                               

                              JET

                              There is a toggle for that under the topic box when you start a new post.

                              Man, oh, man, your work is gorgeous and insightful and, I hope, infectious.

                              Thanks,
                              Peter

                              • 12. Re: Random Patchwork Sphere
                                JETalmage Community Member
                                There is a toggle for that under the topic box when you start a new post.

                                 

                                Oh. Thanks. I'll try to remember to watch for it next time I start a discussion. (I still think the whole mess is a bunch of ridiculous just-because-we-can fluff.)

                                 

                                I would mark yours the "Correct Answer," so you can take all those "points", add $5.49 to them and go to Starbucks for a Mocha Latte, but I'll wait 'till I see the off-switch for myself. ;-)

                                 

                                Is there a way to completely opt-out of the "personal messages" functionality? I have looked for that, but didn't find it.

                                 

                                JET

                                • 13. Re: Random Patchwork Sphere
                                  JETalmage Community Member

                                  An unforseen, but "happy accident" caveat:

                                   

                                   

                                  JET

                                  • 14. Re: Random Patchwork Sphere
                                    tromboniator Community Member

                                    By all means, maintain your skepticism about the off switch, but when you see it I'll take my bag of points to Latitude 59, a local independent, instead of Starbucks, for A Shot in the Dark.

                                     

                                    You're probably out of luck on the personal messages switch, but I'll do my bit by not sending you one unless you force me.

                                     

                                    And yes, I meant new discussion, not new post. Small but significant distinction.

                                     

                                    Peter

                                    • 15. Re: Random Patchwork Sphere
                                      tromboniator Community Member

                                      Yup, noticed that about the text. Love that script.

                                      • 16. Re: Random Patchwork Sphere
                                        JETalmage Community Member
                                        Latitude 59

                                        Well, if that's the actual name of the establishment, I guess that would be appropriate to this thread. ;-)

                                         

                                        JET

                                        • 17. Re: Random Patchwork Sphere
                                          tromboniator Community Member

                                          Yes it would. And with reasonable accuracy to its true location.

                                           

                                          Peter

                                          • 18. Re: Random Patchwork Sphere
                                            JETalmage Community Member

                                            That's way up there.

                                            Would that happen to be somewhere 'round 151 longitude?

                                             

                                             

                                            ;-)

                                             

                                            JET

                                            • 19. Re: Random Patchwork Sphere
                                              tromboniator Community Member

                                               

                                               

                                               

                                              Would that happen to be somewhere 'round 151 longitude?


                                              I think that's one of my dogs gnawing on the end of that radius.

                                               

                                              Peter

                                              • 20. Re: Random Patchwork Sphere
                                                tromboniator Community Member

                                                The reversal-of-text effect is useful to determine which hemisphere a symbol is supposed to be in when it's not otherwise obvious, should that be important.

                                                Screen shot 2010-01-04 at 8.59.27 PM.png

                                                • 21. Re: Random Patchwork Sphere
                                                  Jacob Bugge MVP

                                                  Lauren,

                                                  Thank you very much for reviving this thread, which I had overlooked completely at the time. And if you see a bearded guy with a trombone paddling in a sludge cup somewhere on Lake Street, tell Peter it is high time to go home and post here.

                                                   

                                                  James,

                                                  Is there a way to completely opt-out of the "personal messages" functionality? I have looked for that, but didn't find it.

                                                   

                                                  Unfortunately not, but you have a few options to get it over with:

                                                   

                                                  1) Send some long PMs to yourself;

                                                  2) Ask everyone to send you a long PM today.

                                                   

                                                  With either, the mailbox will soon be full, and no one can send you anything (until someone decides to increase the allocated space (again) beyond the present 150 kB).

                                                   

                                                  I am not sure about getting rid of the email notification, the You have a new Private message message.

                                                  • 22. Re: Random Patchwork Sphere
                                                    tromboniator Community Member

                                                    Hi, Jacob,

                                                     

                                                    I got overwhelmed by forums (fora?), email, and obligations, to others and to myself, so some of it gave. Haven't visited a forum of any description since our last email exchange. Might be back shortly. I have thought about you. Regards to you and all you love.

                                                     

                                                    Peter

                                                     

                                                    PS: Had a big band gig Saturday, and two orchestra concerts coming on the weekend. Life is good. And Latitude 59 flourishes.

                                                    • 23. Re: Random Patchwork Sphere
                                                      Jacob Bugge MVP

                                                      I am happy to hear that, Peter. And all the best to you and yours.

                                                       

                                                      And once again, thank you Lauren.

                                                      • 24. Re: Random Patchwork Sphere
                                                        W_J_T Community Member

                                                        Hello everyone,

                                                         

                                                        I was hoping to obtain a copy of this script from JETalmage or someone who has it from previously downloading a copy.

                                                         

                                                        JET_DrawScripts.zip    * which includes the Random Patchwork Sphere script

                                                         

                                                        I am also really interested in the following, if someone has any or all of those as well:

                                                         

                                                        JET_RandomizeScripts.zip

                                                        JET_PrimitivesScripts.zip

                                                        JET_TransformScripts.zip

                                                        JET_PathScripts.zip

                                                         

                                                        I am not sure if those are the correct naming conventions for the most recent archives but I am looking for JET's Draw scripts, Randomize scripts, Primitives scripts, Transform scripts, Path scripts, in particular, both to utilize and learn from. I greatly appreciate anyones help on this, I apologize for asking but they seem rather hard to locate now days but awesome resources for learning and utilizing.  I tried previously to PM JETalmage directly before seeing and realizing he doesn't seem to like receiving PM's (as stated in this thread) and may in fact ignore them all together, I am sure with so much talent and knowledge he gets a ton of requests so thats understandable. ;-)

                                                         

                                                        So I am hoping someone who has copies of these scripts already, can provide them if possible. Thanks everyone, especially JET for sharing these originally with the community. Thanks everyone for your time and any thing your able to offer, both the ones listed or others as part of JET's collection.

                                                         

                                                        Thanks

                                                         

                                                        JETalmage wrote:

                                                        Is there a way to completely opt-out of the "personal messages" functionality? I have looked for that, but didn't find it.

                                                        • 25. Re: Random Patchwork Sphere
                                                          Doug.S Community Member

                                                          I have the JET_DrawScripts.zip

                                                           

                                                          but it does NOT include Random Patchwork Sphere script;

                                                           

                                                          zip has: desmeas,crlcentroid,dimension(3),fauxhalf, sphereAICS

                                                           

                                                          but I'd like to find random patchwork sphere too; tried google but leads are all 404 dead

                                                          • 26. Re: Random Patchwork Sphere
                                                            faleaf Community Member

                                                            The link is no longer working. Can any one send me the script? I'll be appreciate your help.

                                                            My email is fyrise@gmail.com

                                                            • 27. Re: Random Patchwork Sphere
                                                              Jacob Bugge MVP

                                                              faleaf,

                                                               

                                                              Since the scripts are no longer publically available, I believe no one should make them but James if/when he chooses to.

                                                               

                                                              By the way, it now takes 500 Private Messages (regardless of size) to fill the Inbox.

                                                              • 28. Re: Random Patchwork Sphere
                                                                JETalmage Community Member

                                                                Since the scripts are no longer publically available, I believe no one should [distribute] them but James...

                                                                Thank you, Jacob.

                                                                 

                                                                JET

                                                                • 29. Re: Random Patchwork Sphere
                                                                  Jacob Bugge MVP

                                                                  You are welcome, James.

                                                                   

                                                                  And you are right: for a general audience statement like that, the implicit [available] should have been explicit:

                                                                   

                                                                  ... I believe no one should make them available but James ...